diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/_configuration.py index e4448ee79b4..4c8dabf1a84 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDurationTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/_configuration.py index 131a151c25e..2720ec54e59 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDurationTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/operations/_duration_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/operations/_duration_operations.py index 22c39c4e88f..cbb76823548 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/operations/_duration_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/operations/_duration_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: :rtype: ~datetime.timedelta or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -105,9 +104,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: return deserialized # type: ignore @distributed_trace_async - async def put_positive_duration( # pylint: disable=inconsistent-return-statements - self, duration_body: datetime.timedelta, **kwargs: Any - ) -> None: + async def put_positive_duration(self, duration_body: datetime.timedelta, **kwargs: Any) -> None: """Put a positive duration value. :param duration_body: duration body. Required. @@ -116,7 +113,7 @@ async def put_positive_duration( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -163,7 +160,7 @@ async def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -209,7 +206,7 @@ async def get_invalid(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/operations/_duration_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/operations/_duration_operations.py index ef34cc19b6d..5abfdef5b39 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/operations/_duration_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/operations/_duration_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -123,7 +122,7 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: :rtype: ~datetime.timedelta or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -173,7 +172,7 @@ def put_positive_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,7 +219,7 @@ def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +265,7 @@ def get_invalid(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/aio/operations/_parameter_grouping_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/aio/operations/_parameter_grouping_operations.py index 6cf47d6e050..f82716710ea 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/aio/operations/_parameter_grouping_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/aio/operations/_parameter_grouping_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -60,7 +59,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def post_required( # pylint: disable=inconsistent-return-statements + async def post_required( self, parameter_grouping_post_required_parameters: _models.ParameterGroupingPostRequiredParameters, **kwargs: Any @@ -74,7 +73,7 @@ async def post_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -126,7 +125,7 @@ async def post_required( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional( # pylint: disable=inconsistent-return-statements + async def post_optional( self, parameter_grouping_post_optional_parameters: Optional[_models.ParameterGroupingPostOptionalParameters] = None, **kwargs: Any @@ -140,7 +139,7 @@ async def post_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -183,7 +182,7 @@ async def post_optional( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_reserved_words( # pylint: disable=inconsistent-return-statements + async def post_reserved_words( self, parameter_grouping_post_reserved_words_parameters: Optional[ _models.ParameterGroupingPostReservedWordsParameters @@ -200,7 +199,7 @@ async def post_reserved_words( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -243,7 +242,7 @@ async def post_reserved_words( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_multi_param_groups( # pylint: disable=inconsistent-return-statements + async def post_multi_param_groups( self, first_parameter_group: Optional[_models.FirstParameterGroup] = None, parameter_grouping_post_multi_param_groups_second_param_group: Optional[ @@ -263,7 +262,7 @@ async def post_multi_param_groups( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -313,7 +312,7 @@ async def post_multi_param_groups( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_shared_parameter_group_object( # pylint: disable=inconsistent-return-statements + async def post_shared_parameter_group_object( self, first_parameter_group: Optional[_models.FirstParameterGroup] = None, **kwargs: Any ) -> None: """Post parameters with a shared parameter group object. @@ -324,7 +323,7 @@ async def post_shared_parameter_group_object( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -367,9 +366,7 @@ async def post_shared_parameter_group_object( # pylint: disable=inconsistent-re return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def group_with_constant( # pylint: disable=inconsistent-return-statements - self, grouper: Optional[_models.Grouper] = None, **kwargs: Any - ) -> None: + async def group_with_constant(self, grouper: Optional[_models.Grouper] = None, **kwargs: Any) -> None: """Parameter group with a constant. Pass in 'foo' for groupedConstant and 'bar' for groupedParameter. @@ -379,7 +376,7 @@ async def group_with_constant( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/models/_models_py3.py index fb2d09b3469..b9c42a3c355 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/operations/_parameter_grouping_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/operations/_parameter_grouping_operations.py index 81e0b9373a7..383efcb0fe8 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/operations/_parameter_grouping_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/operations/_parameter_grouping_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from msrest import Serializer @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -220,7 +219,7 @@ def post_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -286,7 +285,7 @@ def post_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -346,7 +345,7 @@ def post_reserved_words( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -409,7 +408,7 @@ def post_multi_param_groups( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -470,7 +469,7 @@ def post_shared_parameter_group_object( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -525,7 +524,7 @@ def group_with_constant( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_vendor.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_vendor.py index f2b160bbc2a..3af6dbaa6be 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_vendor.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestReportServiceForAzureConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/_vendor.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/_vendor.py index cff94c45790..769b210a071 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/_vendor.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestReportServiceForAzureConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/_auto_rest_report_service_for_azure_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/_auto_rest_report_service_for_azure_operations.py index 50a5f649f56..2de813f5868 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/_auto_rest_report_service_for_azure_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/_auto_rest_report_service_for_azure_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +48,7 @@ async def get_report(self, qualifier: Optional[str] = None, **kwargs: Any) -> Di :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/_auto_rest_report_service_for_azure_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/_auto_rest_report_service_for_azure_operations.py index bfda5f78e6d..7c3926d161f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/_auto_rest_report_service_for_azure_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/_auto_rest_report_service_for_azure_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -72,7 +71,7 @@ def get_report(self, qualifier: Optional[str] = None, **kwargs: Any) -> Dict[str :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/_auto_rest_azure_special_parameters_test_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/_auto_rest_azure_special_parameters_test_client.py index 2b45d811b38..6aa70ea9da6 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/_auto_rest_azure_special_parameters_test_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/_auto_rest_azure_special_parameters_test_client.py @@ -31,11 +31,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestAzureSpecialParametersTestClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class AutoRestAzureSpecialParametersTestClient: # pylint: disable=too-many-instance-attributes """Test Infrastructure for AutoRest. :ivar xms_client_request_id: XMsClientRequestIdOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/_configuration.py index 1cfe48aaede..406dedcbca3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/_configuration.py @@ -14,7 +14,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/_auto_rest_azure_special_parameters_test_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/_auto_rest_azure_special_parameters_test_client.py index 8597cb22448..f5c5aca6930 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/_auto_rest_azure_special_parameters_test_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/_auto_rest_azure_special_parameters_test_client.py @@ -31,11 +31,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestAzureSpecialParametersTestClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class AutoRestAzureSpecialParametersTestClient: # pylint: disable=too-many-instance-attributes """Test Infrastructure for AutoRest. :ivar xms_client_request_id: XMsClientRequestIdOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/_configuration.py index d77470317cf..aa478fab72e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/_configuration.py @@ -14,7 +14,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_default_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_default_operations.py index 41601cf3d22..853bdc0690e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_default_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_default_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,14 +58,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_method_global_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -103,16 +102,14 @@ async def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_global_not_provided_valid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_method_global_not_provided_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -149,14 +146,14 @@ async def get_method_global_not_provided_valid( # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_path_global_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -193,14 +190,14 @@ async def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_global_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_local_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_local_operations.py index f14830b0e3e..6daade1520c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_local_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_local_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,14 +58,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_method_local_valid(self, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -103,9 +102,7 @@ async def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_local_null( # pylint: disable=inconsistent-return-statements - self, api_version: Optional[str] = None, **kwargs: Any - ) -> None: + async def get_method_local_null(self, api_version: Optional[str] = None, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = null to succeed. :param api_version: This should appear as a method parameter, use value null, this should @@ -115,7 +112,7 @@ async def get_method_local_null( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -151,14 +148,14 @@ async def get_method_local_null( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_path_local_valid(self, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -195,14 +192,14 @@ async def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_local_valid(self, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py index d5f6cbf5c25..72bfb529e24 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,9 +56,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def custom_named_request_id( # pylint: disable=inconsistent-return-statements - self, foo_client_request_id: str, **kwargs: Any - ) -> None: + async def custom_named_request_id(self, foo_client_request_id: str, **kwargs: Any) -> None: """Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request. :param foo_client_request_id: The fooRequestId. Required. @@ -68,7 +65,7 @@ async def custom_named_request_id( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -107,7 +104,7 @@ async def custom_named_request_id( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def custom_named_request_id_param_grouping( # pylint: disable=inconsistent-return-statements + async def custom_named_request_id_param_grouping( self, header_custom_named_request_id_param_grouping_parameters: _models.HeaderCustomNamedRequestIdParamGroupingParameters, **kwargs: Any @@ -122,7 +119,7 @@ async def custom_named_request_id_param_grouping( # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -174,7 +171,7 @@ async def custom_named_request_id_head(self, foo_client_request_id: str, **kwarg :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_odata_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_odata_operations.py index 3e1c573242e..4b02099da30 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_odata_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_odata_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +52,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_with_filter( # pylint: disable=inconsistent-return-statements + async def get_with_filter( self, filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any ) -> None: """Specify filter parameter with value '$filter=id gt 5 and name eq 'foo'&$orderby=id&$top=10'. @@ -69,7 +68,7 @@ async def get_with_filter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_skip_url_encoding_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_skip_url_encoding_operations.py index 0cbbe741ab8..2c75db150f1 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_skip_url_encoding_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_skip_url_encoding_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,9 +61,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_method_path_valid( # pylint: disable=inconsistent-return-statements - self, unencoded_path_param: str, **kwargs: Any - ) -> None: + async def get_method_path_valid(self, unencoded_path_param: str, **kwargs: Any) -> None: """Get method with unencoded path parameter with value 'path1/path2/path3'. :param unencoded_path_param: Unencoded path parameter with value 'path1/path2/path3'. Required. @@ -73,7 +70,7 @@ async def get_method_path_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -109,9 +106,7 @@ async def get_method_path_valid( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_valid( # pylint: disable=inconsistent-return-statements - self, unencoded_path_param: str, **kwargs: Any - ) -> None: + async def get_path_valid(self, unencoded_path_param: str, **kwargs: Any) -> None: """Get method with unencoded path parameter with value 'path1/path2/path3'. :param unencoded_path_param: Unencoded path parameter with value 'path1/path2/path3'. Required. @@ -120,7 +115,7 @@ async def get_path_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -156,14 +151,14 @@ async def get_path_valid( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_path_valid(self, **kwargs: Any) -> None: """Get method with unencoded path parameter with value 'path1/path2/path3'. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -200,9 +195,7 @@ async def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_query_valid( # pylint: disable=inconsistent-return-statements - self, q1: str, **kwargs: Any - ) -> None: + async def get_method_query_valid(self, q1: str, **kwargs: Any) -> None: """Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3'. :param q1: Unencoded query parameter with value 'value1&q2=value2&q3=value3'. Required. @@ -211,7 +204,7 @@ async def get_method_query_valid( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -247,9 +240,7 @@ async def get_method_query_valid( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_query_null( # pylint: disable=inconsistent-return-statements - self, q1: Optional[str] = None, **kwargs: Any - ) -> None: + async def get_method_query_null(self, q1: Optional[str] = None, **kwargs: Any) -> None: """Get method with unencoded query parameter with value null. :param q1: Unencoded query parameter with value null. Default value is None. @@ -258,7 +249,7 @@ async def get_method_query_null( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -294,9 +285,7 @@ async def get_method_query_null( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_query_valid( # pylint: disable=inconsistent-return-statements - self, q1: str, **kwargs: Any - ) -> None: + async def get_path_query_valid(self, q1: str, **kwargs: Any) -> None: """Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3'. :param q1: Unencoded query parameter with value 'value1&q2=value2&q3=value3'. Required. @@ -305,7 +294,7 @@ async def get_path_query_valid( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -341,14 +330,14 @@ async def get_path_query_valid( # pylint: disable=inconsistent-return-statement return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_query_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_query_valid(self, **kwargs: Any) -> None: """Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3'. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_credentials_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_credentials_operations.py index 85a0e5cec04..a3a8f6e1c40 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_credentials_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_credentials_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -60,7 +59,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_method_global_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -68,7 +67,7 @@ async def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -104,7 +103,7 @@ async def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_method_global_null(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to null, and client-side validation should prevent you from making this call. @@ -112,7 +111,7 @@ async def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -148,9 +147,7 @@ async def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_method_global_not_provided_valid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def post_method_global_not_provided_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -158,7 +155,7 @@ async def post_method_global_not_provided_valid( # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -196,7 +193,7 @@ async def post_method_global_not_provided_valid( # pylint: disable=inconsistent return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_path_global_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -204,7 +201,7 @@ async def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -240,7 +237,7 @@ async def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_swagger_global_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -248,7 +245,7 @@ async def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_method_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_method_operations.py index b4be67891b7..90a0498c633 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_method_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_method_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,9 +57,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def post_method_local_valid( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_method_local_valid(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed. @@ -71,7 +68,7 @@ async def post_method_local_valid( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -107,9 +104,7 @@ async def post_method_local_valid( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_method_local_null( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_method_local_null(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = null, client-side validation should prevent you from making this call. @@ -120,7 +115,7 @@ async def post_method_local_null( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -156,9 +151,7 @@ async def post_method_local_null( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_path_local_valid( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_path_local_valid(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed. @@ -169,7 +162,7 @@ async def post_path_local_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -205,9 +198,7 @@ async def post_path_local_valid( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_swagger_local_valid( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_swagger_local_valid(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed. @@ -218,7 +209,7 @@ async def post_swagger_local_valid( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_xms_client_request_id_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_xms_client_request_id_operations.py index c34c1381b39..3f87748917b 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_xms_client_request_id_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_xms_client_request_id_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +52,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get(self, **kwargs: Any) -> None: """Get method that overwrites x-ms-client-request header with value 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. @@ -61,7 +60,7 @@ async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -95,9 +94,7 @@ async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def param_get( # pylint: disable=inconsistent-return-statements - self, x_ms_client_request_id: str, **kwargs: Any - ) -> None: + async def param_get(self, x_ms_client_request_id: str, **kwargs: Any) -> None: """Get method that overwrites x-ms-client-request header with value 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. @@ -108,7 +105,7 @@ async def param_get( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/models/_models_py3.py index a8109e6bbc1..dfc784784d8 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_default_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_default_operations.py index 73e71e2de0c..62eb2330d7e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_default_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_default_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -142,7 +141,7 @@ def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -188,7 +187,7 @@ def get_method_global_not_provided_valid( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -232,7 +231,7 @@ def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -276,7 +275,7 @@ def get_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_local_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_local_operations.py index 2a677470576..6b39b2c08c5 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_local_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_local_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -140,7 +139,7 @@ def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -189,7 +188,7 @@ def get_method_local_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -232,7 +231,7 @@ def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -276,7 +275,7 @@ def get_swagger_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py index ca2295ffe45..f1f4165bb15 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -117,7 +116,7 @@ def custom_named_request_id( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -171,7 +170,7 @@ def custom_named_request_id_param_grouping( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -223,7 +222,7 @@ def custom_named_request_id_head(self, foo_client_request_id: str, **kwargs: Any :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_odata_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_odata_operations.py index fef729f0905..27c81529645 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_odata_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_odata_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -98,7 +97,7 @@ def get_with_filter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_skip_url_encoding_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_skip_url_encoding_operations.py index 98b48e1a4af..49dd44b568a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_skip_url_encoding_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_skip_url_encoding_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -200,7 +199,7 @@ def get_method_path_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -247,7 +246,7 @@ def get_path_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -290,7 +289,7 @@ def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -336,7 +335,7 @@ def get_method_query_valid(self, q1: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -383,7 +382,7 @@ def get_method_query_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -428,7 +427,7 @@ def get_path_query_valid(self, q1: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -471,7 +470,7 @@ def get_swagger_query_valid(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_credentials_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_credentials_operations.py index 2d5b9ac785a..86f003c487a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_credentials_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_credentials_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -181,7 +180,7 @@ def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,7 +224,7 @@ def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -271,7 +270,7 @@ def post_method_global_not_provided_valid( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -317,7 +316,7 @@ def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -361,7 +360,7 @@ def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_method_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_method_operations.py index 9b17d01eec5..c889cfbd755 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_method_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_method_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -156,7 +155,7 @@ def post_method_local_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -205,7 +204,7 @@ def post_method_local_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -254,7 +253,7 @@ def post_path_local_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,7 +302,7 @@ def post_swagger_local_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_xms_client_request_id_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_xms_client_request_id_operations.py index 81998f48c81..69d4e93c7fd 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_xms_client_request_id_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_xms_client_request_id_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -87,7 +86,7 @@ def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,7 +133,7 @@ def param_get( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py index f7fd81fc79b..225c4d6d4b9 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,9 +51,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_empty( # pylint: disable=inconsistent-return-statements - self, account_name: str, **kwargs: Any - ) -> None: + async def get_empty(self, account_name: str, **kwargs: Any) -> None: """Get a 200 to test a valid base uri. :param account_name: Account Name. Required. @@ -63,7 +60,7 @@ async def get_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/models/_models_py3.py index dee497e2600..68d3f5cbdf3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py index 2749155efda..ac15c341ede 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -79,7 +78,7 @@ def get_empty(self, account_name: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_auto_rest_paging_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_auto_rest_paging_test_service.py index 6ce08e14b8f..76d3904c0c3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_auto_rest_paging_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_auto_rest_paging_test_service.py @@ -21,11 +21,10 @@ from .operations import PagingOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestPagingTestService: # pylint: disable=client-accepts-api-version-keyword +class AutoRestPagingTestService: """Long-running Operation for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_configuration.py index 58fdafaac80..bc048b260b3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestPagingTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/_auto_rest_paging_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/_auto_rest_paging_test_service.py index 98e14a6d9f3..f9723689dab 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/_auto_rest_paging_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/_auto_rest_paging_test_service.py @@ -21,11 +21,10 @@ from .operations import PagingOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestPagingTestService: # pylint: disable=client-accepts-api-version-keyword +class AutoRestPagingTestService: """Long-running Operation for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/_configuration.py index b070fefeb2a..c5209e55acf 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestPagingTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/operations/_paging_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/operations/_paging_operations.py index 6c894f74784..ad452c8c5b7 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/operations/_paging_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/aio/operations/_paging_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Literal, Optional, Type, TypeVar, Union, cast +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Literal, Optional, TypeVar, Union, cast import urllib.parse from custompollerpagerdefinitions.aio import AsyncCustomPager, AsyncCustomPoller @@ -65,7 +65,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -102,7 +102,7 @@ def get_no_item_name_pages(self, **kwargs: Any) -> AsyncIterable["_models.Produc cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -173,7 +173,7 @@ def get_empty_next_link_name_pages(self, **kwargs: Any) -> AsyncIterable["_model cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -244,7 +244,7 @@ def get_null_next_link_name_pages(self, **kwargs: Any) -> AsyncIterable["_models cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -315,7 +315,7 @@ def get_single_pages(self, **kwargs: Any) -> AsyncIterable["_models.Product"]: cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -391,7 +391,7 @@ def get_single_pages_with_body_params( content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -467,7 +467,7 @@ def first_response_empty(self, **kwargs: Any) -> AsyncIterable["_models.Product" cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -548,7 +548,7 @@ def get_multiple_pages( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -632,7 +632,7 @@ def get_with_query_params(self, required_query_parameter: int, **kwargs: Any) -> query_constant: Literal[True] = kwargs.pop("query_constant", _params.pop("queryConstant", True)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -703,7 +703,7 @@ def duplicate_params(self, filter: Optional[str] = None, **kwargs: Any) -> Async cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -780,7 +780,7 @@ def page_with_max_page_size( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -862,7 +862,7 @@ def get_odata_multiple_pages( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -951,7 +951,7 @@ def get_multiple_pages_with_offset( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1034,7 +1034,7 @@ def get_multiple_pages_retry_first(self, **kwargs: Any) -> AsyncIterable["_model cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1106,7 +1106,7 @@ def get_multiple_pages_retry_second(self, **kwargs: Any) -> AsyncIterable["_mode cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1177,7 +1177,7 @@ def get_single_pages_failure(self, **kwargs: Any) -> AsyncIterable["_models.Prod cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1248,7 +1248,7 @@ def get_multiple_pages_failure(self, **kwargs: Any) -> AsyncIterable["_models.Pr cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1319,7 +1319,7 @@ def get_multiple_pages_failure_uri(self, **kwargs: Any) -> AsyncIterable["_model cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1396,7 +1396,7 @@ def get_multiple_pages_fragment_next_link( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1469,7 +1469,7 @@ def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1541,7 +1541,7 @@ async def _get_multiple_pages_lro_initial( paging_get_multiple_pages_lro_options: Optional[_models.PagingGetMultiplePagesLroOptions] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1619,7 +1619,7 @@ async def begin_get_multiple_pages_lro( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1738,7 +1738,7 @@ def append_api_version(self, **kwargs: Any) -> AsyncIterable["_models.Product"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1812,7 +1812,7 @@ def replace_api_version(self, **kwargs: Any) -> AsyncIterable["_models.Product"] api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1887,7 +1887,7 @@ def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=nam cls: ClsType[_models.ProductResultValueWithXMSClientName] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/models/_models_py3.py index 3d6475fb1af..e661461d066 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/operations/_paging_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/operations/_paging_operations.py index 72cedb32097..3ed03845c7f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/operations/_paging_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/custompollerpager/operations/_paging_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Iterator, Literal, Optional, Type, TypeVar, Union, cast +from typing import Any, Callable, Dict, Iterable, Iterator, Literal, Optional, TypeVar, Union, cast import urllib.parse from custompollerpagerdefinitions import CustomPager, CustomPoller @@ -37,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -563,7 +563,7 @@ def get_no_item_name_pages(self, **kwargs: Any) -> Iterable["_models.Product"]: cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -634,7 +634,7 @@ def get_empty_next_link_name_pages(self, **kwargs: Any) -> Iterable["_models.Pro cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -705,7 +705,7 @@ def get_null_next_link_name_pages(self, **kwargs: Any) -> Iterable["_models.Prod cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +776,7 @@ def get_single_pages(self, **kwargs: Any) -> Iterable["_models.Product"]: cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,7 +852,7 @@ def get_single_pages_with_body_params( content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -928,7 +928,7 @@ def first_response_empty(self, **kwargs: Any) -> Iterable["_models.Product"]: cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1009,7 +1009,7 @@ def get_multiple_pages( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1093,7 +1093,7 @@ def get_with_query_params(self, required_query_parameter: int, **kwargs: Any) -> query_constant: Literal[True] = kwargs.pop("query_constant", _params.pop("queryConstant", True)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1164,7 +1164,7 @@ def duplicate_params(self, filter: Optional[str] = None, **kwargs: Any) -> Itera cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1239,7 +1239,7 @@ def page_with_max_page_size(self, maxpagesize: Literal["5"] = "5", **kwargs: Any cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1321,7 +1321,7 @@ def get_odata_multiple_pages( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1410,7 +1410,7 @@ def get_multiple_pages_with_offset( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1493,7 +1493,7 @@ def get_multiple_pages_retry_first(self, **kwargs: Any) -> Iterable["_models.Pro cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1565,7 +1565,7 @@ def get_multiple_pages_retry_second(self, **kwargs: Any) -> Iterable["_models.Pr cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1636,7 +1636,7 @@ def get_single_pages_failure(self, **kwargs: Any) -> Iterable["_models.Product"] cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1707,7 +1707,7 @@ def get_multiple_pages_failure(self, **kwargs: Any) -> Iterable["_models.Product cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1778,7 +1778,7 @@ def get_multiple_pages_failure_uri(self, **kwargs: Any) -> Iterable["_models.Pro cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1855,7 +1855,7 @@ def get_multiple_pages_fragment_next_link( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1928,7 +1928,7 @@ def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2000,7 +2000,7 @@ def _get_multiple_pages_lro_initial( paging_get_multiple_pages_lro_options: Optional[_models.PagingGetMultiplePagesLroOptions] = None, **kwargs: Any, ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2077,7 +2077,7 @@ def begin_get_multiple_pages_lro( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2196,7 +2196,7 @@ def append_api_version(self, **kwargs: Any) -> Iterable["_models.Product"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2270,7 +2270,7 @@ def replace_api_version(self, **kwargs: Any) -> Iterable["_models.Product"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2345,7 +2345,7 @@ def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=nam cls: ClsType[_models.ProductResultValueWithXMSClientName] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/_auto_rest_parameterized_host_test_paging_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/_auto_rest_parameterized_host_test_paging_client.py index b2d8d631125..14465dd3a93 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/_auto_rest_parameterized_host_test_paging_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/_auto_rest_parameterized_host_test_paging_client.py @@ -20,7 +20,7 @@ from .operations import PagingOperations -class AutoRestParameterizedHostTestPagingClient: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestParameterizedHostTestPagingClient: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/_auto_rest_parameterized_host_test_paging_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/_auto_rest_parameterized_host_test_paging_client.py index e63572f4e99..d27c20a6260 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/_auto_rest_parameterized_host_test_paging_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/_auto_rest_parameterized_host_test_paging_client.py @@ -20,7 +20,7 @@ from .operations import PagingOperations -class AutoRestParameterizedHostTestPagingClient: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestParameterizedHostTestPagingClient: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/operations/_paging_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/operations/_paging_operations.py index f4881311e4a..6396440881c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/operations/_paging_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/operations/_paging_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -72,7 +71,7 @@ def get_pages_partial_url(self, account_name: str, **kwargs: Any) -> AsyncIterab cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -142,7 +141,7 @@ def get_pages_partial_url_operation(self, account_name: str, **kwargs: Any) -> A cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/models/_models_py3.py index c45f60ce4f9..fc88a8d66ac 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/operations/_paging_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/operations/_paging_operations.py index a2d36384bc6..becf55d5f11 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/operations/_paging_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/operations/_paging_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -121,7 +120,7 @@ def get_pages_partial_url(self, account_name: str, **kwargs: Any) -> Iterable["_ cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -191,7 +190,7 @@ def get_pages_partial_url_operation(self, account_name: str, **kwargs: Any) -> I cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_auto_rest_head_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_auto_rest_head_test_service.py index f184d0d4beb..b7a7564d4ad 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_auto_rest_head_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_auto_rest_head_test_service.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_configuration.py index b753cda440f..dbf84f8310f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/_auto_rest_head_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/_auto_rest_head_test_service.py index c15cc91a08e..90edc60b5c5 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/_auto_rest_head_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/_auto_rest_head_test_service.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/_configuration.py index ca3bae219c1..907a85173ac 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/operations/_http_success_operations.py index 90c9ae09835..91ef42714d8 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/aio/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -141,7 +140,7 @@ async def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/operations/_http_success_operations.py index e3c44dd34f8..47679b15fb9 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/head/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_auto_rest_head_exception_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_auto_rest_head_exception_test_service.py index 35feb9b67d9..42b9376dc53 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_auto_rest_head_exception_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_auto_rest_head_exception_test_service.py @@ -20,7 +20,6 @@ from .operations import HeadExceptionOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_configuration.py index cb08ffa0df3..4b2fe135b7e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_configuration.py @@ -14,7 +14,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/_auto_rest_head_exception_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/_auto_rest_head_exception_test_service.py index 2171f18c426..9a68a505b9f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/_auto_rest_head_exception_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/_auto_rest_head_exception_test_service.py @@ -20,7 +20,6 @@ from .operations import HeadExceptionOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/_configuration.py index df3d8954b1b..3921be8c648 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/_configuration.py @@ -14,7 +14,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/operations/_head_exception_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/operations/_head_exception_operations.py index 9f13b259e82..016be1e21af 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/operations/_head_exception_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/aio/operations/_head_exception_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -141,7 +140,7 @@ async def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/operations/_head_exception_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/operations/_head_exception_operations.py index 28fe353f68e..bfb51218803 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/operations/_head_exception_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/headexceptions/operations/_head_exception_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_configuration.py index b1de629c952..d47ecc78ca6 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_configuration.py @@ -15,7 +15,7 @@ from ._version import VERSION -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/_configuration.py index 12580f1dc11..0b52153191b 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/_configuration.py @@ -15,7 +15,7 @@ from .._version import VERSION -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/operations/_http_success_operations.py index a517d5c17b2..9131f625b60 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/aio/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -141,7 +140,7 @@ async def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/operations/_http_success_operations.py index b3b27006a51..ad8f2725c3e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_auto_rest_long_running_operation_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_auto_rest_long_running_operation_test_service.py index 894ed4fa36c..654491fd5f7 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_auto_rest_long_running_operation_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_auto_rest_long_running_operation_test_service.py @@ -21,7 +21,6 @@ from .operations import LRORetrysOperations, LROSADsOperations, LROsCustomHeaderOperations, LROsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_configuration.py index e4f7fe091a5..489d6ad4ba6 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_configuration.py @@ -14,7 +14,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/_auto_rest_long_running_operation_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/_auto_rest_long_running_operation_test_service.py index 938ace9c0b8..88acd187e9d 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/_auto_rest_long_running_operation_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/_auto_rest_long_running_operation_test_service.py @@ -21,7 +21,6 @@ from .operations import LRORetrysOperations, LROSADsOperations, LROsCustomHeaderOperations, LROsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/_configuration.py index c191008d365..98a959a9762 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/_configuration.py @@ -14,7 +14,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lr_os_custom_header_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lr_os_custom_header_operations.py index 693d2b241c7..c89239762ec 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lr_os_custom_header_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lr_os_custom_header_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -39,7 +38,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ def __init__(self, *args, **kwargs) -> None: async def _put_async_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -241,7 +240,7 @@ def get_long_running_output(pipeline_response): async def _put201_creating_succeeded200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -401,7 +400,7 @@ def get_long_running_output(pipeline_response): async def _post202_retry200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -555,7 +554,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lro_retrys_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lro_retrys_operations.py index 1f0f5834003..f1b4a18ba7c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lro_retrys_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lro_retrys_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,7 +68,7 @@ def __init__(self, *args, **kwargs) -> None: async def _put201_creating_succeeded200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -226,7 +225,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -398,7 +397,7 @@ def get_long_running_output(pipeline_response): async def _delete_provisioning202_accepted200_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -496,7 +495,7 @@ def get_long_running_output(pipeline_response): ) async def _delete202_retry200_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -587,7 +586,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _delete_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -683,7 +682,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post202_retry200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -834,7 +833,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lros_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lros_operations.py index 44bc2f69c3a..9b985ab6e26 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lros_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lros_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -79,7 +79,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -106,7 +106,7 @@ def __init__(self, *args, **kwargs) -> None: async def _put200_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -260,7 +260,7 @@ def get_long_running_output(pipeline_response): async def _patch200_succeeded_ignore_headers_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -425,7 +425,7 @@ def get_long_running_output(pipeline_response): async def _patch201_retry_with_async_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -563,10 +563,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -585,7 +582,7 @@ def get_long_running_output(pipeline_response): async def _patch202_retry_with_async_and_location_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -746,7 +743,7 @@ def get_long_running_output(pipeline_response): async def _put201_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -898,7 +895,7 @@ def get_long_running_output(pipeline_response): ) async def _post202_list_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -997,7 +994,7 @@ def get_long_running_output(pipeline_response): async def _put200_succeeded_no_state_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1151,7 +1148,7 @@ def get_long_running_output(pipeline_response): async def _put202_retry200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1308,7 +1305,7 @@ def get_long_running_output(pipeline_response): async def _put201_creating_succeeded200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1465,7 +1462,7 @@ def get_long_running_output(pipeline_response): async def _put200_updating_succeeded204_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1622,7 +1619,7 @@ def get_long_running_output(pipeline_response): async def _put201_creating_failed200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1779,7 +1776,7 @@ def get_long_running_output(pipeline_response): async def _put200_acceptedcanceled200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1936,7 +1933,7 @@ def get_long_running_output(pipeline_response): async def _put_no_header_in_retry_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2097,7 +2094,7 @@ def get_long_running_output(pipeline_response): async def _put_async_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2269,7 +2266,7 @@ def get_long_running_output(pipeline_response): async def _put_async_no_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2439,7 +2436,7 @@ def get_long_running_output(pipeline_response): async def _put_async_retry_failed_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2611,7 +2608,7 @@ def get_long_running_output(pipeline_response): async def _put_async_no_retrycanceled_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2781,7 +2778,7 @@ def get_long_running_output(pipeline_response): async def _put_async_no_header_in_retry_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2949,7 +2946,7 @@ def get_long_running_output(pipeline_response): async def _put_non_resource_initial( self, sku: Optional[Union[_models.Sku, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3091,7 +3088,7 @@ def get_long_running_output(pipeline_response): async def _put_async_non_resource_initial( self, sku: Optional[Union[_models.Sku, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3233,7 +3230,7 @@ def get_long_running_output(pipeline_response): async def _put_sub_resource_initial( self, provisioning_state: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3343,7 +3340,7 @@ def get_long_running_output(pipeline_response): async def _put_async_sub_resource_initial( self, provisioning_state: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3453,7 +3450,7 @@ def get_long_running_output(pipeline_response): async def _delete_provisioning202_accepted200_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3553,7 +3550,7 @@ def get_long_running_output(pipeline_response): async def _delete_provisioning202_deleting_failed200_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3653,7 +3650,7 @@ def get_long_running_output(pipeline_response): async def _delete_provisioning202_deletingcanceled200_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3751,7 +3748,7 @@ def get_long_running_output(pipeline_response): ) async def _delete204_succeeded_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3835,7 +3832,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete202_retry200_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3930,7 +3927,7 @@ def get_long_running_output(pipeline_response): ) async def _delete202_no_retry204_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4025,7 +4022,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_no_header_in_retry_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4114,7 +4111,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_no_header_in_retry_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4203,7 +4200,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_retry_succeeded_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4295,7 +4292,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_no_retry_succeeded_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4387,7 +4384,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_retry_failed_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4479,7 +4476,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_retrycanceled_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4571,7 +4568,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _post200_with_payload_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4662,7 +4659,7 @@ def get_long_running_output(pipeline_response): async def _post202_retry200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4813,7 +4810,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post202_no_retry204_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4976,7 +4973,7 @@ def get_long_running_output(pipeline_response): async def _post_double_headers_final_location_get_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5073,7 +5070,7 @@ def get_long_running_output(pipeline_response): async def _post_double_headers_final_azure_header_get_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5171,7 +5168,7 @@ def get_long_running_output(pipeline_response): async def _post_double_headers_final_azure_header_get_default_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5266,7 +5263,7 @@ def get_long_running_output(pipeline_response): async def _post_async_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5431,7 +5428,7 @@ def get_long_running_output(pipeline_response): async def _post_async_no_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5596,7 +5593,7 @@ def get_long_running_output(pipeline_response): async def _post_async_retry_failed_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5753,7 +5750,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_retrycanceled_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lrosads_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lrosads_operations.py index ef52be47349..0b50e6afe7a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lrosads_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/aio/operations/_lrosads_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -61,7 +61,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -88,7 +88,7 @@ def __init__(self, *args, **kwargs) -> None: async def _put_non_retry400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -239,7 +239,7 @@ def get_long_running_output(pipeline_response): async def _put_non_retry201_creating400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -393,7 +393,7 @@ def get_long_running_output(pipeline_response): async def _put_non_retry201_creating400_invalid_json_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -547,7 +547,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -714,7 +714,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_non_retry400_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -802,7 +802,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete202_non_retry400_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -890,7 +890,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_relative_retry400_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -984,7 +984,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_non_retry400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1132,7 +1132,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post202_non_retry400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1280,7 +1280,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_relative_retry400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1434,7 +1434,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _put_error201_no_provisioning_state_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1585,7 +1585,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry_no_status_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1757,7 +1757,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry_no_status_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1927,7 +1927,7 @@ def get_long_running_output(pipeline_response): ) async def _delete204_succeeded_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2013,7 +2013,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _delete_async_relative_retry_no_status_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2109,7 +2109,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post202_no_location_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2260,7 +2260,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_relative_retry_no_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2417,7 +2417,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _put200_invalid_json_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2571,7 +2571,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2743,7 +2743,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2913,7 +2913,7 @@ def get_long_running_output(pipeline_response): ) async def _delete202_retry_invalid_header_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3004,7 +3004,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _delete_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3100,7 +3100,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _delete_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3196,7 +3196,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post202_retry_invalid_header_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3347,7 +3347,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3504,7 +3504,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/models/_models_py3.py index 6ddb6521ed0..68b6288aa8a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lr_os_custom_header_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lr_os_custom_header_operations.py index 8c45369c9f3..f36b7c50dc2 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lr_os_custom_header_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lr_os_custom_header_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -132,7 +131,7 @@ def __init__(self, *args, **kwargs): def _put_async_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -304,7 +303,7 @@ def get_long_running_output(pipeline_response): def _put201_creating_succeeded200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -461,7 +460,7 @@ def get_long_running_output(pipeline_response): def _post202_retry200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -615,7 +614,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lro_retrys_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lro_retrys_operations.py index 0cec8162556..753815dc38c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lro_retrys_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lro_retrys_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -176,7 +176,7 @@ def __init__(self, *args, **kwargs): def _put201_creating_succeeded200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -330,7 +330,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -499,7 +499,7 @@ def get_long_running_output(pipeline_response): def _delete_provisioning202_accepted200_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -596,7 +596,7 @@ def get_long_running_output(pipeline_response): ) def _delete202_retry200_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -687,7 +687,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _delete_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -783,7 +783,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post202_retry200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -934,7 +934,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lros_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lros_operations.py index 77ba4977a0e..34ea9fc3ef4 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lros_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lros_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -773,7 +773,7 @@ def __init__(self, *args, **kwargs): def _put200_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -924,7 +924,7 @@ def get_long_running_output(pipeline_response): def _patch200_succeeded_ignore_headers_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1086,7 +1086,7 @@ def get_long_running_output(pipeline_response): def _patch201_retry_with_async_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1221,9 +1221,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1242,7 +1240,7 @@ def get_long_running_output(pipeline_response): def _patch202_retry_with_async_and_location_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1400,7 +1398,7 @@ def get_long_running_output(pipeline_response): def _put201_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1549,7 +1547,7 @@ def get_long_running_output(pipeline_response): ) def _post202_list_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1646,7 +1644,7 @@ def get_long_running_output(pipeline_response): def _put200_succeeded_no_state_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1797,7 +1795,7 @@ def get_long_running_output(pipeline_response): def _put202_retry200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1951,7 +1949,7 @@ def get_long_running_output(pipeline_response): def _put201_creating_succeeded200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2105,7 +2103,7 @@ def get_long_running_output(pipeline_response): def _put200_updating_succeeded204_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2259,7 +2257,7 @@ def get_long_running_output(pipeline_response): def _put201_creating_failed200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2413,7 +2411,7 @@ def get_long_running_output(pipeline_response): def _put200_acceptedcanceled200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2567,7 +2565,7 @@ def get_long_running_output(pipeline_response): def _put_no_header_in_retry_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2725,7 +2723,7 @@ def get_long_running_output(pipeline_response): def _put_async_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2894,7 +2892,7 @@ def get_long_running_output(pipeline_response): def _put_async_no_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3061,7 +3059,7 @@ def get_long_running_output(pipeline_response): def _put_async_retry_failed_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3230,7 +3228,7 @@ def get_long_running_output(pipeline_response): def _put_async_no_retrycanceled_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3397,7 +3395,7 @@ def get_long_running_output(pipeline_response): def _put_async_no_header_in_retry_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3562,7 +3560,7 @@ def get_long_running_output(pipeline_response): def _put_non_resource_initial( self, sku: Optional[Union[_models.Sku, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3702,7 +3700,7 @@ def get_long_running_output(pipeline_response): def _put_async_non_resource_initial( self, sku: Optional[Union[_models.Sku, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3840,7 +3838,7 @@ def get_long_running_output(pipeline_response): return LROPoller[_models.Sku](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _put_sub_resource_initial(self, provisioning_state: Optional[str] = None, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3949,7 +3947,7 @@ def get_long_running_output(pipeline_response): def _put_async_sub_resource_initial( self, provisioning_state: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4058,7 +4056,7 @@ def get_long_running_output(pipeline_response): def _delete_provisioning202_accepted200_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4157,7 +4155,7 @@ def get_long_running_output(pipeline_response): def _delete_provisioning202_deleting_failed200_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4256,7 +4254,7 @@ def get_long_running_output(pipeline_response): def _delete_provisioning202_deletingcanceled200_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4353,7 +4351,7 @@ def get_long_running_output(pipeline_response): ) def _delete204_succeeded_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4437,7 +4435,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete202_retry200_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4531,7 +4529,7 @@ def get_long_running_output(pipeline_response): ) def _delete202_no_retry204_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4625,7 +4623,7 @@ def get_long_running_output(pipeline_response): ) def _delete_no_header_in_retry_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4714,7 +4712,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_no_header_in_retry_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4803,7 +4801,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_retry_succeeded_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4895,7 +4893,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_no_retry_succeeded_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4987,7 +4985,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_retry_failed_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5079,7 +5077,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_retrycanceled_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5171,7 +5169,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _post200_with_payload_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5260,7 +5258,7 @@ def get_long_running_output(pipeline_response): def _post202_retry200_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5411,7 +5409,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post202_no_retry204_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5571,7 +5569,7 @@ def get_long_running_output(pipeline_response): def _post_double_headers_final_location_get_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5667,7 +5665,7 @@ def get_long_running_output(pipeline_response): def _post_double_headers_final_azure_header_get_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5763,7 +5761,7 @@ def get_long_running_output(pipeline_response): def _post_double_headers_final_azure_header_get_default_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5857,7 +5855,7 @@ def get_long_running_output(pipeline_response): def _post_async_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6019,7 +6017,7 @@ def get_long_running_output(pipeline_response): def _post_async_no_retry_succeeded_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6181,7 +6179,7 @@ def get_long_running_output(pipeline_response): def _post_async_retry_failed_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6338,7 +6336,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_retrycanceled_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lrosads_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lrosads_operations.py index 07990112aed..48a782b95c3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lrosads_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/lro/operations/_lrosads_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -500,7 +500,7 @@ def __init__(self, *args, **kwargs): def _put_non_retry400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -648,7 +648,7 @@ def get_long_running_output(pipeline_response): def _put_non_retry201_creating400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -799,7 +799,7 @@ def get_long_running_output(pipeline_response): def _put_non_retry201_creating400_invalid_json_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -950,7 +950,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1114,7 +1114,7 @@ def get_long_running_output(pipeline_response): ) def _delete_non_retry400_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1202,7 +1202,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete202_non_retry400_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1290,7 +1290,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_relative_retry400_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1384,7 +1384,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_non_retry400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1532,7 +1532,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post202_non_retry400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1680,7 +1680,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_relative_retry400_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1834,7 +1834,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _put_error201_no_provisioning_state_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1982,7 +1982,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry_no_status_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,7 +2151,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry_no_status_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2318,7 +2318,7 @@ def get_long_running_output(pipeline_response): ) def _delete204_succeeded_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2404,7 +2404,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _delete_async_relative_retry_no_status_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2500,7 +2500,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post202_no_location_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2651,7 +2651,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_relative_retry_no_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2808,7 +2808,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _put200_invalid_json_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2959,7 +2959,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3128,7 +3128,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3295,7 +3295,7 @@ def get_long_running_output(pipeline_response): ) def _delete202_retry_invalid_header_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3386,7 +3386,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _delete_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3482,7 +3482,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _delete_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3578,7 +3578,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post202_retry_invalid_header_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3729,7 +3729,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3886,7 +3886,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_vendor.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_vendor.py index d74e3c6d01d..fcf80212404 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_vendor.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import LROWithParamaterizedEndpointsConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/_vendor.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/_vendor.py index 6a04cfda87e..65404a7e264 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/_vendor.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import LROWithParamaterizedEndpointsConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/_lro_with_paramaterized_endpoints_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/_lro_with_paramaterized_endpoints_operations.py index 237ec6469f1..20dc6647198 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/_lro_with_paramaterized_endpoints_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/_lro_with_paramaterized_endpoints_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterator, Callable, Dict, Literal, Optional, Type, TypeVar, Union, cast +from typing import Any, AsyncIterator, Callable, Dict, Literal, Optional, TypeVar, Union, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +46,7 @@ class LROWithParamaterizedEndpointsOperationsMixin( # pylint: disable=name-too- async def _poll_with_parameterized_endpoints_initial( # pylint: disable=name-too-long self, account_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -159,7 +158,7 @@ def get_long_running_output(pipeline_response): async def _poll_with_constant_parameterized_endpoints_initial( # pylint: disable=name-too-long self, account_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/_lro_with_paramaterized_endpoints_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/_lro_with_paramaterized_endpoints_operations.py index ccf6512c17c..c59f26d18ee 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/_lro_with_paramaterized_endpoints_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/_lro_with_paramaterized_endpoints_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterator, Literal, Optional, Type, TypeVar, Union, cast +from typing import Any, Callable, Dict, Iterator, Literal, Optional, TypeVar, Union, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +83,7 @@ class LROWithParamaterizedEndpointsOperationsMixin( # pylint: disable=name-too- def _poll_with_parameterized_endpoints_initial( # pylint: disable=name-too-long self, account_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -196,7 +195,7 @@ def get_long_running_output(pipeline_response): def _poll_with_constant_parameterized_endpoints_initial( # pylint: disable=name-too-long self, account_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_configuration.py index 953d2c5cc32..033b04e43c9 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_configuration.py @@ -13,11 +13,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MixedApiVersionClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MixedApiVersionClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MixedApiVersionClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_mixed_api_version_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_mixed_api_version_client.py index f76980d82a8..1d850490512 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_mixed_api_version_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_mixed_api_version_client.py @@ -30,7 +30,6 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/_configuration.py index 7fa4fbab5f4..c232c7a9f51 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/_configuration.py @@ -13,11 +13,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MixedApiVersionClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MixedApiVersionClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MixedApiVersionClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/_mixed_api_version_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/_mixed_api_version_client.py index 1cf1367dbd4..cb29ec9b7fa 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/_mixed_api_version_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/_mixed_api_version_client.py @@ -30,7 +30,6 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_default_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_default_operations.py index 1a161f983b3..14c9f37f0c8 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_default_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_default_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,14 +57,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_method_global_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -102,16 +101,14 @@ async def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_global_not_provided_valid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_method_global_not_provided_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -148,14 +145,14 @@ async def get_method_global_not_provided_valid( # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_path_global_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -192,14 +189,14 @@ async def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_global_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_local_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_local_operations.py index 29ff6a7fb1b..1bbccefc30d 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_local_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_local_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,14 +57,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_method_local_valid(self, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -102,9 +101,7 @@ async def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_local_null( # pylint: disable=inconsistent-return-statements - self, api_version: Optional[str] = None, **kwargs: Any - ) -> None: + async def get_method_local_null(self, api_version: Optional[str] = None, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = null to succeed. :param api_version: This should appear as a method parameter, use value null, this should @@ -114,7 +111,7 @@ async def get_method_local_null( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -150,14 +147,14 @@ async def get_method_local_null( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_path_local_valid(self, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -194,14 +191,14 @@ async def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_local_valid(self, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_header_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_header_operations.py index 5fc6a62080f..b24b8c00071 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_header_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_header_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,9 +55,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def custom_named_request_id( # pylint: disable=inconsistent-return-statements - self, foo_client_request_id: str, **kwargs: Any - ) -> None: + async def custom_named_request_id(self, foo_client_request_id: str, **kwargs: Any) -> None: """Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request. :param foo_client_request_id: The fooRequestId. Required. @@ -67,7 +64,7 @@ async def custom_named_request_id( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,7 +103,7 @@ async def custom_named_request_id( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def custom_named_request_id_param_grouping( # pylint: disable=inconsistent-return-statements + async def custom_named_request_id_param_grouping( self, header_custom_named_request_id_param_grouping_parameters: _models.HeaderCustomNamedRequestIdParamGroupingParameters, **kwargs: Any @@ -121,7 +118,7 @@ async def custom_named_request_id_param_grouping( # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -164,9 +161,7 @@ async def custom_named_request_id_param_grouping( # pylint: disable=inconsisten return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def custom_named_request_id_head( # pylint: disable=inconsistent-return-statements - self, foo_client_request_id: str, **kwargs: Any - ) -> None: + async def custom_named_request_id_head(self, foo_client_request_id: str, **kwargs: Any) -> None: """Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request. :param foo_client_request_id: The fooRequestId. Required. @@ -175,7 +170,7 @@ async def custom_named_request_id_head( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_http_success_operations.py index 1cba3591903..b2472b49604 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,14 +51,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head200(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head200(self, **kwargs: Any) -> None: """Return 200 status code if successful. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -93,14 +92,14 @@ async def head200(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head204(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head204(self, **kwargs: Any) -> None: """Return 204 status code if successful. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,14 +133,14 @@ async def head204(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head404(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head404(self, **kwargs: Any) -> None: """Return 404 status code if successful. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_odata_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_odata_operations.py index 2a9d96d8fbc..6b6b3a6b162 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_odata_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_odata_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_with_filter( # pylint: disable=inconsistent-return-statements + async def get_with_filter( self, filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any ) -> None: """Specify filter parameter with value '$filter=id gt 5 and name eq 'foo'&$orderby=id&$top=10'. @@ -68,7 +67,7 @@ async def get_with_filter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_skip_url_encoding_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_skip_url_encoding_operations.py index 6d0c0c28829..d972c7470c9 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_skip_url_encoding_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_skip_url_encoding_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,9 +60,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_method_path_valid( # pylint: disable=inconsistent-return-statements - self, unencoded_path_param: str, **kwargs: Any - ) -> None: + async def get_method_path_valid(self, unencoded_path_param: str, **kwargs: Any) -> None: """Get method with unencoded path parameter with value 'path1/path2/path3'. :param unencoded_path_param: Unencoded path parameter with value 'path1/path2/path3'. Required. @@ -72,7 +69,7 @@ async def get_method_path_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -108,9 +105,7 @@ async def get_method_path_valid( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_valid( # pylint: disable=inconsistent-return-statements - self, unencoded_path_param: str, **kwargs: Any - ) -> None: + async def get_path_valid(self, unencoded_path_param: str, **kwargs: Any) -> None: """Get method with unencoded path parameter with value 'path1/path2/path3'. :param unencoded_path_param: Unencoded path parameter with value 'path1/path2/path3'. Required. @@ -119,7 +114,7 @@ async def get_path_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -155,14 +150,14 @@ async def get_path_valid( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_path_valid(self, **kwargs: Any) -> None: """Get method with unencoded path parameter with value 'path1/path2/path3'. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -199,9 +194,7 @@ async def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_query_valid( # pylint: disable=inconsistent-return-statements - self, q1: str, **kwargs: Any - ) -> None: + async def get_method_query_valid(self, q1: str, **kwargs: Any) -> None: """Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3'. :param q1: Unencoded query parameter with value 'value1&q2=value2&q3=value3'. Required. @@ -210,7 +203,7 @@ async def get_method_query_valid( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -246,9 +239,7 @@ async def get_method_query_valid( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_query_null( # pylint: disable=inconsistent-return-statements - self, q1: Optional[str] = None, **kwargs: Any - ) -> None: + async def get_method_query_null(self, q1: Optional[str] = None, **kwargs: Any) -> None: """Get method with unencoded query parameter with value null. :param q1: Unencoded query parameter with value null. Default value is None. @@ -257,7 +248,7 @@ async def get_method_query_null( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -293,9 +284,7 @@ async def get_method_query_null( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_query_valid( # pylint: disable=inconsistent-return-statements - self, q1: str, **kwargs: Any - ) -> None: + async def get_path_query_valid(self, q1: str, **kwargs: Any) -> None: """Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3'. :param q1: Unencoded query parameter with value 'value1&q2=value2&q3=value3'. Required. @@ -304,7 +293,7 @@ async def get_path_query_valid( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -340,14 +329,14 @@ async def get_path_query_valid( # pylint: disable=inconsistent-return-statement return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_query_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_query_valid(self, **kwargs: Any) -> None: """Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3'. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_credentials_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_credentials_operations.py index c110856f1eb..fbaf6c0a23d 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_credentials_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_credentials_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,7 +58,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_method_global_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -67,7 +66,7 @@ async def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -103,7 +102,7 @@ async def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_method_global_null(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to null, and client-side validation should prevent you from making this call. @@ -111,7 +110,7 @@ async def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -147,9 +146,7 @@ async def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_method_global_not_provided_valid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def post_method_global_not_provided_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -157,7 +154,7 @@ async def post_method_global_not_provided_valid( # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -195,7 +192,7 @@ async def post_method_global_not_provided_valid( # pylint: disable=inconsistent return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_path_global_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -203,7 +200,7 @@ async def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -239,7 +236,7 @@ async def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_swagger_global_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -247,7 +244,7 @@ async def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_method_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_method_operations.py index 594696be054..312e95901e6 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_method_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_method_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,9 +56,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def post_method_local_valid( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_method_local_valid(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed. @@ -70,7 +67,7 @@ async def post_method_local_valid( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,9 +103,7 @@ async def post_method_local_valid( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_method_local_null( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_method_local_null(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = null, client-side validation should prevent you from making this call. @@ -119,7 +114,7 @@ async def post_method_local_null( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -155,9 +150,7 @@ async def post_method_local_null( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_path_local_valid( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_path_local_valid(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed. @@ -168,7 +161,7 @@ async def post_path_local_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,9 +197,7 @@ async def post_path_local_valid( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_swagger_local_valid( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_swagger_local_valid(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed. @@ -217,7 +208,7 @@ async def post_swagger_local_valid( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_xms_client_request_id_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_xms_client_request_id_operations.py index 06dba59b1ab..0b6c23172ef 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_xms_client_request_id_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_xms_client_request_id_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get(self, **kwargs: Any) -> None: """Get method that overwrites x-ms-client-request header with value 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. @@ -60,7 +59,7 @@ async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -94,9 +93,7 @@ async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def param_get( # pylint: disable=inconsistent-return-statements - self, x_ms_client_request_id: str, **kwargs: Any - ) -> None: + async def param_get(self, x_ms_client_request_id: str, **kwargs: Any) -> None: """Get method that overwrites x-ms-client-request header with value 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. @@ -107,7 +104,7 @@ async def param_get( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/models/_models_py3.py index 461823ddc5b..ec9deec55aa 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_default_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_default_operations.py index 841ab882163..bab3b17a793 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_default_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_default_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -141,7 +140,7 @@ def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -187,7 +186,7 @@ def get_method_global_not_provided_valid( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -231,7 +230,7 @@ def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -275,7 +274,7 @@ def get_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_local_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_local_operations.py index b06ae145899..af3bca46916 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_local_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_local_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -139,7 +138,7 @@ def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -188,7 +187,7 @@ def get_method_local_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -231,7 +230,7 @@ def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -275,7 +274,7 @@ def get_swagger_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_header_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_header_operations.py index 771d8232c43..420ed1e61f1 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_header_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_header_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -116,7 +115,7 @@ def custom_named_request_id( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -170,7 +169,7 @@ def custom_named_request_id_param_grouping( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -224,7 +223,7 @@ def custom_named_request_id_head( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_http_success_operations.py index be4e9d2bbf2..aef88d5f031 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -83,7 +82,7 @@ def head200(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -124,7 +123,7 @@ def head204(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ def head404(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_odata_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_odata_operations.py index d00927ef859..6b6df81631c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_odata_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_odata_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -97,7 +96,7 @@ def get_with_filter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_skip_url_encoding_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_skip_url_encoding_operations.py index 049ce7f4499..57456ea9fb8 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_skip_url_encoding_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_skip_url_encoding_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -199,7 +198,7 @@ def get_method_path_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -246,7 +245,7 @@ def get_path_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -289,7 +288,7 @@ def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -335,7 +334,7 @@ def get_method_query_valid(self, q1: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -382,7 +381,7 @@ def get_method_query_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -427,7 +426,7 @@ def get_path_query_valid(self, q1: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -470,7 +469,7 @@ def get_swagger_query_valid(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_credentials_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_credentials_operations.py index 247b3086957..87982aaf219 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_credentials_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_credentials_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -180,7 +179,7 @@ def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -224,7 +223,7 @@ def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,7 +269,7 @@ def post_method_global_not_provided_valid( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -316,7 +315,7 @@ def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -360,7 +359,7 @@ def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_method_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_method_operations.py index 9b9568a33ab..c740fc335f0 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_method_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_method_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -155,7 +154,7 @@ def post_method_local_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,7 +203,7 @@ def post_method_local_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +252,7 @@ def post_path_local_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -302,7 +301,7 @@ def post_swagger_local_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_xms_client_request_id_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_xms_client_request_id_operations.py index 4717ecec9e6..475d8a68497 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_xms_client_request_id_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_xms_client_request_id_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -86,7 +85,7 @@ def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -133,7 +132,7 @@ def param_get( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_configuration.py index 15f2813070c..d4df95918a1 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_configuration.py @@ -14,7 +14,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_head_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_head_client.py index 5092ad375cb..d2e74a53385 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_head_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_head_client.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/_configuration.py index 0331cbaa531..e047fb22c48 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/_configuration.py @@ -14,7 +14,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/_head_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/_head_client.py index e6d81002c87..bc260204d84 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/_head_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/_head_client.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/operations/_http_success_operations.py index 43210ceb754..24f98317d34 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/aio/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -141,7 +140,7 @@ async def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/operations/_http_success_operations.py index bfe736cccd1..7dcfb99d1a5 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/head/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_configuration.py index 9d15e3aa753..8bd1b980e4c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_configuration.py @@ -14,7 +14,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_paging_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_paging_client.py index fcdc76166bd..f2dbf8cf1de 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_paging_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_paging_client.py @@ -21,11 +21,10 @@ from .operations import PagingOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class PagingClient: # pylint: disable=client-accepts-api-version-keyword +class PagingClient: """Long-running Operation for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/_configuration.py index e44a8fc2a20..76259e4dec1 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/_configuration.py @@ -14,7 +14,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/_paging_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/_paging_client.py index 909859127ae..bd412b0ad45 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/_paging_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/_paging_client.py @@ -21,11 +21,10 @@ from .operations import PagingOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class PagingClient: # pylint: disable=client-accepts-api-version-keyword +class PagingClient: """Long-running Operation for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/operations/_paging_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/operations/_paging_operations.py index 292f1a263b3..9ecdf27b645 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/operations/_paging_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/aio/operations/_paging_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Literal, Optional, Type, TypeVar, Union, cast +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Literal, Optional, TypeVar, Union, cast import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -63,7 +63,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +100,7 @@ def get_no_item_name_pages(self, **kwargs: Any) -> AsyncIterable["_models.Produc cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -171,7 +171,7 @@ def get_empty_next_link_name_pages(self, **kwargs: Any) -> AsyncIterable["_model cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -242,7 +242,7 @@ def get_null_next_link_name_pages(self, **kwargs: Any) -> AsyncIterable["_models cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -313,7 +313,7 @@ def get_single_pages(self, **kwargs: Any) -> AsyncIterable["_models.Product"]: cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -389,7 +389,7 @@ def get_single_pages_with_body_params( content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -465,7 +465,7 @@ def first_response_empty(self, **kwargs: Any) -> AsyncIterable["_models.Product" cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -546,7 +546,7 @@ def get_multiple_pages( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +630,7 @@ def get_with_query_params(self, required_query_parameter: int, **kwargs: Any) -> query_constant: Literal[True] = kwargs.pop("query_constant", _params.pop("queryConstant", True)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -701,7 +701,7 @@ def duplicate_params(self, filter: Optional[str] = None, **kwargs: Any) -> Async cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -778,7 +778,7 @@ def page_with_max_page_size( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -860,7 +860,7 @@ def get_odata_multiple_pages( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -949,7 +949,7 @@ def get_multiple_pages_with_offset( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1032,7 +1032,7 @@ def get_multiple_pages_retry_first(self, **kwargs: Any) -> AsyncIterable["_model cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1104,7 +1104,7 @@ def get_multiple_pages_retry_second(self, **kwargs: Any) -> AsyncIterable["_mode cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1175,7 +1175,7 @@ def get_single_pages_failure(self, **kwargs: Any) -> AsyncIterable["_models.Prod cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1246,7 +1246,7 @@ def get_multiple_pages_failure(self, **kwargs: Any) -> AsyncIterable["_models.Pr cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1317,7 +1317,7 @@ def get_multiple_pages_failure_uri(self, **kwargs: Any) -> AsyncIterable["_model cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1394,7 +1394,7 @@ def get_multiple_pages_fragment_next_link( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1467,7 +1467,7 @@ def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1539,7 +1539,7 @@ async def _get_multiple_pages_lro_initial( paging_get_multiple_pages_lro_options: Optional[_models.PagingGetMultiplePagesLroOptions] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1617,7 +1617,7 @@ async def begin_get_multiple_pages_lro( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1736,7 +1736,7 @@ def append_api_version(self, **kwargs: Any) -> AsyncIterable["_models.Product"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1810,7 +1810,7 @@ def replace_api_version(self, **kwargs: Any) -> AsyncIterable["_models.Product"] api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1885,7 +1885,7 @@ def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=nam cls: ClsType[_models.ProductResultValueWithXMSClientName] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/models/_models_py3.py index 78e68725a16..e59e87a4ac9 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/operations/_paging_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/operations/_paging_operations.py index b7846e8f66f..59dfe4c12fb 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/operations/_paging_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/azure/packagemode/batch/paging/operations/_paging_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Iterator, Literal, Optional, Type, TypeVar, Union, cast +from typing import Any, Callable, Dict, Iterable, Iterator, Literal, Optional, TypeVar, Union, cast import urllib.parse from azure.core.exceptions import ( @@ -35,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -561,7 +561,7 @@ def get_no_item_name_pages(self, **kwargs: Any) -> Iterable["_models.Product"]: cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -632,7 +632,7 @@ def get_empty_next_link_name_pages(self, **kwargs: Any) -> Iterable["_models.Pro cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -703,7 +703,7 @@ def get_null_next_link_name_pages(self, **kwargs: Any) -> Iterable["_models.Prod cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -774,7 +774,7 @@ def get_single_pages(self, **kwargs: Any) -> Iterable["_models.Product"]: cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -850,7 +850,7 @@ def get_single_pages_with_body_params( content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -926,7 +926,7 @@ def first_response_empty(self, **kwargs: Any) -> Iterable["_models.Product"]: cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1007,7 +1007,7 @@ def get_multiple_pages( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1091,7 +1091,7 @@ def get_with_query_params(self, required_query_parameter: int, **kwargs: Any) -> query_constant: Literal[True] = kwargs.pop("query_constant", _params.pop("queryConstant", True)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1162,7 +1162,7 @@ def duplicate_params(self, filter: Optional[str] = None, **kwargs: Any) -> Itera cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1237,7 +1237,7 @@ def page_with_max_page_size(self, maxpagesize: Literal["5"] = "5", **kwargs: Any cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1319,7 +1319,7 @@ def get_odata_multiple_pages( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1408,7 +1408,7 @@ def get_multiple_pages_with_offset( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,7 +1491,7 @@ def get_multiple_pages_retry_first(self, **kwargs: Any) -> Iterable["_models.Pro cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1563,7 +1563,7 @@ def get_multiple_pages_retry_second(self, **kwargs: Any) -> Iterable["_models.Pr cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1634,7 +1634,7 @@ def get_single_pages_failure(self, **kwargs: Any) -> Iterable["_models.Product"] cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1705,7 +1705,7 @@ def get_multiple_pages_failure(self, **kwargs: Any) -> Iterable["_models.Product cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1776,7 +1776,7 @@ def get_multiple_pages_failure_uri(self, **kwargs: Any) -> Iterable["_models.Pro cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1853,7 +1853,7 @@ def get_multiple_pages_fragment_next_link( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1926,7 +1926,7 @@ def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1998,7 +1998,7 @@ def _get_multiple_pages_lro_initial( paging_get_multiple_pages_lro_options: Optional[_models.PagingGetMultiplePagesLroOptions] = None, **kwargs: Any, ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2075,7 +2075,7 @@ def begin_get_multiple_pages_lro( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2194,7 +2194,7 @@ def append_api_version(self, **kwargs: Any) -> Iterable["_models.Product"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2268,7 +2268,7 @@ def replace_api_version(self, **kwargs: Any) -> Iterable["_models.Product"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2343,7 +2343,7 @@ def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=nam cls: ClsType[_models.ProductResultValueWithXMSClientName] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_auto_rest_head_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_auto_rest_head_test_service.py index 9e259edf8e2..93ac374c1a6 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_auto_rest_head_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_auto_rest_head_test_service.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_configuration.py index 65652a9c78b..324ccb91377 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_auto_rest_head_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_auto_rest_head_test_service.py index 8fdb080724e..1f93f1ab517 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_auto_rest_head_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_auto_rest_head_test_service.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_configuration.py index ac21ed3ee48..760fd07dde7 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/operations/_http_success_operations.py index 354824f020c..2cc135b7505 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -141,7 +140,7 @@ async def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/operations/_http_success_operations.py index c18ceda95a8..3a8affc5335 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_auto_rest_head_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_auto_rest_head_test_service.py index 3283fde2d4b..8ca48def439 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_auto_rest_head_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_auto_rest_head_test_service.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_configuration.py index 9a4a2a64445..98aacce06e2 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/_auto_rest_head_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/_auto_rest_head_test_service.py index af11f97fbac..ed6c50e3431 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/_auto_rest_head_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/_auto_rest_head_test_service.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/_configuration.py index 1f7137331d6..77ae83f120a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/operations/_http_success_operations.py index e2aa1fc34c3..2e23b4a152e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/aio/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -141,7 +140,7 @@ async def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/operations/_http_success_operations.py index 2119536e424..32d475d7441 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/azure/packagemode/dataplane/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_auto_rest_head_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_auto_rest_head_test_service.py index e5a069e0540..d85b03c5d94 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_auto_rest_head_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_auto_rest_head_test_service.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_configuration.py index 866cd80bc48..bcea9236f9a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_auto_rest_head_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_auto_rest_head_test_service.py index 328bdc502cd..a177749b512 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_auto_rest_head_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_auto_rest_head_test_service.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_configuration.py index dc26af05402..bf9cd134ba9 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/operations/_http_success_operations.py index 5b25e1378e7..26485318c67 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -141,7 +140,7 @@ async def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/operations/_http_success_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/operations/_http_success_operations.py index 106c09b3831..be9d6dab33b 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/operations/_http_success_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/operations/_http_success_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_auto_rest_paging_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_auto_rest_paging_test_service.py index 34a1a500384..ebee4e8f560 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_auto_rest_paging_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_auto_rest_paging_test_service.py @@ -20,7 +20,7 @@ from .operations import PagingOperations -class AutoRestPagingTestService: # pylint: disable=client-accepts-api-version-keyword +class AutoRestPagingTestService: """Long-running Operation for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_configuration.py index aa1e7060f12..2a82930bf24 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestPagingTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/_auto_rest_paging_test_service.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/_auto_rest_paging_test_service.py index 6c78a646e1d..efee2671b49 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/_auto_rest_paging_test_service.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/_auto_rest_paging_test_service.py @@ -20,7 +20,7 @@ from .operations import PagingOperations -class AutoRestPagingTestService: # pylint: disable=client-accepts-api-version-keyword +class AutoRestPagingTestService: """Long-running Operation for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/_configuration.py index 1bf6720524c..3b70fdd7d9e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestPagingTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/operations/_paging_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/operations/_paging_operations.py index 72f7856b376..2c90f013322 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/operations/_paging_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/aio/operations/_paging_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Literal, Optional, Type, TypeVar, Union, cast +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Literal, Optional, TypeVar, Union, cast import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -62,7 +62,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +99,7 @@ def get_no_item_name_pages(self, **kwargs: Any) -> AsyncIterable["_models.Produc cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -170,7 +170,7 @@ def get_empty_next_link_name_pages(self, **kwargs: Any) -> AsyncIterable["_model cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -241,7 +241,7 @@ def get_null_next_link_name_pages(self, **kwargs: Any) -> AsyncIterable["_models cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -312,7 +312,7 @@ def get_single_pages(self, **kwargs: Any) -> AsyncIterable["_models.Product"]: cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -388,7 +388,7 @@ def get_single_pages_with_body_params( content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -464,7 +464,7 @@ def first_response_empty(self, **kwargs: Any) -> AsyncIterable["_models.Product" cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -544,7 +544,7 @@ def get_multiple_pages( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -628,7 +628,7 @@ def get_with_query_params(self, required_query_parameter: int, **kwargs: Any) -> query_constant: Literal[True] = kwargs.pop("query_constant", _params.pop("queryConstant", True)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -699,7 +699,7 @@ def duplicate_params(self, filter: Optional[str] = None, **kwargs: Any) -> Async cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +776,7 @@ def page_with_max_page_size( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -858,7 +858,7 @@ def get_odata_multiple_pages( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -947,7 +947,7 @@ def get_multiple_pages_with_offset( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1030,7 +1030,7 @@ def get_multiple_pages_retry_first(self, **kwargs: Any) -> AsyncIterable["_model cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1102,7 +1102,7 @@ def get_multiple_pages_retry_second(self, **kwargs: Any) -> AsyncIterable["_mode cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1173,7 +1173,7 @@ def get_single_pages_failure(self, **kwargs: Any) -> AsyncIterable["_models.Prod cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1244,7 +1244,7 @@ def get_multiple_pages_failure(self, **kwargs: Any) -> AsyncIterable["_models.Pr cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1315,7 +1315,7 @@ def get_multiple_pages_failure_uri(self, **kwargs: Any) -> AsyncIterable["_model cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1392,7 +1392,7 @@ def get_multiple_pages_fragment_next_link( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1465,7 +1465,7 @@ def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1537,7 +1537,7 @@ async def _get_multiple_pages_lro_initial( paging_get_multiple_pages_lro_options: Optional[_models.PagingGetMultiplePagesLroOptions] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1613,7 +1613,7 @@ async def begin_get_multiple_pages_lro( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1732,7 +1732,7 @@ def append_api_version(self, **kwargs: Any) -> AsyncIterable["_models.Product"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1806,7 +1806,7 @@ def replace_api_version(self, **kwargs: Any) -> AsyncIterable["_models.Product"] api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1881,7 @@ def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=nam cls: ClsType[_models.ProductResultValueWithXMSClientName] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/models/_models_py3.py index 18423fc34a7..54d8bfc2674 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/operations/_paging_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/operations/_paging_operations.py index 3c85c71b68f..5a4d00e042c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/operations/_paging_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/paging/operations/_paging_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Iterator, Literal, Optional, Type, TypeVar, Union, cast +from typing import Any, Callable, Dict, Iterable, Iterator, Literal, Optional, TypeVar, Union, cast import urllib.parse from azure.core.exceptions import ( @@ -34,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -560,7 +560,7 @@ def get_no_item_name_pages(self, **kwargs: Any) -> Iterable["_models.Product"]: cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -631,7 +631,7 @@ def get_empty_next_link_name_pages(self, **kwargs: Any) -> Iterable["_models.Pro cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -702,7 +702,7 @@ def get_null_next_link_name_pages(self, **kwargs: Any) -> Iterable["_models.Prod cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -773,7 +773,7 @@ def get_single_pages(self, **kwargs: Any) -> Iterable["_models.Product"]: cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -849,7 +849,7 @@ def get_single_pages_with_body_params( content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -925,7 +925,7 @@ def first_response_empty(self, **kwargs: Any) -> Iterable["_models.Product"]: cls: ClsType[_models.ProductResultValue] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1005,7 +1005,7 @@ def get_multiple_pages( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1089,7 +1089,7 @@ def get_with_query_params(self, required_query_parameter: int, **kwargs: Any) -> query_constant: Literal[True] = kwargs.pop("query_constant", _params.pop("queryConstant", True)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1160,7 +1160,7 @@ def duplicate_params(self, filter: Optional[str] = None, **kwargs: Any) -> Itera cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1235,7 +1235,7 @@ def page_with_max_page_size(self, maxpagesize: Literal["5"] = "5", **kwargs: Any cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1317,7 +1317,7 @@ def get_odata_multiple_pages( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1406,7 +1406,7 @@ def get_multiple_pages_with_offset( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1489,7 +1489,7 @@ def get_multiple_pages_retry_first(self, **kwargs: Any) -> Iterable["_models.Pro cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1561,7 +1561,7 @@ def get_multiple_pages_retry_second(self, **kwargs: Any) -> Iterable["_models.Pr cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1632,7 +1632,7 @@ def get_single_pages_failure(self, **kwargs: Any) -> Iterable["_models.Product"] cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1703,7 +1703,7 @@ def get_multiple_pages_failure(self, **kwargs: Any) -> Iterable["_models.Product cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1774,7 +1774,7 @@ def get_multiple_pages_failure_uri(self, **kwargs: Any) -> Iterable["_models.Pro cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1851,7 +1851,7 @@ def get_multiple_pages_fragment_next_link( cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1924,7 +1924,7 @@ def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name cls: ClsType[_models.OdataProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1996,7 +1996,7 @@ def _get_multiple_pages_lro_initial( paging_get_multiple_pages_lro_options: Optional[_models.PagingGetMultiplePagesLroOptions] = None, **kwargs: Any, ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2071,7 +2071,7 @@ def begin_get_multiple_pages_lro( cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2190,7 +2190,7 @@ def append_api_version(self, **kwargs: Any) -> Iterable["_models.Product"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2264,7 +2264,7 @@ def replace_api_version(self, **kwargs: Any) -> Iterable["_models.Product"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2339,7 +2339,7 @@ def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=nam cls: ClsType[_models.ProductResultValueWithXMSClientName] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py index eb432032532..0f2c73ace6e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py @@ -20,7 +20,6 @@ from .operations import AutorestSecurityAadOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_configuration.py index 2e82a780bd1..0ab52967b72 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityAad. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_vendor.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_vendor.py index 307a2440f73..4bac3abea25 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_vendor.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityAadConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py index a5351885bc7..7e09253ccaa 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py @@ -20,7 +20,6 @@ from .operations import AutorestSecurityAadOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_configuration.py index 35b2a09d286..c986d3fc882 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityAad. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_vendor.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_vendor.py index 8e6e310bac2..3b07efefdc0 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_vendor.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityAadConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/_autorest_security_aad_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/_autorest_security_aad_operations.py index 68aa784faad..755225894c0 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/_autorest_security_aad_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/_autorest_security_aad_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +42,7 @@ async def head(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/_autorest_security_aad_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/_autorest_security_aad_operations.py index f8eb18d7e90..c484c46ef01 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/_autorest_security_aad_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/_autorest_security_aad_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +52,7 @@ def head(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py index 7399772208a..a51437f9b75 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py @@ -20,7 +20,6 @@ from .operations import AutorestSecurityKeyOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_configuration.py index 10abee73b5b..eb2808c7045 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityKey. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_vendor.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_vendor.py index 9fb96a324c5..d615edd04da 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_vendor.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityKeyConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py index 94812504074..d67fea48a5f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py @@ -20,7 +20,6 @@ from .operations import AutorestSecurityKeyOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_configuration.py index 28226b8d484..97706eb0b0f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityKey. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_vendor.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_vendor.py index 7b331844629..cf209892619 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_vendor.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityKeyConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/_autorest_security_key_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/_autorest_security_key_operations.py index c233dc8740a..c86f2e170ba 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/_autorest_security_key_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/_autorest_security_key_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +42,7 @@ async def head(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/_autorest_security_key_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/_autorest_security_key_operations.py index 04009642521..de0bfd8910e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/_autorest_security_key_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/_autorest_security_key_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +52,7 @@ def head(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_configuration.py index d019a9b08c4..6bf7e5e9dbf 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class StorageManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class StorageManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for StorageManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_storage_management_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_storage_management_client.py index 1c4e83cec6a..15cd0c02586 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_storage_management_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/_storage_management_client.py @@ -21,11 +21,10 @@ from .operations import StorageAccountsOperations, UsageOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class StorageManagementClient: # pylint: disable=client-accepts-api-version-keyword +class StorageManagementClient: """StorageManagementClient. :ivar storage_accounts: StorageAccountsOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/_configuration.py index c4abd79fa65..c5127f4dcc9 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class StorageManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class StorageManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for StorageManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/_storage_management_client.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/_storage_management_client.py index f5bd7fdca0a..3ffe8e39988 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/_storage_management_client.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/_storage_management_client.py @@ -21,11 +21,10 @@ from .operations import StorageAccountsOperations, UsageOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class StorageManagementClient: # pylint: disable=client-accepts-api-version-keyword +class StorageManagementClient: """StorageManagementClient. :ivar storage_accounts: StorageAccountsOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations/_storage_accounts_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations/_storage_accounts_operations.py index 8d72f8e35c4..192d7b020e9 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations/_storage_accounts_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations/_storage_accounts_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -47,7 +46,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -126,7 +125,7 @@ async def check_name_availability( :rtype: ~storage.models.CheckNameAvailabilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -185,7 +184,7 @@ async def _create_initial( parameters: Union[_models.StorageAccountCreateParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -386,9 +385,7 @@ def get_long_running_output(pipeline_response): ) @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, account_name: str, **kwargs: Any) -> None: """Deletes a storage account in Microsoft Azure. :param resource_group_name: The name of the resource group within the user’s subscription. @@ -402,7 +399,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -459,7 +456,7 @@ async def get_properties( :rtype: ~storage.models.StorageAccount :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -604,7 +601,7 @@ async def update( :rtype: ~storage.models.StorageAccount :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -671,7 +668,7 @@ async def list_keys(self, resource_group_name: str, account_name: str, **kwargs: :rtype: ~storage.models.StorageAccountKeys :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -728,7 +725,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.StorageAccount"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageAccountListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -808,7 +805,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageAccountListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -892,7 +889,7 @@ async def regenerate_key( :rtype: ~storage.models.StorageAccountKeys :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations/_usage_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations/_usage_operations.py index e4adefa31fe..f585e361301 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations/_usage_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations/_usage_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def list(self, **kwargs: Any) -> _models.UsageListResult: :rtype: ~storage.models.UsageListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/models/_models_py3.py index faab51a6a45..106d61a2a65 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_storage_accounts_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_storage_accounts_operations.py index 7302cc1e13c..9e7aa6b718c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_storage_accounts_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_storage_accounts_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -388,7 +388,7 @@ def check_name_availability( :rtype: ~storage.models.CheckNameAvailabilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -447,7 +447,7 @@ def _create_initial( parameters: Union[_models.StorageAccountCreateParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -664,7 +664,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -719,7 +719,7 @@ def get_properties(self, resource_group_name: str, account_name: str, **kwargs: :rtype: ~storage.models.StorageAccount :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -864,7 +864,7 @@ def update( :rtype: ~storage.models.StorageAccount :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -931,7 +931,7 @@ def list_keys(self, resource_group_name: str, account_name: str, **kwargs: Any) :rtype: ~storage.models.StorageAccountKeys :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -988,7 +988,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.StorageAccount"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageAccountListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1066,7 +1066,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageAccountListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1150,7 +1150,7 @@ def regenerate_key( :rtype: ~storage.models.StorageAccountKeys :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_usage_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_usage_operations.py index 87a3e25636d..eebb5e76247 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_usage_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_usage_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -88,7 +87,7 @@ def list(self, **kwargs: Any) -> _models.UsageListResult: :rtype: ~storage.models.UsageListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_configuration.py index 3c0d0309bfe..5744b8fbffd 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MicrosoftAzureTestUrlConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MicrosoftAzureTestUrlConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MicrosoftAzureTestUrl. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_microsoft_azure_test_url.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_microsoft_azure_test_url.py index 299245a7339..5aa52444bb6 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_microsoft_azure_test_url.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_microsoft_azure_test_url.py @@ -21,11 +21,10 @@ from .operations import GroupOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MicrosoftAzureTestUrl: # pylint: disable=client-accepts-api-version-keyword +class MicrosoftAzureTestUrl: """Some cool documentation. :ivar group: GroupOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_serialization.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_serialization.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/_configuration.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/_configuration.py index 844e96aebee..75c6afa1848 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/_configuration.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MicrosoftAzureTestUrlConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MicrosoftAzureTestUrlConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MicrosoftAzureTestUrl. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/_microsoft_azure_test_url.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/_microsoft_azure_test_url.py index aac769bc747..e39c6b64eb4 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/_microsoft_azure_test_url.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/_microsoft_azure_test_url.py @@ -21,11 +21,10 @@ from .operations import GroupOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MicrosoftAzureTestUrl: # pylint: disable=client-accepts-api-version-keyword +class MicrosoftAzureTestUrl: """Some cool documentation. :ivar group: GroupOperations operations diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/operations/_group_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/operations/_group_operations.py index fdde88b39f9..c304077a461 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/operations/_group_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/operations/_group_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,7 +62,7 @@ async def get_sample_resource_group(self, resource_group_name: str, **kwargs: An :rtype: ~subscriptionidapiversion.models.SampleResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/models/_models_py3.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/models/_models_py3.py index b6050eb3768..07b665ae8e2 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/models/_models_py3.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/operations/_group_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/operations/_group_operations.py index 9ecc9625ae2..5c8906aee87 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/operations/_group_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/operations/_group_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -93,7 +92,7 @@ def get_sample_resource_group(self, resource_group_name: str, **kwargs: Any) -> :rtype: ~subscriptionidapiversion.models.SampleResourceGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/_configuration.py index e4448ee79b4..4c8dabf1a84 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDurationTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/aio/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/aio/_configuration.py index 131a151c25e..2720ec54e59 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDurationTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/aio/operations/_operations.py index 8dfb2ecba7a..379bb1772b9 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,7 +62,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: :rtype: ~datetime.timedelta or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -104,9 +103,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: return cast(Optional[datetime.timedelta], deserialized) # type: ignore @distributed_trace_async - async def put_positive_duration( # pylint: disable=inconsistent-return-statements - self, duration_body: datetime.timedelta, **kwargs: Any - ) -> None: + async def put_positive_duration(self, duration_body: datetime.timedelta, **kwargs: Any) -> None: """Put a positive duration value. :param duration_body: duration body. Required. @@ -115,7 +112,7 @@ async def put_positive_duration( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,7 +158,7 @@ async def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -209,7 +206,7 @@ async def get_invalid(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/operations/_operations.py index c20b83b87d6..bcede623ea1 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/bodydurationversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -122,7 +121,7 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: :rtype: ~datetime.timedelta or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -174,7 +173,7 @@ def put_positive_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,7 +219,7 @@ def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +267,7 @@ def get_invalid(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/aio/operations/_operations.py index fda018a11a7..a18f83bc747 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def post_required( # pylint: disable=inconsistent-return-statements + async def post_required( self, path: str, body: int, *, custom_header: Optional[str] = None, query: int = 30, **kwargs: Any ) -> None: """Post a bunch of required parameters grouped. @@ -74,7 +73,7 @@ async def post_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -116,9 +115,7 @@ async def post_required( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional( # pylint: disable=inconsistent-return-statements - self, *, custom_header: Optional[str] = None, query: int = 30, **kwargs: Any - ) -> None: + async def post_optional(self, *, custom_header: Optional[str] = None, query: int = 30, **kwargs: Any) -> None: """Post a bunch of optional parameters grouped. :keyword custom_header: Default value is None. @@ -129,7 +126,7 @@ async def post_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +162,7 @@ async def post_optional( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_reserved_words( # pylint: disable=inconsistent-return-statements + async def post_reserved_words( self, *, from_parameter: Optional[str] = None, accept_parameter: Optional[str] = None, **kwargs: Any ) -> None: """Post a grouped parameters with reserved words. @@ -180,7 +177,7 @@ async def post_reserved_words( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -216,7 +213,7 @@ async def post_reserved_words( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_multi_param_groups( # pylint: disable=inconsistent-return-statements + async def post_multi_param_groups( self, *, header_one: Optional[str] = None, @@ -239,7 +236,7 @@ async def post_multi_param_groups( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -277,7 +274,7 @@ async def post_multi_param_groups( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_shared_parameter_group_object( # pylint: disable=inconsistent-return-statements + async def post_shared_parameter_group_object( self, *, header_one: Optional[str] = None, query_one: int = 30, **kwargs: Any ) -> None: """Post parameters with a shared parameter group object. @@ -290,7 +287,7 @@ async def post_shared_parameter_group_object( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -326,7 +323,7 @@ async def post_shared_parameter_group_object( # pylint: disable=inconsistent-re return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def group_with_constant( # pylint: disable=inconsistent-return-statements + async def group_with_constant( self, *, grouped_constant: Optional[Literal["foo"]] = None, @@ -346,7 +343,7 @@ async def group_with_constant( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/operations/_operations.py index ef18b2a5e09..64546eab3ef 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/azureparametergroupingversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -216,7 +215,7 @@ def post_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -271,7 +270,7 @@ def post_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -322,7 +321,7 @@ def post_reserved_words( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -381,7 +380,7 @@ def post_multi_param_groups( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -432,7 +431,7 @@ def post_shared_parameter_group_object( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -488,7 +487,7 @@ def group_with_constant( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_operations/_operations.py index f49954ce9ca..79cca230776 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def get_report(self, *, qualifier: Optional[str] = None, **kwargs: Any) -> Dict[ "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_vendor.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_vendor.py index f2b160bbc2a..3af6dbaa6be 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_vendor.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestReportServiceForAzureConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_operations/_operations.py index ef01bda31c5..3fe23841171 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +55,7 @@ async def get_report(self, *, qualifier: Optional[str] = None, **kwargs: Any) -> "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_vendor.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_vendor.py index cff94c45790..769b210a071 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestReportServiceForAzureConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_client.py index 7136681afa8..b05fb768ab6 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_client.py @@ -29,11 +29,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestAzureSpecialParametersTestClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class AutoRestAzureSpecialParametersTestClient: # pylint: disable=too-many-instance-attributes """Test Infrastructure for AutoRest. :ivar xms_client_request_id: XMsClientRequestIdOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_configuration.py index 1cfe48aaede..406dedcbca3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_configuration.py @@ -14,7 +14,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/_client.py index 42515d2464a..391f9391905 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/_client.py @@ -29,11 +29,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestAzureSpecialParametersTestClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class AutoRestAzureSpecialParametersTestClient: # pylint: disable=too-many-instance-attributes """Test Infrastructure for AutoRest. :ivar xms_client_request_id: XMsClientRequestIdOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/_configuration.py index d77470317cf..aa478fab72e 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/_configuration.py @@ -14,7 +14,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/operations/_operations.py index cfe3057fdf6..53289c28751 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -59,7 +59,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -82,7 +82,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get(self, **kwargs: Any) -> None: """Get method that overwrites x-ms-client-request header with value 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. @@ -90,7 +90,7 @@ async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -124,7 +124,7 @@ async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def param_get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def param_get(self, **kwargs: Any) -> None: """Get method that overwrites x-ms-client-request header with value 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. @@ -132,7 +132,7 @@ async def param_get(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -184,7 +184,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_method_global_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -192,7 +192,7 @@ async def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -227,7 +227,7 @@ async def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_method_global_null(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to null, and client-side validation should prevent you from making this call. @@ -235,7 +235,7 @@ async def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,9 +270,7 @@ async def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_method_global_not_provided_valid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def post_method_global_not_provided_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -280,7 +278,7 @@ async def post_method_global_not_provided_valid( # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -316,7 +314,7 @@ async def post_method_global_not_provided_valid( # pylint: disable=inconsistent return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_path_global_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -324,7 +322,7 @@ async def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -359,7 +357,7 @@ async def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def post_swagger_global_valid(self, **kwargs: Any) -> None: """POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. @@ -367,7 +365,7 @@ async def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -420,9 +418,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def post_method_local_valid( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_method_local_valid(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed. @@ -433,7 +429,7 @@ async def post_method_local_valid( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,9 +464,7 @@ async def post_method_local_valid( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_method_local_null( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_method_local_null(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = null, client-side validation should prevent you from making this call. @@ -481,7 +475,7 @@ async def post_method_local_null( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -516,9 +510,7 @@ async def post_method_local_null( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_path_local_valid( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_path_local_valid(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed. @@ -529,7 +521,7 @@ async def post_path_local_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -564,9 +556,7 @@ async def post_path_local_valid( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_swagger_local_valid( # pylint: disable=inconsistent-return-statements - self, subscription_id: str, **kwargs: Any - ) -> None: + async def post_swagger_local_valid(self, subscription_id: str, **kwargs: Any) -> None: """POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed. @@ -577,7 +567,7 @@ async def post_swagger_local_valid( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,14 +620,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_method_global_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -672,16 +662,14 @@ async def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_global_not_provided_valid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_method_global_not_provided_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -716,14 +704,14 @@ async def get_method_global_not_provided_valid( # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_path_global_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -758,14 +746,14 @@ async def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_global_valid(self, **kwargs: Any) -> None: """GET method with api-version modeled in global settings. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -818,14 +806,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_method_local_valid(self, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -861,9 +849,7 @@ async def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_local_null( # pylint: disable=inconsistent-return-statements - self, *, api_version: Optional[str] = None, **kwargs: Any - ) -> None: + async def get_method_local_null(self, *, api_version: Optional[str] = None, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = null to succeed. :keyword api_version: This should appear as a method parameter, use value null, this should @@ -873,7 +859,7 @@ async def get_method_local_null( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -908,14 +894,14 @@ async def get_method_local_null( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_path_local_valid(self, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -951,14 +937,14 @@ async def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_local_valid(self, **kwargs: Any) -> None: """Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1012,9 +998,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_method_path_valid( # pylint: disable=inconsistent-return-statements - self, unencoded_path_param: str, **kwargs: Any - ) -> None: + async def get_method_path_valid(self, unencoded_path_param: str, **kwargs: Any) -> None: """Get method with unencoded path parameter with value 'path1/path2/path3'. :param unencoded_path_param: Unencoded path parameter with value 'path1/path2/path3'. Required. @@ -1023,7 +1007,7 @@ async def get_method_path_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1058,9 +1042,7 @@ async def get_method_path_valid( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_valid( # pylint: disable=inconsistent-return-statements - self, unencoded_path_param: str, **kwargs: Any - ) -> None: + async def get_path_valid(self, unencoded_path_param: str, **kwargs: Any) -> None: """Get method with unencoded path parameter with value 'path1/path2/path3'. :param unencoded_path_param: Unencoded path parameter with value 'path1/path2/path3'. Required. @@ -1069,7 +1051,7 @@ async def get_path_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1104,14 +1086,14 @@ async def get_path_valid( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_path_valid(self, **kwargs: Any) -> None: """Get method with unencoded path parameter with value 'path1/path2/path3'. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1147,9 +1129,7 @@ async def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_query_valid( # pylint: disable=inconsistent-return-statements - self, *, q1: str, **kwargs: Any - ) -> None: + async def get_method_query_valid(self, *, q1: str, **kwargs: Any) -> None: """Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3'. :keyword q1: Unencoded query parameter with value 'value1&q2=value2&q3=value3'. Required. @@ -1158,7 +1138,7 @@ async def get_method_query_valid( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1193,9 +1173,7 @@ async def get_method_query_valid( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_method_query_null( # pylint: disable=inconsistent-return-statements - self, *, q1: Optional[str] = None, **kwargs: Any - ) -> None: + async def get_method_query_null(self, *, q1: Optional[str] = None, **kwargs: Any) -> None: """Get method with unencoded query parameter with value null. :keyword q1: Unencoded query parameter with value null. Default value is None. @@ -1204,7 +1182,7 @@ async def get_method_query_null( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1239,9 +1217,7 @@ async def get_method_query_null( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_path_query_valid( # pylint: disable=inconsistent-return-statements - self, *, q1: str, **kwargs: Any - ) -> None: + async def get_path_query_valid(self, *, q1: str, **kwargs: Any) -> None: """Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3'. :keyword q1: Unencoded query parameter with value 'value1&q2=value2&q3=value3'. Required. @@ -1250,7 +1226,7 @@ async def get_path_query_valid( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1285,14 +1261,14 @@ async def get_path_query_valid( # pylint: disable=inconsistent-return-statement return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_swagger_query_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_swagger_query_valid(self, **kwargs: Any) -> None: """Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3'. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1346,7 +1322,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_with_filter( # pylint: disable=inconsistent-return-statements + async def get_with_filter( self, *, filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any ) -> None: """Specify filter parameter with value '$filter=id gt 5 and name eq 'foo'&$orderby=id&$top=10'. @@ -1362,7 +1338,7 @@ async def get_with_filter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1417,9 +1393,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def custom_named_request_id( # pylint: disable=inconsistent-return-statements - self, *, foo_client_request_id: str, **kwargs: Any - ) -> None: + async def custom_named_request_id(self, *, foo_client_request_id: str, **kwargs: Any) -> None: """Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request. :keyword foo_client_request_id: The fooRequestId. Required. @@ -1428,7 +1402,7 @@ async def custom_named_request_id( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1466,9 +1440,7 @@ async def custom_named_request_id( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def custom_named_request_id_param_grouping( # pylint: disable=inconsistent-return-statements - self, *, foo_client_request_id: str, **kwargs: Any - ) -> None: + async def custom_named_request_id_param_grouping(self, *, foo_client_request_id: str, **kwargs: Any) -> None: """Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request, via a parameter group. @@ -1478,7 +1450,7 @@ async def custom_named_request_id_param_grouping( # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1525,7 +1497,7 @@ async def custom_named_request_id_head(self, *, foo_client_request_id: str, **kw :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/operations/_operations.py index b6acafc9c32..e1428fbe166 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/azurespecialpropertiesversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -667,7 +667,7 @@ def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -709,7 +709,7 @@ def param_get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -769,7 +769,7 @@ def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -812,7 +812,7 @@ def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -857,7 +857,7 @@ def post_method_global_not_provided_valid( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -901,7 +901,7 @@ def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -944,7 +944,7 @@ def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1010,7 +1010,7 @@ def post_method_local_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1058,7 +1058,7 @@ def post_method_local_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1106,7 +1106,7 @@ def post_path_local_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1154,7 +1154,7 @@ def post_swagger_local_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1214,7 +1214,7 @@ def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1258,7 +1258,7 @@ def get_method_global_not_provided_valid( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1300,7 +1300,7 @@ def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1342,7 +1342,7 @@ def get_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1402,7 +1402,7 @@ def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1450,7 +1450,7 @@ def get_method_local_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1492,7 +1492,7 @@ def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1535,7 +1535,7 @@ def get_swagger_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1600,7 +1600,7 @@ def get_method_path_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1646,7 +1646,7 @@ def get_path_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1688,7 +1688,7 @@ def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1735,7 +1735,7 @@ def get_method_query_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1781,7 +1781,7 @@ def get_method_query_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1825,7 +1825,7 @@ def get_path_query_valid(self, *, q1: str, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1867,7 +1867,7 @@ def get_swagger_query_valid(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1937,7 +1937,7 @@ def get_with_filter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2003,7 +2003,7 @@ def custom_named_request_id( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2053,7 +2053,7 @@ def custom_named_request_id_param_grouping( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2100,7 +2100,7 @@ def custom_named_request_id_head(self, *, foo_client_request_id: str, **kwargs: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/aio/operations/_operations.py index 34632561c6a..0cbf7f295c4 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,9 +48,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_empty( # pylint: disable=inconsistent-return-statements - self, account_name: str, **kwargs: Any - ) -> None: + async def get_empty(self, account_name: str, **kwargs: Any) -> None: """Get a 200 to test a valid base uri. :param account_name: Account Name. Required. @@ -60,7 +57,7 @@ async def get_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/operations/_operations.py index 28fb855b4c1..caf18682d14 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -76,7 +75,7 @@ def get_empty(self, account_name: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_client.py index 6510c955327..d7a04dd6f5b 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_client.py @@ -20,11 +20,10 @@ from .operations import PagingOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestPagingTestService: # pylint: disable=client-accepts-api-version-keyword +class AutoRestPagingTestService: """Long-running Operation for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_configuration.py index f14de15c44b..98ee18d1b0a 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestPagingTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_client.py index f6d3431c2d6..c494d8fe3f7 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_client.py @@ -20,11 +20,10 @@ from .operations import PagingOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestPagingTestService: # pylint: disable=client-accepts-api-version-keyword +class AutoRestPagingTestService: """Long-running Operation for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_configuration.py index 8be59dd94c6..9a3ca65e953 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestPagingTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/operations/_operations.py index 09e728aee04..d1e93371e9d 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -17,7 +17,6 @@ IO, Literal, Optional, - Type, TypeVar, Union, cast, @@ -79,7 +78,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -126,7 +125,7 @@ def get_no_item_name_pages(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -208,7 +207,7 @@ def get_empty_next_link_name_pages(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -290,7 +289,7 @@ def get_null_next_link_name_pages(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -372,7 +371,7 @@ def get_single_pages(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -524,7 +523,7 @@ def get_single_pages_with_body_params( content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -617,7 +616,7 @@ def first_response_empty(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +706,7 @@ def get_multiple_pages( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -796,7 +795,7 @@ def get_with_query_params(self, *, required_query_parameter: int, **kwargs: Any) query_constant: Literal[True] = kwargs.pop("query_constant", _params.pop("queryConstant", True)) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -878,7 +877,7 @@ def duplicate_params(self, *, filter: Optional[str] = None, **kwargs: Any) -> As cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -962,7 +961,7 @@ def page_with_max_page_size(self, **kwargs: Any) -> AsyncIterable[JSON]: maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1053,7 +1052,7 @@ def get_odata_multiple_pages( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1147,7 +1146,7 @@ def get_multiple_pages_with_offset( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1233,7 +1232,7 @@ def get_multiple_pages_retry_first(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1316,7 +1315,7 @@ def get_multiple_pages_retry_second(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1398,7 +1397,7 @@ def get_single_pages_failure(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1480,7 +1479,7 @@ def get_multiple_pages_failure(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1562,7 +1561,7 @@ def get_multiple_pages_failure_uri(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1650,7 +1649,7 @@ def get_multiple_pages_fragment_next_link( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1736,7 +1735,7 @@ def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1795,7 +1794,7 @@ async def get_next(next_link=None): async def _get_multiple_pages_lro_initial( self, *, maxresults: Optional[int] = None, timeout: int = 30, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1872,7 +1871,7 @@ async def begin_get_multiple_pages_lro( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1995,7 +1994,7 @@ def append_api_version(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2079,7 +2078,7 @@ def replace_api_version(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2165,7 +2164,7 @@ def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=nam cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/operations/_operations.py index 0e00dcd3a8b..dbe467f3eb0 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Literal, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from custompollerpagerdefinitions import CustomPager, CustomPoller @@ -37,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -568,7 +568,7 @@ def get_no_item_name_pages(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -650,7 +650,7 @@ def get_empty_next_link_name_pages(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -732,7 +732,7 @@ def get_null_next_link_name_pages(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -814,7 +814,7 @@ def get_single_pages(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -964,7 +964,7 @@ def get_single_pages_with_body_params(self, parameters: Union[JSON, IO[bytes]], content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1057,7 +1057,7 @@ def first_response_empty(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1147,7 +1147,7 @@ def get_multiple_pages( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1236,7 +1236,7 @@ def get_with_query_params(self, *, required_query_parameter: int, **kwargs: Any) query_constant: Literal[True] = kwargs.pop("query_constant", _params.pop("queryConstant", True)) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1318,7 +1318,7 @@ def duplicate_params(self, *, filter: Optional[str] = None, **kwargs: Any) -> It cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1402,7 +1402,7 @@ def page_with_max_page_size(self, **kwargs: Any) -> Iterable[JSON]: maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1493,7 +1493,7 @@ def get_odata_multiple_pages( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1587,7 +1587,7 @@ def get_multiple_pages_with_offset( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1673,7 +1673,7 @@ def get_multiple_pages_retry_first(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1756,7 +1756,7 @@ def get_multiple_pages_retry_second(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1838,7 +1838,7 @@ def get_single_pages_failure(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1920,7 +1920,7 @@ def get_multiple_pages_failure(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2002,7 +2002,7 @@ def get_multiple_pages_failure_uri(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2088,7 +2088,7 @@ def get_multiple_pages_fragment_next_link(self, tenant: str, *, api_version: str cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2174,7 +2174,7 @@ def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2233,7 +2233,7 @@ def get_next(next_link=None): def _get_multiple_pages_lro_initial( self, *, maxresults: Optional[int] = None, timeout: int = 30, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2309,7 +2309,7 @@ def begin_get_multiple_pages_lro( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2432,7 +2432,7 @@ def append_api_version(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2516,7 +2516,7 @@ def replace_api_version(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2602,7 +2602,7 @@ def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=nam cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/_client.py index 8e239e07506..2e4fc4089c6 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/_client.py @@ -19,7 +19,7 @@ from .operations import PagingOperations -class AutoRestParameterizedHostTestPagingClient: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestParameterizedHostTestPagingClient: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/aio/_client.py index a7c922f5a37..081eadf4c3a 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/aio/_client.py @@ -19,7 +19,7 @@ from .operations import PagingOperations -class AutoRestParameterizedHostTestPagingClient: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestParameterizedHostTestPagingClient: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/aio/operations/_operations.py index 8ce1a852d31..133c597983c 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def get_pages_partial_url(self, account_name: str, **kwargs: Any) -> AsyncIterab cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -162,7 +161,7 @@ def get_pages_partial_url_operation(self, account_name: str, **kwargs: Any) -> A cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/operations/_operations.py index dae1fc8aa43..ce73ba8ba23 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/custombaseurlpagingversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -130,7 +129,7 @@ def get_pages_partial_url(self, account_name: str, **kwargs: Any) -> Iterable[JS cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -211,7 +210,7 @@ def get_pages_partial_url_operation(self, account_name: str, **kwargs: Any) -> I cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_client.py index 5f219a7cc60..3513b9af626 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_client.py @@ -20,7 +20,6 @@ from .operations import HeadExceptionOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_configuration.py index cb08ffa0df3..4b2fe135b7e 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_configuration.py @@ -14,7 +14,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/_client.py index 111039e5aab..e8a65316c7e 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/_client.py @@ -20,7 +20,6 @@ from .operations import HeadExceptionOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/_configuration.py index df3d8954b1b..3921be8c648 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/_configuration.py @@ -14,7 +14,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/operations/_operations.py index 2af02088ff2..680eea51f6f 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -103,7 +102,7 @@ async def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -145,7 +144,7 @@ async def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/operations/_operations.py index c93ddbdd8b4..e1447a9c72e 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/headexceptionsversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_client.py index 3ee9b346331..42fc9afc7db 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_client.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_configuration.py index b753cda440f..dbf84f8310f 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/_client.py index 53e12d56d41..8436bf30852 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/_client.py @@ -20,7 +20,6 @@ from .operations import HttpSuccessOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/_configuration.py index ca3bae219c1..907a85173ac 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestHeadTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestHeadTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/operations/_operations.py index 0bcd93ef90a..fd3cff2b528 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -103,7 +102,7 @@ async def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -145,7 +144,7 @@ async def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/operations/_operations.py index 53b0478341b..81afaba4371 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def head200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ def head204(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ def head404(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_client.py index 8b9648cd667..5f4f80678df 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_client.py @@ -19,7 +19,7 @@ from .operations import QuestionAnsweringProjectsOperations -class LroPagingClient: # pylint: disable=client-accepts-api-version-keyword +class LroPagingClient: """The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_configuration.py index c4fea08947f..8c9e40b43d7 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class LroPagingClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class LroPagingClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for LroPagingClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/_client.py index 6f14333e933..3bb0f474830 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/_client.py @@ -19,7 +19,7 @@ from .operations import QuestionAnsweringProjectsOperations -class LroPagingClient: # pylint: disable=client-accepts-api-version-keyword +class LroPagingClient: """The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/_configuration.py index 495b7a4c741..a1c30c82c8b 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class LroPagingClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class LroPagingClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for LroPagingClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/operations/_operations.py index 13db688cc9b..19d4b0b62bc 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,21 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -52,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -173,7 +158,7 @@ def get_qnas( maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -240,7 +225,7 @@ async def get_next(next_link=None): async def _update_qnas_initial( self, project_name: str, body: Union[List[JSON], IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -598,7 +583,7 @@ async def begin_update_qnas( content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/operations/_operations.py index 8ca02a486d8..b60a0b718ff 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/lropagingversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -227,7 +226,7 @@ def get_qnas( maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -294,7 +293,7 @@ def get_next(next_link=None): def _update_qnas_initial( self, project_name: str, body: Union[List[JSON], IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -652,7 +651,7 @@ def begin_update_qnas( content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_client.py index 1d35c26a29d..2dcfbcc3f25 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_client.py @@ -20,7 +20,6 @@ from .operations import LRORetrysOperations, LROSADsOperations, LROsCustomHeaderOperations, LROsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_configuration.py index e4f7fe091a5..489d6ad4ba6 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_configuration.py @@ -14,7 +14,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/_client.py index 6b644524dbb..9b9ad9ecb03 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/_client.py @@ -20,7 +20,6 @@ from .operations import LRORetrysOperations, LROSADsOperations, LROsCustomHeaderOperations, LROsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/_configuration.py index c191008d365..98a959a9762 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/_configuration.py @@ -14,7 +14,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/operations/_operations.py index 89d1759fe70..7b81d22ad65 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -115,7 +115,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -141,7 +141,7 @@ def __init__(self, *args, **kwargs) -> None: async def _put200_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -377,7 +377,7 @@ def get_long_running_output(pipeline_response): async def _patch200_succeeded_ignore_headers_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -623,7 +623,7 @@ def get_long_running_output(pipeline_response): async def _patch201_retry_with_async_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -845,10 +845,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -865,7 +862,7 @@ def get_long_running_output(pipeline_response): async def _patch202_retry_with_async_and_location_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1108,7 +1105,7 @@ def get_long_running_output(pipeline_response): async def _put201_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1342,7 +1339,7 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _post202_list_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1463,7 +1460,7 @@ def get_long_running_output(pipeline_response): async def _put200_succeeded_no_state_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1699,7 +1696,7 @@ def get_long_running_output(pipeline_response): async def _put202_retry200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1938,7 +1935,7 @@ def get_long_running_output(pipeline_response): async def _put201_creating_succeeded200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2177,7 +2174,7 @@ def get_long_running_output(pipeline_response): async def _put200_updating_succeeded204_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2416,7 +2413,7 @@ def get_long_running_output(pipeline_response): async def _put201_creating_failed200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2655,7 +2652,7 @@ def get_long_running_output(pipeline_response): async def _put200_acceptedcanceled200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2894,7 +2891,7 @@ def get_long_running_output(pipeline_response): async def _put_no_header_in_retry_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3136,7 +3133,7 @@ def get_long_running_output(pipeline_response): async def _put_async_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3389,7 +3386,7 @@ def get_long_running_output(pipeline_response): async def _put_async_no_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3640,7 +3637,7 @@ def get_long_running_output(pipeline_response): async def _put_async_retry_failed_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3893,7 +3890,7 @@ def get_long_running_output(pipeline_response): async def _put_async_no_retrycanceled_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4144,7 +4141,7 @@ def get_long_running_output(pipeline_response): async def _put_async_no_header_in_retry_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4393,7 +4390,7 @@ def get_long_running_output(pipeline_response): async def _put_non_resource_initial( self, sku: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4575,7 +4572,7 @@ def get_long_running_output(pipeline_response): async def _put_async_non_resource_initial( self, sku: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4757,7 +4754,7 @@ def get_long_running_output(pipeline_response): async def _put_sub_resource_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4960,7 +4957,7 @@ def get_long_running_output(pipeline_response): async def _put_async_sub_resource_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5163,7 +5160,7 @@ def get_long_running_output(pipeline_response): async def _delete_provisioning202_accepted200_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5281,7 +5278,7 @@ def get_long_running_output(pipeline_response): async def _delete_provisioning202_deleting_failed200_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5399,7 +5396,7 @@ def get_long_running_output(pipeline_response): async def _delete_provisioning202_deletingcanceled200_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5515,7 +5512,7 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete204_succeeded_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5598,7 +5595,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete202_retry200_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5711,7 +5708,7 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete202_no_retry204_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5824,7 +5821,7 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_no_header_in_retry_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5912,7 +5909,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_no_header_in_retry_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6000,7 +5997,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_retry_succeeded_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6091,7 +6088,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_no_retry_succeeded_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6182,7 +6179,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_retry_failed_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6273,7 +6270,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_retrycanceled_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6364,7 +6361,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _post200_with_payload_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6465,7 +6462,7 @@ def get_long_running_output(pipeline_response): async def _post202_retry200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6651,7 +6648,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post202_no_retry204_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6895,7 +6892,7 @@ def get_long_running_output(pipeline_response): async def _post_double_headers_final_location_get_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7010,7 +7007,7 @@ def get_long_running_output(pipeline_response): async def _post_double_headers_final_azure_header_get_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7126,7 +7123,7 @@ def get_long_running_output(pipeline_response): async def _post_double_headers_final_azure_header_get_default_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7239,7 +7236,7 @@ def get_long_running_output(pipeline_response): async def _post_async_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7486,7 +7483,7 @@ def get_long_running_output(pipeline_response): async def _post_async_no_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7733,7 +7730,7 @@ def get_long_running_output(pipeline_response): async def _post_async_retry_failed_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7925,7 +7922,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_retrycanceled_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8135,7 +8132,7 @@ def __init__(self, *args, **kwargs) -> None: async def _put201_creating_succeeded200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8374,7 +8371,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8627,7 +8624,7 @@ def get_long_running_output(pipeline_response): async def _delete_provisioning202_accepted200_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8743,7 +8740,7 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete202_retry200_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8833,7 +8830,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _delete_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8928,7 +8925,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post202_retry200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9114,7 +9111,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9324,7 +9321,7 @@ def __init__(self, *args, **kwargs) -> None: async def _put_non_retry400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9557,7 +9554,7 @@ def get_long_running_output(pipeline_response): async def _put_non_retry201_creating400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9793,7 +9790,7 @@ def get_long_running_output(pipeline_response): async def _put_non_retry201_creating400_invalid_json_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10029,7 +10026,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10277,7 +10274,7 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_non_retry400_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10364,7 +10361,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete202_non_retry400_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10451,7 +10448,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete_async_relative_retry400_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10544,7 +10541,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_non_retry400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10727,7 +10724,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post202_non_retry400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10910,7 +10907,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_relative_retry400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11099,7 +11096,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _put_error201_no_provisioning_state_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11332,7 +11329,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry_no_status_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11585,7 +11582,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry_no_status_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11836,7 +11833,7 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete204_succeeded_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11921,7 +11918,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _delete_async_relative_retry_no_status_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12016,7 +12013,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post202_no_location_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12202,7 +12199,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_relative_retry_no_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12394,7 +12391,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _put200_invalid_json_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12630,7 +12627,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12883,7 +12880,7 @@ def get_long_running_output(pipeline_response): async def _put_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13134,7 +13131,7 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _delete202_retry_invalid_header_initial(self, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13224,7 +13221,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _delete_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13319,7 +13316,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _delete_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13414,7 +13411,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post202_retry_invalid_header_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13600,7 +13597,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13792,7 +13789,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14002,7 +13999,7 @@ def __init__(self, *args, **kwargs) -> None: async def _put_async_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14258,7 +14255,7 @@ def get_long_running_output(pipeline_response): async def _put201_creating_succeeded200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14500,7 +14497,7 @@ def get_long_running_output(pipeline_response): async def _post202_retry200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14689,7 +14686,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _post_async_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/operations/_operations.py index 4d8bf311f8a..acea91434d3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/lroversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1409,7 +1409,7 @@ def __init__(self, *args, **kwargs): def _put200_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1645,7 +1645,7 @@ def get_long_running_output(pipeline_response): def _patch200_succeeded_ignore_headers_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1891,7 +1891,7 @@ def get_long_running_output(pipeline_response): def _patch201_retry_with_async_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2113,9 +2113,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -2132,7 +2130,7 @@ def get_long_running_output(pipeline_response): def _patch202_retry_with_async_and_location_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2375,7 +2373,7 @@ def get_long_running_output(pipeline_response): def _put201_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2609,7 +2607,7 @@ def get_long_running_output(pipeline_response): return LROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _post202_list_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2726,7 +2724,7 @@ def get_long_running_output(pipeline_response): def _put200_succeeded_no_state_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2962,7 +2960,7 @@ def get_long_running_output(pipeline_response): def _put202_retry200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3199,7 +3197,7 @@ def get_long_running_output(pipeline_response): def _put201_creating_succeeded200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3438,7 +3436,7 @@ def get_long_running_output(pipeline_response): def _put200_updating_succeeded204_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3677,7 +3675,7 @@ def get_long_running_output(pipeline_response): def _put201_creating_failed200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3916,7 +3914,7 @@ def get_long_running_output(pipeline_response): def _put200_acceptedcanceled200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4155,7 +4153,7 @@ def get_long_running_output(pipeline_response): def _put_no_header_in_retry_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4397,7 +4395,7 @@ def get_long_running_output(pipeline_response): def _put_async_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4650,7 +4648,7 @@ def get_long_running_output(pipeline_response): def _put_async_no_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4901,7 +4899,7 @@ def get_long_running_output(pipeline_response): def _put_async_retry_failed_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5154,7 +5152,7 @@ def get_long_running_output(pipeline_response): def _put_async_no_retrycanceled_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5405,7 +5403,7 @@ def get_long_running_output(pipeline_response): def _put_async_no_header_in_retry_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5652,7 +5650,7 @@ def get_long_running_output(pipeline_response): return LROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _put_non_resource_initial(self, sku: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5832,7 +5830,7 @@ def get_long_running_output(pipeline_response): def _put_async_non_resource_initial( self, sku: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6014,7 +6012,7 @@ def get_long_running_output(pipeline_response): def _put_sub_resource_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6217,7 +6215,7 @@ def get_long_running_output(pipeline_response): def _put_async_sub_resource_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6420,7 +6418,7 @@ def get_long_running_output(pipeline_response): def _delete_provisioning202_accepted200_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6538,7 +6536,7 @@ def get_long_running_output(pipeline_response): def _delete_provisioning202_deleting_failed200_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6656,7 +6654,7 @@ def get_long_running_output(pipeline_response): def _delete_provisioning202_deletingcanceled200_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6772,7 +6770,7 @@ def get_long_running_output(pipeline_response): return LROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete204_succeeded_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6855,7 +6853,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete202_retry200_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6968,7 +6966,7 @@ def get_long_running_output(pipeline_response): return LROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete202_no_retry204_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7081,7 +7079,7 @@ def get_long_running_output(pipeline_response): return LROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_no_header_in_retry_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7169,7 +7167,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_no_header_in_retry_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7257,7 +7255,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_retry_succeeded_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7348,7 +7346,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_no_retry_succeeded_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7439,7 +7437,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_retry_failed_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7530,7 +7528,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_retrycanceled_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7621,7 +7619,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _post200_with_payload_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7722,7 +7720,7 @@ def get_long_running_output(pipeline_response): def _post202_retry200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7908,7 +7906,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post202_no_retry204_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8152,7 +8150,7 @@ def get_long_running_output(pipeline_response): def _post_double_headers_final_location_get_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8267,7 +8265,7 @@ def get_long_running_output(pipeline_response): def _post_double_headers_final_azure_header_get_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8382,7 +8380,7 @@ def get_long_running_output(pipeline_response): def _post_double_headers_final_azure_header_get_default_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8495,7 +8493,7 @@ def get_long_running_output(pipeline_response): def _post_async_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8742,7 +8740,7 @@ def get_long_running_output(pipeline_response): def _post_async_no_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8989,7 +8987,7 @@ def get_long_running_output(pipeline_response): def _post_async_retry_failed_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9181,7 +9179,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_retrycanceled_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9391,7 +9389,7 @@ def __init__(self, *args, **kwargs): def _put201_creating_succeeded200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9630,7 +9628,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9883,7 +9881,7 @@ def get_long_running_output(pipeline_response): def _delete_provisioning202_accepted200_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9999,7 +9997,7 @@ def get_long_running_output(pipeline_response): return LROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete202_retry200_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10089,7 +10087,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _delete_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10184,7 +10182,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post202_retry200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10370,7 +10368,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_relative_retry_succeeded_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10580,7 +10578,7 @@ def __init__(self, *args, **kwargs): def _put_non_retry400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10813,7 +10811,7 @@ def get_long_running_output(pipeline_response): def _put_non_retry201_creating400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11049,7 +11047,7 @@ def get_long_running_output(pipeline_response): def _put_non_retry201_creating400_invalid_json_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11285,7 +11283,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11533,7 +11531,7 @@ def get_long_running_output(pipeline_response): return LROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_non_retry400_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11620,7 +11618,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete202_non_retry400_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11707,7 +11705,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete_async_relative_retry400_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11800,7 +11798,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_non_retry400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11983,7 +11981,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post202_non_retry400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12166,7 +12164,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_relative_retry400_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12355,7 +12353,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _put_error201_no_provisioning_state_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12588,7 +12586,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry_no_status_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12841,7 +12839,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry_no_status_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13092,7 +13090,7 @@ def get_long_running_output(pipeline_response): return LROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete204_succeeded_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13177,7 +13175,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _delete_async_relative_retry_no_status_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13272,7 +13270,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post202_no_location_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13458,7 +13456,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_relative_retry_no_payload_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13650,7 +13648,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _put200_invalid_json_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13886,7 +13884,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14139,7 +14137,7 @@ def get_long_running_output(pipeline_response): def _put_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14390,7 +14388,7 @@ def get_long_running_output(pipeline_response): return LROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _delete202_retry_invalid_header_initial(self, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14480,7 +14478,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _delete_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14575,7 +14573,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _delete_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14670,7 +14668,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post202_retry_invalid_header_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14856,7 +14854,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_relative_retry_invalid_header_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15048,7 +15046,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_relative_retry_invalid_json_polling_initial( # pylint: disable=name-too-long self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15258,7 +15256,7 @@ def __init__(self, *args, **kwargs): def _put_async_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15514,7 +15512,7 @@ def get_long_running_output(pipeline_response): def _put201_creating_succeeded200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15756,7 +15754,7 @@ def get_long_running_output(pipeline_response): def _post202_retry200_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15945,7 +15943,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _post_async_retry_succeeded_initial( self, product: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_operations/_operations.py index 7a2145b7fe9..069eaf5d706 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterator, Literal, Optional, Type, TypeVar, Union, cast +from typing import Any, Callable, Dict, Iterator, Literal, Optional, TypeVar, Union, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -85,7 +84,7 @@ class LROWithParamaterizedEndpointsOperationsMixin( # pylint: disable=name-too- def _poll_with_parameterized_endpoints_initial( # pylint: disable=name-too-long self, account_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -199,7 +198,7 @@ def get_long_running_output(pipeline_response): def _poll_with_constant_parameterized_endpoints_initial( # pylint: disable=name-too-long self, account_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_vendor.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_vendor.py index d74e3c6d01d..fcf80212404 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_vendor.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import LROWithParamaterizedEndpointsConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_operations/_operations.py index 26396f8d574..6d5d6f5d909 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterator, Callable, Dict, Literal, Optional, Type, TypeVar, Union, cast +from typing import Any, AsyncIterator, Callable, Dict, Literal, Optional, TypeVar, Union, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +45,7 @@ class LROWithParamaterizedEndpointsOperationsMixin( # pylint: disable=name-too- async def _poll_with_parameterized_endpoints_initial( # pylint: disable=name-too-long self, account_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,7 +159,7 @@ def get_long_running_output(pipeline_response): async def _poll_with_constant_parameterized_endpoints_initial( # pylint: disable=name-too-long self, account_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_vendor.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_vendor.py index 6a04cfda87e..65404a7e264 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import LROWithParamaterizedEndpointsConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_client.py index fe763bdfcd1..148b2ba0a1c 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_client.py @@ -19,7 +19,7 @@ from .operations import PagingOperations -class AutoRestPagingTestService: # pylint: disable=client-accepts-api-version-keyword +class AutoRestPagingTestService: """Long-running Operation for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_configuration.py index aa1e7060f12..2a82930bf24 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestPagingTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/_client.py index c99d87805dc..d63e538b02b 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/_client.py @@ -19,7 +19,7 @@ from .operations import PagingOperations -class AutoRestPagingTestService: # pylint: disable=client-accepts-api-version-keyword +class AutoRestPagingTestService: """Long-running Operation for AutoRest. :ivar paging: PagingOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/_configuration.py index 1bf6720524c..3b70fdd7d9e 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestPagingTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestPagingTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/operations/_operations.py index 1e2167a7dee..e7632ee75ac 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -17,7 +17,6 @@ IO, Literal, Optional, - Type, TypeVar, Union, cast, @@ -76,7 +75,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -123,7 +122,7 @@ def get_no_item_name_pages(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -205,7 +204,7 @@ def get_empty_next_link_name_pages(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -287,7 +286,7 @@ def get_null_next_link_name_pages(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +368,7 @@ def get_single_pages(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -521,7 +520,7 @@ def get_single_pages_with_body_params( content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -614,7 +613,7 @@ def first_response_empty(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -704,7 +703,7 @@ def get_multiple_pages( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -793,7 +792,7 @@ def get_with_query_params(self, *, required_query_parameter: int, **kwargs: Any) query_constant: Literal[True] = kwargs.pop("query_constant", _params.pop("queryConstant", True)) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -875,7 +874,7 @@ def duplicate_params(self, *, filter: Optional[str] = None, **kwargs: Any) -> As cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -959,7 +958,7 @@ def page_with_max_page_size(self, **kwargs: Any) -> AsyncIterable[JSON]: maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1050,7 +1049,7 @@ def get_odata_multiple_pages( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1144,7 +1143,7 @@ def get_multiple_pages_with_offset( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1230,7 +1229,7 @@ def get_multiple_pages_retry_first(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1313,7 +1312,7 @@ def get_multiple_pages_retry_second(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1395,7 +1394,7 @@ def get_single_pages_failure(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1477,7 +1476,7 @@ def get_multiple_pages_failure(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1559,7 +1558,7 @@ def get_multiple_pages_failure_uri(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1647,7 +1646,7 @@ def get_multiple_pages_fragment_next_link( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1733,7 +1732,7 @@ def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1792,7 +1791,7 @@ async def get_next(next_link=None): async def _get_multiple_pages_lro_initial( self, *, maxresults: Optional[int] = None, timeout: int = 30, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1868,7 +1867,7 @@ async def begin_get_multiple_pages_lro( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1991,7 +1990,7 @@ def append_api_version(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2075,7 +2074,7 @@ def replace_api_version(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2161,7 +2160,7 @@ def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=nam cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/operations/_operations.py index 158534ca864..12d5ba411da 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/pagingversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Literal, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -34,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -565,7 +565,7 @@ def get_no_item_name_pages(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -647,7 +647,7 @@ def get_empty_next_link_name_pages(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -729,7 +729,7 @@ def get_null_next_link_name_pages(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -811,7 +811,7 @@ def get_single_pages(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -961,7 +961,7 @@ def get_single_pages_with_body_params(self, parameters: Union[JSON, IO[bytes]], content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1054,7 +1054,7 @@ def first_response_empty(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1144,7 +1144,7 @@ def get_multiple_pages( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1233,7 +1233,7 @@ def get_with_query_params(self, *, required_query_parameter: int, **kwargs: Any) query_constant: Literal[True] = kwargs.pop("query_constant", _params.pop("queryConstant", True)) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1315,7 +1315,7 @@ def duplicate_params(self, *, filter: Optional[str] = None, **kwargs: Any) -> It cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1399,7 +1399,7 @@ def page_with_max_page_size(self, **kwargs: Any) -> Iterable[JSON]: maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1490,7 +1490,7 @@ def get_odata_multiple_pages( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1584,7 +1584,7 @@ def get_multiple_pages_with_offset( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1670,7 +1670,7 @@ def get_multiple_pages_retry_first(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1753,7 +1753,7 @@ def get_multiple_pages_retry_second(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1835,7 +1835,7 @@ def get_single_pages_failure(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1917,7 +1917,7 @@ def get_multiple_pages_failure(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1999,7 +1999,7 @@ def get_multiple_pages_failure_uri(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2085,7 +2085,7 @@ def get_multiple_pages_fragment_next_link(self, tenant: str, *, api_version: str cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2171,7 +2171,7 @@ def get_multiple_pages_fragment_with_grouping_next_link( # pylint: disable=name cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2230,7 +2230,7 @@ def get_next(next_link=None): def _get_multiple_pages_lro_initial( self, *, maxresults: Optional[int] = None, timeout: int = 30, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2306,7 +2306,7 @@ def begin_get_multiple_pages_lro( cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2429,7 +2429,7 @@ def append_api_version(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2513,7 +2513,7 @@ def replace_api_version(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2599,7 +2599,7 @@ def get_paging_model_with_item_name_with_xms_client_name( # pylint: disable=nam cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_client.py index d1c5fc09411..723a2ec260e 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_client.py @@ -20,11 +20,10 @@ from .operations import StorageAccountsOperations, UsageOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class StorageManagementClient: # pylint: disable=client-accepts-api-version-keyword +class StorageManagementClient: """StorageManagementClient. :ivar storage_accounts: StorageAccountsOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_configuration.py index d019a9b08c4..6bf7e5e9dbf 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class StorageManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class StorageManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for StorageManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/_client.py index 91dd1e5fb1a..605eaaa33b2 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/_client.py @@ -20,11 +20,10 @@ from .operations import StorageAccountsOperations, UsageOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class StorageManagementClient: # pylint: disable=client-accepts-api-version-keyword +class StorageManagementClient: """StorageManagementClient. :ivar storage_accounts: StorageAccountsOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/_configuration.py index c4abd79fa65..c5127f4dcc9 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class StorageManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class StorageManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for StorageManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/operations/_operations.py index 5b4bf217aa3..3302acb3995 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -47,7 +47,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -160,7 +160,7 @@ async def check_name_availability(self, account_name: Union[JSON, IO[bytes]], ** "reason": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -217,7 +217,7 @@ async def check_name_availability(self, account_name: Union[JSON, IO[bytes]], ** async def _create_initial( self, resource_group_name: str, account_name: str, parameters: Union[JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -587,9 +587,7 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller[JSON](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, account_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, account_name: str, **kwargs: Any) -> None: """Deletes a storage account in Microsoft Azure. :param resource_group_name: The name of the resource group within the user’s subscription. @@ -603,7 +601,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +705,7 @@ async def get_properties(self, resource_group_name: str, account_name: str, **kw "type": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1035,7 +1033,7 @@ async def update( "type": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1113,7 +1111,7 @@ async def list_keys(self, resource_group_name: str, account_name: str, **kwargs: "key2": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1221,7 +1219,7 @@ def list(self, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1348,7 +1346,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1524,7 +1522,7 @@ async def regenerate_key( "key2": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1624,7 +1622,7 @@ async def list(self, **kwargs: Any) -> JSON: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/operations/_operations.py index bfa3cd1e91d..dfe34ffe8d0 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/storageversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -35,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -428,7 +428,7 @@ def check_name_availability(self, account_name: Union[JSON, IO[bytes]], **kwargs "reason": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -485,7 +485,7 @@ def check_name_availability(self, account_name: Union[JSON, IO[bytes]], **kwargs def _create_initial( self, resource_group_name: str, account_name: str, parameters: Union[JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -871,7 +871,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -975,7 +975,7 @@ def get_properties(self, resource_group_name: str, account_name: str, **kwargs: "type": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1303,7 +1303,7 @@ def update( "type": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1381,7 +1381,7 @@ def list_keys(self, resource_group_name: str, account_name: str, **kwargs: Any) "key2": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1489,7 +1489,7 @@ def list(self, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1616,7 +1616,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1792,7 +1792,7 @@ def regenerate_key( "key2": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1892,7 +1892,7 @@ def list(self, **kwargs: Any) -> JSON: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_client.py index 1c18f24b328..9d3c1977fe6 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_client.py @@ -20,11 +20,10 @@ from .operations import GroupOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MicrosoftAzureTestUrl: # pylint: disable=client-accepts-api-version-keyword +class MicrosoftAzureTestUrl: """Some cool documentation. :ivar group: GroupOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_configuration.py index 3c0d0309bfe..5744b8fbffd 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MicrosoftAzureTestUrlConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MicrosoftAzureTestUrlConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MicrosoftAzureTestUrl. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_serialization.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_serialization.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/_client.py index ed4e8fb470e..a995dc02ef9 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/_client.py @@ -20,11 +20,10 @@ from .operations import GroupOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MicrosoftAzureTestUrl: # pylint: disable=client-accepts-api-version-keyword +class MicrosoftAzureTestUrl: """Some cool documentation. :ivar group: GroupOperations operations diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/_configuration.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/_configuration.py index 844e96aebee..75c6afa1848 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MicrosoftAzureTestUrlConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MicrosoftAzureTestUrlConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MicrosoftAzureTestUrl. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/operations/_operations.py index 43f97b97825..0152ab412bc 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,7 +68,7 @@ async def get_sample_resource_group(self, resource_group_name: str, **kwargs: An "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/operations/_operations.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/operations/_operations.py index 58a16b948ee..ebd23ccc996 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ def get_sample_resource_group(self, resource_group_name: str, **kwargs: Any) -> "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_operations/_operations.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_operations/_operations.py index 6dc8fc1b815..a1774379379 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -145,7 +144,7 @@ def get_model(self, mode: str, **kwargs: Any) -> JSON: "received": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -274,7 +273,7 @@ def post_model(self, mode: str, input: Union[JSON, IO[bytes]], **kwargs: Any) -> "received": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -353,7 +352,7 @@ def get_pages(self, mode: str, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -402,7 +401,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _lro_initial(self, mode: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_serialization.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_serialization.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_vendor.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_vendor.py index 3c6a638c873..804ea632d95 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_vendor.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import DPGClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_operations/_operations.py index 0c2184a15a9..d88c959bff6 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -40,7 +39,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,7 +68,7 @@ async def get_model(self, mode: str, **kwargs: Any) -> JSON: "received": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -202,7 +201,7 @@ async def post_model(self, mode: str, input: Union[JSON, IO[bytes]], **kwargs: A "received": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -281,7 +280,7 @@ def get_pages(self, mode: str, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -330,7 +329,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _lro_initial(self, mode: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_vendor.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_vendor.py index 12fbd8e4102..189c699866d 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import DPGClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_operations/_operations.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_operations/_operations.py index 6dc8fc1b815..a1774379379 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -145,7 +144,7 @@ def get_model(self, mode: str, **kwargs: Any) -> JSON: "received": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -274,7 +273,7 @@ def post_model(self, mode: str, input: Union[JSON, IO[bytes]], **kwargs: Any) -> "received": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -353,7 +352,7 @@ def get_pages(self, mode: str, **kwargs: Any) -> Iterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -402,7 +401,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _lro_initial(self, mode: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_serialization.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_serialization.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_vendor.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_vendor.py index 3c6a638c873..804ea632d95 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_vendor.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import DPGClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_operations/_operations.py index 0c2184a15a9..d88c959bff6 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -40,7 +39,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,7 +68,7 @@ async def get_model(self, mode: str, **kwargs: Any) -> JSON: "received": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -202,7 +201,7 @@ async def post_model(self, mode: str, input: Union[JSON, IO[bytes]], **kwargs: A "received": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -281,7 +280,7 @@ def get_pages(self, mode: str, **kwargs: Any) -> AsyncIterable[JSON]: cls: ClsType[JSON] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -330,7 +329,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _lro_initial(self, mode: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_vendor.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_vendor.py index 12fbd8e4102..189c699866d 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import DPGClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/_serialization.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/_serialization.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/aio/operations/_operations.py index c2d29330a2d..4da7ec3d099 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ async def head_no_params(self, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -118,7 +117,7 @@ async def get_required(self, *, parameter: str, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -174,7 +173,7 @@ async def put_required_optional( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -275,7 +274,7 @@ async def post_parameters(self, parameter: Union[JSON, IO[bytes]], **kwargs: Any "url": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -339,7 +338,7 @@ async def get_optional(self, *, optional_param: Optional[str] = None, **kwargs: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/operations/_operations.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/operations/_operations.py index 19cbecd485a..5cbecbc8667 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -153,7 +152,7 @@ def head_no_params(self, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -205,7 +204,7 @@ def get_required(self, *, parameter: str, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -261,7 +260,7 @@ def put_required_optional( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -360,7 +359,7 @@ def post_parameters(self, parameter: Union[JSON, IO[bytes]], **kwargs: Any) -> J "url": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -424,7 +423,7 @@ def get_optional(self, *, optional_param: Optional[str] = None, **kwargs: Any) - :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/_serialization.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/_serialization.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/aio/operations/_operations.py index 98925062a40..1002aa36f46 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -70,7 +69,7 @@ async def head_no_params(self, *, new_parameter: Optional[str] = None, **kwargs: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -125,7 +124,7 @@ async def get_required(self, *, parameter: str, new_parameter: Optional[str] = N :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -189,7 +188,7 @@ async def put_required_optional( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -289,7 +288,7 @@ async def post_parameters(self, parameter: Union[JSON, IO[bytes]], **kwargs: Any "url": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -347,7 +346,7 @@ async def post_parameters(self, parameter: Union[JSON, IO[bytes]], **kwargs: Any return cast(JSON, deserialized) # type: ignore @distributed_trace_async - async def delete_parameters(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def delete_parameters(self, **kwargs: Any) -> None: """Delete something. Initially the path exists but there is no delete method. After evolution this is a new method in a known path. @@ -356,7 +355,7 @@ async def delete_parameters(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -405,7 +404,7 @@ async def get_optional( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -457,7 +456,7 @@ async def get_new_operation(self, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/operations/_operations.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/operations/_operations.py index eca3be1b0fa..58400fbd428 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -191,7 +190,7 @@ def head_no_params(self, *, new_parameter: Optional[str] = None, **kwargs: Any) :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -246,7 +245,7 @@ def get_required(self, *, parameter: str, new_parameter: Optional[str] = None, * :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -310,7 +309,7 @@ def put_required_optional( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -410,7 +409,7 @@ def post_parameters(self, parameter: Union[JSON, IO[bytes]], **kwargs: Any) -> J "url": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -477,7 +476,7 @@ def delete_parameters(self, **kwargs: Any) -> None: # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +525,7 @@ def get_optional( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -578,7 +577,7 @@ def get_new_operation(self, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_operations/_operations.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_operations/_operations.py index 56da1aa62cc..580bd4e4b9a 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -137,7 +136,7 @@ def get_model(self, mode: str, **kwargs: Any) -> _models.Product: :rtype: ~dpgtestmodelsversiontolerant.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -233,7 +232,7 @@ def post_model(self, mode: str, input: Union[_models.Input, IO[bytes]], **kwargs :rtype: ~dpgtestmodelsversiontolerant.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -299,9 +298,9 @@ def get_pages(self, mode: str, **kwargs: Any) -> Iterable["_models.Product"]: _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models._models.ProductResult] = kwargs.pop("cls", None) # pylint: disable=protected-access + cls: ClsType[_models._models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,7 +351,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _lro_initial(self, mode: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_serialization.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_serialization.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_vendor.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_vendor.py index 3c6a638c873..804ea632d95 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_vendor.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import DPGClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_operations/_operations.py index 70840ee3bb2..62df33c3066 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -41,7 +40,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def get_model(self, mode: str, **kwargs: Any) -> _models.Product: :rtype: ~dpgtestmodelsversiontolerant.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -157,7 +156,7 @@ async def post_model(self, mode: str, input: Union[_models.Input, IO[bytes]], ** :rtype: ~dpgtestmodelsversiontolerant.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -223,9 +222,9 @@ def get_pages(self, mode: str, **kwargs: Any) -> AsyncIterable["_models.Product" _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models._models.ProductResult] = kwargs.pop("cls", None) # pylint: disable=protected-access + cls: ClsType[_models._models.ProductResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -276,7 +275,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _lro_initial(self, mode: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_vendor.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_vendor.py index 12fbd8e4102..189c699866d 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import DPGClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/models/_models.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/models/_models.py index a7be9f57b2f..2779069dfd1 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/models/_models.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_serialization.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_serialization.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin.py index 476abc37f89..db0e76b029a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin.py @@ -81,7 +81,7 @@ async def begin_test_lro_and_paging( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.begin_test_lro_and_paging(client_request_id, test_lro_and_paging_options, **kwargs) - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, @@ -118,7 +118,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.test_different_calls(greeting_in_english, greeting_in_chinese, greeting_in_french, **kwargs) - async def test_one( # pylint: disable=inconsistent-return-statements + async def test_one( self, id: int, message: Optional[str] = None, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py index 1d60c0ea08a..5d72190ec6e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_multiapi_service_client.py index 9bfedcce3eb..9955ea175a5 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient: # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient: """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py index 84d8c8426fb..cc3420f9112 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_multiapi_service_client.py index 6250a608d8c..99f361877eb 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient: # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient: """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/operations/_operation_group_one_operations.py index 70a56729015..e04784a2b44 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,14 +54,14 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_two(self, **kwargs: Any) -> None: """TestTwo should be in OperationGroupOneOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/models/_models_py3.py index 5e62f09bbc9..89176e0e663 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/operations/_operation_group_one_operations.py index 902735446b9..3213f256983 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +83,7 @@ def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py index b3a84d721ef..4d91e0a380e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json index e2342b2dfb9..0fde66cae75 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json @@ -108,7 +108,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_one( # pylint: disable=inconsistent-return-statements\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter. Required.\n:type id: int\n:param message: An optional string parameter. Default value is None.\n:type message: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "id, message, **kwargs" } @@ -173,7 +173,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_multiapi_service_client.py index f249b2540df..3dc74cddca7 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py index 57b4c70d5ee..093bce4e8d9 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_multiapi_service_client.py index 2f6b92e8809..7cc3d40eb7d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations/_multiapi_service_client_operations.py index b4be3e0e53b..ade2701e6d6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -43,7 +42,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,9 +55,7 @@ def _api_version(self, op_name: str) -> str: # pylint: disable=unused-argument return "" @distributed_trace_async - async def test_one( # pylint: disable=inconsistent-return-statements - self, id: int, message: Optional[str] = None, **kwargs: Any - ) -> None: + async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) -> None: """TestOne should be in an FirstVersionOperationsMixin. :param id: An int parameter. Required. @@ -69,7 +66,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,7 +109,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements async def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +264,7 @@ async def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -343,7 +340,7 @@ async def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -448,9 +445,7 @@ async def internal_get_next(next_link=None): ) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements - self, greeting_in_english: str, **kwargs: Any - ) -> None: + async def test_different_calls(self, greeting_in_english: str, **kwargs: Any) -> None: """Has added parameters across the API versions. :param greeting_in_english: pass in 'hello' to pass test. Required. @@ -459,7 +454,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations/_operation_group_one_operations.py index f62573d90f6..7b5ed061b53 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,14 +54,14 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_two(self, **kwargs: Any) -> None: """TestTwo should be in OperationGroupOneOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/models/_models_py3.py index d919b93de8d..996681e3e2c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_multiapi_service_client_operations.py index c4de06bbe5d..576f88f1b4e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -147,7 +146,7 @@ def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -190,7 +189,7 @@ def test_one( # pylint: disable=inconsistent-return-statements def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -342,7 +341,7 @@ def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -418,7 +417,7 @@ def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -534,7 +533,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_operation_group_one_operations.py index d67f173e97b..92c05501686 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +83,7 @@ def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py index 3faa78b8b80..8a6a6365ac6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json index 059598b3f4a..fae5149ddd6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:param greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:type greeting_in_chinese: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, greeting_in_chinese, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_multiapi_service_client.py index 748b312efeb..267df04dacc 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py index 15b22593685..10f716d8dd6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_multiapi_service_client.py index a109a3cd86d..3a081ccc216 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_multiapi_service_client_operations.py index c9148e926e2..fb9447b4402 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +53,7 @@ async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) :rtype: ~multiapi.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) return deserialized # type: ignore @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, **kwargs: Any ) -> None: """Has added parameters across the API versions. @@ -112,7 +111,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_operation_group_one_operations.py index 6af6c0a9120..78943a9d4be 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ async def test_two( :rtype: ~multiapi.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -156,14 +155,14 @@ async def test_two( return deserialized # type: ignore @distributed_trace_async - async def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_three(self, **kwargs: Any) -> None: """TestThree should be in OperationGroupOneOperations. Takes in ModelTwo. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_operation_group_two_operations.py index 4126e900fae..dd3455c83c3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,9 +54,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, parameter_one: bool, **kwargs: Any - ) -> None: + async def test_four(self, parameter_one: bool, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param parameter_one: A boolean parameter. Required. @@ -66,7 +63,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/models/_models_py3.py index 9cf91d5a57a..46990252065 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_multiapi_service_client_operations.py index 999455b5f6c..b094ad6f29a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -103,7 +102,7 @@ def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) -> _mo :rtype: ~multiapi.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,7 +160,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_operation_group_one_operations.py index a22d304d233..3cd1ed59cf0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -144,7 +143,7 @@ def test_two( :rtype: ~multiapi.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -207,7 +206,7 @@ def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_operation_group_two_operations.py index ade1100a843..8194728a647 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -87,7 +86,7 @@ def test_four(self, parameter_one: bool, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py index e52fa6ed11d..633f146ec60 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json index 3405c80bd28..5f505a520c3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:param greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:type greeting_in_chinese: str\n:param greeting_in_french: pass in \u0027bonjour\u0027 to pass test. Default value is None.\n:type greeting_in_french: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, greeting_in_chinese, greeting_in_french, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_multiapi_service_client.py index 33bd0a8e3c3..119f8588d79 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py index b0835f8ea54..7a4058edefe 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_multiapi_service_client.py index fbc0938a3df..e41a3533676 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_multiapi_service_client_operations.py index b2390329168..97c4d332d0c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ def test_paging(self, **kwargs: Any) -> AsyncIterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -120,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, @@ -139,7 +138,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_operation_group_one_operations.py index 856c087a61a..117bb536374 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -74,7 +73,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> AsyncIterable["_models.M cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +180,7 @@ async def test_two( :rtype: ~multiapi.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_operation_group_two_operations.py index 7fd9195e55e..c33382ea2c6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +55,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -72,7 +71,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -89,9 +88,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def test_four(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param input: Input parameter. Is either a SourcePath type or a IO[bytes] type. Default value @@ -101,7 +98,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -153,14 +150,14 @@ async def test_four( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_five(self, **kwargs: Any) -> None: """TestFive should be in OperationGroupTwoOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/models/_models_py3.py index baf3d0567ae..49a4432418f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_multiapi_service_client_operations.py index 5f40906214c..d4e34c679e3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse from azure.core.exceptions import ( @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -104,7 +103,7 @@ def test_paging(self, **kwargs: Any) -> Iterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_operation_group_one_operations.py index b581b909cb0..4edc0e9ea1b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -109,7 +108,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> Iterable["_models.ModelT cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -216,7 +215,7 @@ def test_two( :rtype: ~multiapi.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_operation_group_two_operations.py index 3d13b5c93eb..eeb9c5e3872 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -116,7 +115,7 @@ def test_four( # pylint: disable=inconsistent-return-statements """ @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -145,7 +144,7 @@ def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,7 +203,7 @@ def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/_serialization.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/_serialization.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/aio/_operations_mixin.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/aio/_operations_mixin.py index dcde65d560d..383f7fd05d0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/aio/_operations_mixin.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/aio/_operations_mixin.py @@ -83,7 +83,7 @@ async def begin_test_lro_and_paging( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.begin_test_lro_and_paging(client_request_id, test_lro_and_paging_options, **kwargs) - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, @@ -120,7 +120,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.test_different_calls(greeting_in_english, greeting_in_chinese, greeting_in_french, **kwargs) - async def test_one( # pylint: disable=inconsistent-return-statements + async def test_one( self, id: int, message: Optional[str] = None, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py index e878a099482..a8be991d4c3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py @@ -15,7 +15,7 @@ VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_metadata.json index 0c0141a728a..95778b846ac 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_metadata.json @@ -108,7 +108,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_one( # pylint: disable=inconsistent-return-statements\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter. Required.\n:type id: int\n:param message: An optional string parameter. Default value is None.\n:type message: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "id, message, **kwargs" } @@ -173,7 +173,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_multiapi_service_client.py index 37fb3f7f970..324fbdc58e0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_multiapi_service_client.py @@ -22,7 +22,7 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py index 975121f36e5..c0bfc9b848e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py @@ -15,7 +15,7 @@ VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_multiapi_service_client.py index 3548a2db625..7afa7077e11 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_multiapi_service_client.py @@ -22,7 +22,7 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/operations/_multiapi_service_client_operations.py index 59d36532c23..97a2ca1cb9f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -43,7 +42,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,9 +55,7 @@ def _api_version(self, op_name: str) -> str: # pylint: disable=unused-argument return "" @distributed_trace_async - async def test_one( # pylint: disable=inconsistent-return-statements - self, id: int, message: Optional[str] = None, **kwargs: Any - ) -> None: + async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) -> None: """TestOne should be in an FirstVersionOperationsMixin. :param id: An int parameter. Required. @@ -69,7 +66,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,7 +109,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements async def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +264,7 @@ async def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -345,7 +342,7 @@ async def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -450,9 +447,7 @@ async def internal_get_next(next_link=None): ) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements - self, greeting_in_english: str, **kwargs: Any - ) -> None: + async def test_different_calls(self, greeting_in_english: str, **kwargs: Any) -> None: """Has added parameters across the API versions. :param greeting_in_english: pass in 'hello' to pass test. Required. @@ -461,7 +456,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/operations/_operation_group_one_operations.py index 764c93e9b61..ce64ec4c546 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,14 +54,14 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_two(self, **kwargs: Any) -> None: """TestTwo should be in OperationGroupOneOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/models/_models_py3.py index 0446516ff6f..93d38043e62 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/operations/_multiapi_service_client_operations.py index 1b97e897d20..ec3d941ed8d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -147,7 +146,7 @@ def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -190,7 +189,7 @@ def test_one( # pylint: disable=inconsistent-return-statements def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -342,7 +341,7 @@ def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -419,7 +418,7 @@ def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -535,7 +534,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/operations/_operation_group_one_operations.py index 7c7d60b7595..f6fee2b20d0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +83,7 @@ def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py index eb3087cc064..0912525614d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py @@ -15,7 +15,7 @@ VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_metadata.json index df665dd0bd0..b4a9129536b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:param greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:type greeting_in_chinese: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, greeting_in_chinese, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_multiapi_service_client.py index d9049cab140..ab171b0b766 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_multiapi_service_client.py @@ -22,7 +22,7 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py index ff6bef14222..c6dedcb071d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py @@ -15,7 +15,7 @@ VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_multiapi_service_client.py index 97cdb2a66db..4d425a8b9d6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_multiapi_service_client.py @@ -22,7 +22,7 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_multiapi_service_client_operations.py index 81f0034a18a..3bb6b8555bc 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +53,7 @@ async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) :rtype: ~multiapicredentialdefaultpolicy.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) return deserialized # type: ignore @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, **kwargs: Any ) -> None: """Has added parameters across the API versions. @@ -112,7 +111,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_operation_group_one_operations.py index 5840859cbc3..015e383a8fa 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ async def test_two( :rtype: ~multiapicredentialdefaultpolicy.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -156,14 +155,14 @@ async def test_two( return deserialized # type: ignore @distributed_trace_async - async def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_three(self, **kwargs: Any) -> None: """TestThree should be in OperationGroupOneOperations. Takes in ModelTwo. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_operation_group_two_operations.py index 415efdca1ca..a4da2d85b0a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,9 +54,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, parameter_one: bool, **kwargs: Any - ) -> None: + async def test_four(self, parameter_one: bool, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param parameter_one: A boolean parameter. Required. @@ -66,7 +63,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/models/_models_py3.py index 9cf91d5a57a..46990252065 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_multiapi_service_client_operations.py index ef4ef1070e3..be1a9b9e82e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -103,7 +102,7 @@ def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) -> _mo :rtype: ~multiapicredentialdefaultpolicy.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,7 +160,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_operation_group_one_operations.py index 1d2c9040468..7f8bf5f5700 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -144,7 +143,7 @@ def test_two( :rtype: ~multiapicredentialdefaultpolicy.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -207,7 +206,7 @@ def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_operation_group_two_operations.py index 25654b0b4ae..ecae6014d5d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -87,7 +86,7 @@ def test_four(self, parameter_one: bool, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py index ca0e2dc6b68..eca4a1b0a56 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py @@ -15,7 +15,7 @@ VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_metadata.json index 231ae0e7784..7a34f154b40 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:param greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:type greeting_in_chinese: str\n:param greeting_in_french: pass in \u0027bonjour\u0027 to pass test. Default value is None.\n:type greeting_in_french: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, greeting_in_chinese, greeting_in_french, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_multiapi_service_client.py index 47e20db653a..e27caf2ecf8 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_multiapi_service_client.py @@ -22,7 +22,7 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py index 8adf47e359b..1f5ce3c0e76 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py @@ -15,7 +15,7 @@ VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_multiapi_service_client.py index 75302645393..fd43b96f213 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_multiapi_service_client.py @@ -22,7 +22,7 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_multiapi_service_client_operations.py index fc9a4b6231b..c1765973ab2 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,7 +61,7 @@ def test_paging(self, **kwargs: Any) -> AsyncIterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -121,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, @@ -140,7 +139,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_operation_group_one_operations.py index aad12e97991..b1af64630fb 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -75,7 +74,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> AsyncIterable["_models.M cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ async def test_two( :rtype: ~multiapicredentialdefaultpolicy.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_operation_group_two_operations.py index 152493e811e..f447c159587 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +55,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -72,7 +71,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -89,9 +88,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def test_four(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param input: Input parameter. Is either a SourcePath type or a IO[bytes] type. Default value @@ -101,7 +98,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -153,14 +150,14 @@ async def test_four( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_five(self, **kwargs: Any) -> None: """TestFive should be in OperationGroupTwoOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/models/_models_py3.py index 5844a044ec7..79a8e667ab8 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_multiapi_service_client_operations.py index 382b7cab5d8..7225a31c9db 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse from azure.core.exceptions import ( @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -104,7 +103,7 @@ def test_paging(self, **kwargs: Any) -> Iterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_operation_group_one_operations.py index 6ae50eaac32..a0802150ed0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -109,7 +108,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> Iterable["_models.ModelT cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -216,7 +215,7 @@ def test_two( :rtype: ~multiapicredentialdefaultpolicy.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_operation_group_two_operations.py index 26157516fd5..e37e6579d60 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -116,7 +115,7 @@ def test_four( # pylint: disable=inconsistent-return-statements """ @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -145,7 +144,7 @@ def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,7 +203,7 @@ def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/_serialization.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/_serialization.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/aio/_operations_mixin.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/aio/_operations_mixin.py index 5e34f4f27f9..f62c3446472 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/aio/_operations_mixin.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/aio/_operations_mixin.py @@ -16,7 +16,7 @@ class MultiapiCustomBaseUrlServiceClientOperationsMixin(object): - async def test( # pylint: disable=inconsistent-return-statements + async def test( self, id: int, **kwargs: Any diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py index 4a701be45aa..e88c1c6d7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py @@ -11,7 +11,6 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_metadata.json index 4926038cb2c..5142ca2da1c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_metadata.json @@ -106,7 +106,7 @@ }, "async": { "coroutine": true, - "signature": "async def test( # pylint: disable=inconsistent-return-statements\n self,\n id: int,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test(\n self,\n id: int,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Should be a mixin operation. Put in 1 for the required parameter and have the correct api\nversion of 1.0.0 to pass.\n\n:param id: An int parameter. Put in 1 to pass. Required.\n:type id: int\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "id, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_multiapi_custom_base_url_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_multiapi_custom_base_url_service_client.py index f8397446673..e961cb6fe23 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_multiapi_custom_base_url_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_multiapi_custom_base_url_service_client.py @@ -20,13 +20,10 @@ from .operations import MultiapiCustomBaseUrlServiceClientOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiCustomBaseUrlServiceClient( - MultiapiCustomBaseUrlServiceClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class MultiapiCustomBaseUrlServiceClient(MultiapiCustomBaseUrlServiceClientOperationsMixin): """Service client for multiapi custom base url testing. :param credential: Credential needed for the client to connect to Azure. Required. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_vendor.py index e1d4f2b44df..0a3cd09732c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_vendor.py @@ -11,13 +11,12 @@ from ._configuration import MultiapiCustomBaseUrlServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer -class MultiapiCustomBaseUrlServiceClientMixinABC(ABC): # pylint: disable=name-too-long +class MultiapiCustomBaseUrlServiceClientMixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" _client: "PipelineClient" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py index 52ab0acf3f6..9915f2c2e2e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py @@ -11,7 +11,6 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_multiapi_custom_base_url_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_multiapi_custom_base_url_service_client.py index 96f6f1ad504..37dbb09b777 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_multiapi_custom_base_url_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_multiapi_custom_base_url_service_client.py @@ -20,13 +20,10 @@ from .operations import MultiapiCustomBaseUrlServiceClientOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiCustomBaseUrlServiceClient( - MultiapiCustomBaseUrlServiceClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class MultiapiCustomBaseUrlServiceClient(MultiapiCustomBaseUrlServiceClientOperationsMixin): """Service client for multiapi custom base url testing. :param credential: Credential needed for the client to connect to Azure. Required. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_vendor.py index 9bfd415353f..50ff3986a8d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_vendor.py @@ -11,13 +11,12 @@ from ._configuration import MultiapiCustomBaseUrlServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer -class MultiapiCustomBaseUrlServiceClientMixinABC(ABC): # pylint: disable=name-too-long +class MultiapiCustomBaseUrlServiceClientMixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" _client: "AsyncPipelineClient" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/operations/_multiapi_custom_base_url_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/operations/_multiapi_custom_base_url_service_client_operations.py index 94aa013d757..dc3cc527caa 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/operations/_multiapi_custom_base_url_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/operations/_multiapi_custom_base_url_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +43,7 @@ def _api_version(self, op_name: str) -> str: # pylint: disable=unused-argument return "" @distributed_trace_async - async def test(self, id: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test(self, id: int, **kwargs: Any) -> None: """Should be a mixin operation. Put in 1 for the required parameter and have the correct api version of 1.0.0 to pass. @@ -54,7 +53,7 @@ async def test(self, id: int, **kwargs: Any) -> None: # pylint: disable=inconsi :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/models/_models_py3.py index 09d984fece7..4ccf63e55b5 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/operations/_multiapi_custom_base_url_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/operations/_multiapi_custom_base_url_service_client_operations.py index 1bea82c847d..0a5f910a9f0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/operations/_multiapi_custom_base_url_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/operations/_multiapi_custom_base_url_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -77,7 +76,7 @@ def test(self, id: int, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py index 93beda4e13f..5f2904887f8 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py @@ -11,7 +11,6 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_metadata.json index 95e90d4bb2f..6d520449eb0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_metadata.json @@ -106,7 +106,7 @@ }, "async": { "coroutine": true, - "signature": "async def test( # pylint: disable=inconsistent-return-statements\n self,\n id: int,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test(\n self,\n id: int,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Should be a mixin operation. Put in 2 for the required parameter and have the correct api\nversion of 2.0.0 to pass.\n\n:param id: An int parameter. Put in 2 to pass. Required.\n:type id: int\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "id, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_multiapi_custom_base_url_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_multiapi_custom_base_url_service_client.py index ed765d90a3e..ed15d88585e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_multiapi_custom_base_url_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_multiapi_custom_base_url_service_client.py @@ -20,13 +20,10 @@ from .operations import MultiapiCustomBaseUrlServiceClientOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiCustomBaseUrlServiceClient( - MultiapiCustomBaseUrlServiceClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class MultiapiCustomBaseUrlServiceClient(MultiapiCustomBaseUrlServiceClientOperationsMixin): """Service client for multiapi custom base url testing. :param credential: Credential needed for the client to connect to Azure. Required. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_vendor.py index e1d4f2b44df..0a3cd09732c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_vendor.py @@ -11,13 +11,12 @@ from ._configuration import MultiapiCustomBaseUrlServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer -class MultiapiCustomBaseUrlServiceClientMixinABC(ABC): # pylint: disable=name-too-long +class MultiapiCustomBaseUrlServiceClientMixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" _client: "PipelineClient" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py index 9888d330d06..0bdd1c9cfd0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py @@ -11,7 +11,6 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_multiapi_custom_base_url_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_multiapi_custom_base_url_service_client.py index b3e603bb819..98cc9e0b5e0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_multiapi_custom_base_url_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_multiapi_custom_base_url_service_client.py @@ -20,13 +20,10 @@ from .operations import MultiapiCustomBaseUrlServiceClientOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiCustomBaseUrlServiceClient( - MultiapiCustomBaseUrlServiceClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class MultiapiCustomBaseUrlServiceClient(MultiapiCustomBaseUrlServiceClientOperationsMixin): """Service client for multiapi custom base url testing. :param credential: Credential needed for the client to connect to Azure. Required. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_vendor.py index 9bfd415353f..50ff3986a8d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_vendor.py @@ -11,13 +11,12 @@ from ._configuration import MultiapiCustomBaseUrlServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer -class MultiapiCustomBaseUrlServiceClientMixinABC(ABC): # pylint: disable=name-too-long +class MultiapiCustomBaseUrlServiceClientMixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" _client: "AsyncPipelineClient" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/operations/_multiapi_custom_base_url_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/operations/_multiapi_custom_base_url_service_client_operations.py index 0dc69cb2830..6bbcee4be50 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/operations/_multiapi_custom_base_url_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/operations/_multiapi_custom_base_url_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +43,7 @@ def _api_version(self, op_name: str) -> str: # pylint: disable=unused-argument return "" @distributed_trace_async - async def test(self, id: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test(self, id: int, **kwargs: Any) -> None: """Should be a mixin operation. Put in 2 for the required parameter and have the correct api version of 2.0.0 to pass. @@ -54,7 +53,7 @@ async def test(self, id: int, **kwargs: Any) -> None: # pylint: disable=inconsi :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/models/_models_py3.py index 09d984fece7..4ccf63e55b5 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/operations/_multiapi_custom_base_url_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/operations/_multiapi_custom_base_url_service_client_operations.py index 7bbc0eaad71..a7610c97bcb 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/operations/_multiapi_custom_base_url_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/operations/_multiapi_custom_base_url_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -77,7 +76,7 @@ def test(self, id: int, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/_serialization.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/_serialization.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/aio/_operations_mixin.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/aio/_operations_mixin.py index fb44f34cdfe..0d8e7162766 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/aio/_operations_mixin.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/aio/_operations_mixin.py @@ -82,7 +82,7 @@ async def begin_test_lro_and_paging( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.begin_test_lro_and_paging(client_request_id, test_lro_and_paging_options, **kwargs) - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, @@ -119,7 +119,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.test_different_calls(greeting_in_english, greeting_in_chinese, greeting_in_french, **kwargs) - async def test_one( # pylint: disable=inconsistent-return-statements + async def test_one( self, id: int, message: Optional[str] = None, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py index dde6d29e863..09e03ece143 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_metadata.json index 65fd8f6ce57..6afc2663b28 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_metadata.json @@ -108,7 +108,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_one( # pylint: disable=inconsistent-return-statements\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter. Required.\n:type id: int\n:param message: An optional string parameter. Default value is None.\n:type message: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "id, message, **kwargs" } @@ -173,7 +173,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_multiapi_service_client.py index b92386fc1d8..02e0b796d19 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py index 1552258ef9c..3d6432fa758 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_multiapi_service_client.py index 93fc104869b..c5457654c34 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/operations/_multiapi_service_client_operations.py index a110c6f3556..1592e7e3079 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,9 +54,7 @@ def _api_version(self, op_name: str) -> str: # pylint: disable=unused-argument return "" @distributed_trace_async - async def test_one( # pylint: disable=inconsistent-return-statements - self, id: int, message: Optional[str] = None, **kwargs: Any - ) -> None: + async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) -> None: """TestOne should be in an FirstVersionOperationsMixin. :param id: An int parameter. Required. @@ -68,7 +65,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -111,7 +108,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements async def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +263,7 @@ async def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -343,7 +340,7 @@ async def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -448,9 +445,7 @@ async def internal_get_next(next_link=None): ) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements - self, greeting_in_english: str, **kwargs: Any - ) -> None: + async def test_different_calls(self, greeting_in_english: str, **kwargs: Any) -> None: """Has added parameters across the API versions. :param greeting_in_english: pass in 'hello' to pass test. Required. @@ -459,7 +454,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/operations/_operation_group_one_operations.py index f0da01a0e03..35141ff86c5 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,14 +53,14 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_two(self, **kwargs: Any) -> None: """TestTwo should be in OperationGroupOneOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/models/_models_py3.py index e72441988cb..918a39761c2 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/operations/_multiapi_service_client_operations.py index 3983812bce4..7deb4528d01 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -146,7 +145,7 @@ def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -189,7 +188,7 @@ def test_one( # pylint: disable=inconsistent-return-statements def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -341,7 +340,7 @@ def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -417,7 +416,7 @@ def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -533,7 +532,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/operations/_operation_group_one_operations.py index e4e2bf48013..160c63eedd4 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -83,7 +82,7 @@ def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py index b27466d5f26..5e60bea3540 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_metadata.json index 98c25a5bf5e..a897337ae5d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:param greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:type greeting_in_chinese: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, greeting_in_chinese, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_multiapi_service_client.py index 34b01ec03b9..2f9a67a9e8c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py index f140c9951e3..8d71e3f2f72 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_multiapi_service_client.py index 4d7c7ca5c6c..4809ee86266 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_multiapi_service_client_operations.py index e1cfa3d9289..4b446c5f02c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +52,7 @@ async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) :rtype: ~multiapidataplane.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -98,7 +97,7 @@ async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) return deserialized # type: ignore @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, **kwargs: Any ) -> None: """Has added parameters across the API versions. @@ -111,7 +110,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_one_operations.py index 3ee0056a51f..b6a71a2e585 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +98,7 @@ async def test_two( :rtype: ~multiapidataplane.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -155,14 +154,14 @@ async def test_two( return deserialized # type: ignore @distributed_trace_async - async def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_three(self, **kwargs: Any) -> None: """TestThree should be in OperationGroupOneOperations. Takes in ModelTwo. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_two_operations.py index 2d1fe274a11..ded5facbd78 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,9 +53,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, parameter_one: bool, **kwargs: Any - ) -> None: + async def test_four(self, parameter_one: bool, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param parameter_one: A boolean parameter. Required. @@ -65,7 +62,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/models/_models_py3.py index 9cf91d5a57a..46990252065 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_multiapi_service_client_operations.py index e8573a8cb38..66ca2e3753e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -102,7 +101,7 @@ def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) -> _mo :rtype: ~multiapidataplane.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,7 +159,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_operation_group_one_operations.py index dff63c4e271..dfed4c01227 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -143,7 +142,7 @@ def test_two( :rtype: ~multiapidataplane.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -206,7 +205,7 @@ def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_operation_group_two_operations.py index 19570278c44..7488db14ba2 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -86,7 +85,7 @@ def test_four(self, parameter_one: bool, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py index 6400c389992..9826b12b94f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_metadata.json index 91f39e3a204..70a84e3a7b8 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:param greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:type greeting_in_chinese: str\n:param greeting_in_french: pass in \u0027bonjour\u0027 to pass test. Default value is None.\n:type greeting_in_french: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, greeting_in_chinese, greeting_in_french, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_multiapi_service_client.py index 048ad80b47e..7b6fc625cf4 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py index f3dcae5d623..0b30d2372cd 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_multiapi_service_client.py index b7296cc1228..56e1a56df02 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_multiapi_service_client_operations.py index c20dddb37b8..9e5c6f71af5 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -60,7 +59,7 @@ def test_paging(self, **kwargs: Any) -> AsyncIterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -119,7 +118,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, @@ -138,7 +137,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_operation_group_one_operations.py index f5a2d0e6c43..a6ead9ba8c6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -73,7 +72,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> AsyncIterable["_models.M cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -180,7 +179,7 @@ async def test_two( :rtype: ~multiapidataplane.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_operation_group_two_operations.py index 2788f040cbc..19e03f22b23 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +54,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -71,7 +70,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -88,9 +87,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def test_four(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param input: Input parameter. Is either a SourcePath type or a IO[bytes] type. Default value @@ -100,7 +97,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -152,14 +149,14 @@ async def test_four( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_five(self, **kwargs: Any) -> None: """TestFive should be in OperationGroupTwoOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/models/_models_py3.py index 761a14b3c82..0b7fe77b89e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_multiapi_service_client_operations.py index 3c793b56d92..74b0a8bfab5 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse from azure.core.exceptions import ( @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -103,7 +102,7 @@ def test_paging(self, **kwargs: Any) -> Iterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +180,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_operation_group_one_operations.py index ecc480651af..96c3dd80870 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -108,7 +107,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> Iterable["_models.ModelT cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -215,7 +214,7 @@ def test_two( :rtype: ~multiapidataplane.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_operation_group_two_operations.py index ac043dac2c4..7cb38df4f2c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +98,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -115,7 +114,7 @@ def test_four( # pylint: disable=inconsistent-return-statements """ @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -144,7 +143,7 @@ def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -203,7 +202,7 @@ def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/_serialization.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/_serialization.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/aio/_operations_mixin.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/aio/_operations_mixin.py index 30b5f07f26a..4fe052cfe62 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/aio/_operations_mixin.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/aio/_operations_mixin.py @@ -83,7 +83,7 @@ async def begin_test_lro_and_paging( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.begin_test_lro_and_paging(test_lro_and_paging_options, client_request_id=client_request_id, **kwargs) - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, *, greeting_in_english: str, @@ -121,7 +121,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.test_different_calls(greeting_in_english=greeting_in_english, greeting_in_chinese=greeting_in_chinese, greeting_in_french=greeting_in_french, **kwargs) - async def test_one( # pylint: disable=inconsistent-return-statements + async def test_one( self, *, id: int, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py index 56a7883e9b5..6810552fa19 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_metadata.json index b3234d98f9d..cb47fa50483 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_metadata.json @@ -108,7 +108,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_one( # pylint: disable=inconsistent-return-statements\n self,\n *,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_one(\n self,\n *,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:keyword id: An int parameter. Required.\n:paramtype id: int\n:keyword message: An optional string parameter. Default value is None.\n:paramtype message: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "id=id, message=message, **kwargs" } @@ -173,7 +173,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n *,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n *,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:keyword greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:paramtype greeting_in_english: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english=greeting_in_english, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_multiapi_service_client.py index 06876cf5a85..4c91d87e39f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py index 22e2193fd15..e704da2b33e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_multiapi_service_client.py index 1cbc608bd8b..3d1a97d3380 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/operations/_multiapi_service_client_operations.py index 71e0774d446..1a4887a3ccf 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,9 +54,7 @@ def _api_version(self, op_name: str) -> str: # pylint: disable=unused-argument return "" @distributed_trace_async - async def test_one( # pylint: disable=inconsistent-return-statements - self, *, id: int, message: Optional[str] = None, **kwargs: Any - ) -> None: + async def test_one(self, *, id: int, message: Optional[str] = None, **kwargs: Any) -> None: """TestOne should be in an FirstVersionOperationsMixin. :keyword id: An int parameter. Required. @@ -68,7 +65,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -111,7 +108,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements async def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +264,7 @@ async def _test_lro_and_paging_initial( client_request_id: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -345,7 +342,7 @@ async def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -450,9 +447,7 @@ async def internal_get_next(next_link=None): ) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements - self, *, greeting_in_english: str, **kwargs: Any - ) -> None: + async def test_different_calls(self, *, greeting_in_english: str, **kwargs: Any) -> None: """Has added parameters across the API versions. :keyword greeting_in_english: pass in 'hello' to pass test. Required. @@ -461,7 +456,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/operations/_operation_group_one_operations.py index be9c246b610..41b52864a73 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,14 +53,14 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_two(self, **kwargs: Any) -> None: """TestTwo should be in OperationGroupOneOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/models/_models_py3.py index 68056815961..57b29f30605 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/operations/_multiapi_service_client_operations.py index c7629307209..b8fe62eda38 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -146,7 +145,7 @@ def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -189,7 +188,7 @@ def test_one( # pylint: disable=inconsistent-return-statements def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -342,7 +341,7 @@ def _test_lro_and_paging_initial( client_request_id: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -419,7 +418,7 @@ def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -535,7 +534,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/operations/_operation_group_one_operations.py index 0d99e750e1f..1db6fa5ca6b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -83,7 +82,7 @@ def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py index e11b8846a04..74eee4f7f7d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_metadata.json index 534cdbc6a03..547d03862f9 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n *,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n *,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:keyword greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:paramtype greeting_in_english: str\n:keyword greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:paramtype greeting_in_chinese: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english=greeting_in_english, greeting_in_chinese=greeting_in_chinese, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_multiapi_service_client.py index b2c65fb75cf..30bdc5c6c06 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py index 1aeb3c27246..2faf9fb852f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_multiapi_service_client.py index 97473f64781..0dc415a7c7e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_multiapi_service_client_operations.py index 62425e65d80..b6feefbb231 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +52,7 @@ async def test_one(self, *, id: int, message: Optional[str] = None, **kwargs: An :rtype: ~multiapikeywordonly.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -98,7 +97,7 @@ async def test_one(self, *, id: int, message: Optional[str] = None, **kwargs: An return deserialized # type: ignore @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, *, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, **kwargs: Any ) -> None: """Has added parameters across the API versions. @@ -111,7 +110,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_operation_group_one_operations.py index 30a19c88b65..f6f4410b013 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +98,7 @@ async def test_two( :rtype: ~multiapikeywordonly.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -155,14 +154,14 @@ async def test_two( return deserialized # type: ignore @distributed_trace_async - async def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_three(self, **kwargs: Any) -> None: """TestThree should be in OperationGroupOneOperations. Takes in ModelTwo. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_operation_group_two_operations.py index a2c895fa7d6..58c8d1ca210 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,9 +53,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, *, parameter_one: bool, **kwargs: Any - ) -> None: + async def test_four(self, *, parameter_one: bool, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :keyword parameter_one: A boolean parameter. Required. @@ -65,7 +62,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/models/_models_py3.py index 9cf91d5a57a..46990252065 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_multiapi_service_client_operations.py index 1c9acdd6a1e..a5233c33e63 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -102,7 +101,7 @@ def test_one(self, *, id: int, message: Optional[str] = None, **kwargs: Any) -> :rtype: ~multiapikeywordonly.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,7 +159,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_operation_group_one_operations.py index b70839518d6..9c4025eee8f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -143,7 +142,7 @@ def test_two( :rtype: ~multiapikeywordonly.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -206,7 +205,7 @@ def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_operation_group_two_operations.py index a3aa875d055..9aa1d1c87ce 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -88,7 +87,7 @@ def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py index daf28632105..525afec9c0b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_metadata.json index 211520eec7d..89a87306b02 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n *,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n *,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:keyword greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:paramtype greeting_in_english: str\n:keyword greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:paramtype greeting_in_chinese: str\n:keyword greeting_in_french: pass in \u0027bonjour\u0027 to pass test. Default value is None.\n:paramtype greeting_in_french: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english=greeting_in_english, greeting_in_chinese=greeting_in_chinese, greeting_in_french=greeting_in_french, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_multiapi_service_client.py index 8e91987a906..1e86a7b095e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py index 77abf245f65..fa0ebc27201 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_multiapi_service_client.py index 36e3c7acc76..519ff60a57e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_multiapi_service_client_operations.py index d5b7ecda3bb..e75413f0e1e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -60,7 +59,7 @@ def test_paging(self, **kwargs: Any) -> AsyncIterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -119,7 +118,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, *, greeting_in_english: str, @@ -139,7 +138,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_operation_group_one_operations.py index dfe987197f4..a8632ecebad 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -73,7 +72,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> AsyncIterable["_models.M cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -180,7 +179,7 @@ async def test_two( :rtype: ~multiapikeywordonly.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_operation_group_two_operations.py index 8deb5470cde..d159601c24a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +54,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -71,7 +70,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -88,9 +87,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def test_four(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param input: Input parameter. Is either a SourcePath type or a IO[bytes] type. Default value @@ -100,7 +97,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -152,14 +149,14 @@ async def test_four( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_five(self, **kwargs: Any) -> None: """TestFive should be in OperationGroupTwoOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/models/_models_py3.py index 6a4a70ec07c..558a0c7c0ca 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_multiapi_service_client_operations.py index 397c7596cab..6f2a65b7f58 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse from azure.core.exceptions import ( @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -103,7 +102,7 @@ def test_paging(self, **kwargs: Any) -> Iterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_operation_group_one_operations.py index ebf76ca0217..f45c29d6e24 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -108,7 +107,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> Iterable["_models.ModelT cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -215,7 +214,7 @@ def test_two( :rtype: ~multiapikeywordonly.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_operation_group_two_operations.py index 4777675aa7b..65c837d0fe7 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +98,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -115,7 +114,7 @@ def test_four( # pylint: disable=inconsistent-return-statements """ @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -144,7 +143,7 @@ def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -203,7 +202,7 @@ def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/_serialization.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/_serialization.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py index 9e83c54b10f..c4224d94b4c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json index 94f378b8314..23c84d47768 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json @@ -108,7 +108,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_one( # pylint: disable=inconsistent-return-statements\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter. Required.\n:type id: int\n:param message: An optional string parameter. Default value is None.\n:type message: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "id, message, **kwargs" } @@ -173,7 +173,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_multiapi_service_client.py index 4187a5d7e1d..6c7eda4e245 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/models/_models_py3.py index a41b3aeeedf..3379281e03e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_multiapi_service_client_operations.py index 0d8bf82401a..f9a3405e005 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -147,7 +146,7 @@ def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -190,7 +189,7 @@ def test_one( # pylint: disable=inconsistent-return-statements def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -342,7 +341,7 @@ def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -418,7 +417,7 @@ def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -534,7 +533,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_operation_group_one_operations.py index 86edfae27a2..fa640fca422 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +83,7 @@ def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py index 5dc9f6fa4e8..91e7712fba7 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json index 4f95e7b3445..5cf2764ec1a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:param greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:type greeting_in_chinese: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, greeting_in_chinese, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_multiapi_service_client.py index fe5a33bc2f1..b42aa5f432b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/models/_models_py3.py index 9cf91d5a57a..46990252065 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_multiapi_service_client_operations.py index 230d5e6411f..9cd9fc89b1d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -103,7 +102,7 @@ def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) -> _mo :rtype: ~multiapinoasync.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,7 +160,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_operation_group_one_operations.py index 156ee6f7f17..cd290cb1235 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -144,7 +143,7 @@ def test_two( :rtype: ~multiapinoasync.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -207,7 +206,7 @@ def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_operation_group_two_operations.py index 46e8771b615..240741ec538 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -87,7 +86,7 @@ def test_four(self, parameter_one: bool, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py index 224ca9b91cb..74845e1428b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json index c44646013ef..ca1ede8bb18 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:param greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:type greeting_in_chinese: str\n:param greeting_in_french: pass in \u0027bonjour\u0027 to pass test. Default value is None.\n:type greeting_in_french: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, greeting_in_chinese, greeting_in_french, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_multiapi_service_client.py index 231ec7dfca3..089af5a6d19 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/models/_models_py3.py index a8495337143..04f6ab18536 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_multiapi_service_client_operations.py index 0d1785eb577..b23e72f4dea 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse from azure.core.exceptions import ( @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -104,7 +103,7 @@ def test_paging(self, **kwargs: Any) -> Iterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_operation_group_one_operations.py index b5dfa9f9626..d230ae6ed31 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -109,7 +108,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> Iterable["_models.ModelT cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -216,7 +215,7 @@ def test_two( :rtype: ~multiapinoasync.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_operation_group_two_operations.py index 87a40508b5b..238f6b6713a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -116,7 +115,7 @@ def test_four( # pylint: disable=inconsistent-return-statements """ @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -145,7 +144,7 @@ def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,7 +203,7 @@ def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/_serialization.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/_serialization.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/aio/_operations_mixin.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/aio/_operations_mixin.py index 397c7311271..28acde6ef7c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/aio/_operations_mixin.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/aio/_operations_mixin.py @@ -82,7 +82,7 @@ async def begin_test_lro_and_paging( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.begin_test_lro_and_paging(client_request_id, test_lro_and_paging_options, **kwargs) - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, **kwargs: Any @@ -109,7 +109,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.test_different_calls(greeting_in_english, **kwargs) - async def test_one( # pylint: disable=inconsistent-return-statements + async def test_one( self, id: int, message: Optional[str] = None, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py index 06877aa2830..9851b5dfa42 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_multiapi_service_client.py index adfd0753e22..fda5b5367df 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient: # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient: """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py index ed013133b88..74a93dfdd47 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_multiapi_service_client.py index a73f517c707..0010438f296 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient: # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient: """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/operations/_operation_group_one_operations.py index 5a4c6835fea..e5a310e7549 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,14 +53,14 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_two(self, **kwargs: Any) -> None: """TestTwo should be in OperationGroupOneOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/models/_models_py3.py index 5334d3d54d1..9797a5a8c77 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/operations/_operation_group_one_operations.py index 3d9bee7b370..41c1c3b31d9 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -83,7 +82,7 @@ def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py index 8db9c76f430..ab8adb477f6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_metadata.json index 8c47757af1a..2afa2ae0f40 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_metadata.json @@ -108,7 +108,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_one( # pylint: disable=inconsistent-return-statements\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter. Required.\n:type id: int\n:param message: An optional string parameter. Default value is None.\n:type message: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "id, message, **kwargs" } @@ -173,7 +173,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_multiapi_service_client.py index 9524d5b72ef..e26d21c5737 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py index 86189304891..cc1b4d0032a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py @@ -11,13 +11,12 @@ from azure.core.pipeline import policies if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_multiapi_service_client.py index 45397f7b618..7e9382d9988 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_multiapi_service_client.py @@ -20,11 +20,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/operations/_multiapi_service_client_operations.py index d448a38e7ef..3dc7f3d0999 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,9 +54,7 @@ def _api_version(self, op_name: str) -> str: # pylint: disable=unused-argument return "" @distributed_trace_async - async def test_one( # pylint: disable=inconsistent-return-statements - self, id: int, message: Optional[str] = None, **kwargs: Any - ) -> None: + async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) -> None: """TestOne should be in an FirstVersionOperationsMixin. :param id: An int parameter. Required. @@ -68,7 +65,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -111,7 +108,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements async def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +263,7 @@ async def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -343,7 +340,7 @@ async def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -448,9 +445,7 @@ async def internal_get_next(next_link=None): ) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements - self, greeting_in_english: str, **kwargs: Any - ) -> None: + async def test_different_calls(self, greeting_in_english: str, **kwargs: Any) -> None: """Has added parameters across the API versions. :param greeting_in_english: pass in 'hello' to pass test. Required. @@ -459,7 +454,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/operations/_operation_group_one_operations.py index a5847861b1b..1a3584ea4a0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,14 +53,14 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_two(self, **kwargs: Any) -> None: """TestTwo should be in OperationGroupOneOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/models/_models_py3.py index 22fa3216145..c9ddcd7fa74 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/operations/_multiapi_service_client_operations.py index 93e1dfcd22c..4efe481b2f2 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -146,7 +145,7 @@ def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -189,7 +188,7 @@ def test_one( # pylint: disable=inconsistent-return-statements def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -341,7 +340,7 @@ def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -417,7 +416,7 @@ def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -533,7 +532,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/operations/_operation_group_one_operations.py index d95a4484c52..883e25b35e0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -83,7 +82,7 @@ def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/_serialization.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/_serialization.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin.py index 26a86232e0c..7f09d080a5e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin.py @@ -83,7 +83,7 @@ async def begin_test_lro_and_paging( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.begin_test_lro_and_paging(client_request_id, test_lro_and_paging_options, **kwargs) - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, @@ -120,7 +120,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.test_different_calls(greeting_in_english, greeting_in_chinese, greeting_in_french, **kwargs) - async def test_one( # pylint: disable=inconsistent-return-statements + async def test_one( self, id: int, message: Optional[str] = None, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py index d39bd5ab60a..3dd2e667247 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json index 9d81015449c..1d15d3d6390 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json @@ -108,7 +108,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_one( # pylint: disable=inconsistent-return-statements\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter. Required.\n:type id: int\n:param message: An optional string parameter. Default value is None.\n:type message: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "id, message, **kwargs" } @@ -173,7 +173,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_multiapi_service_client.py index 8221a358587..d804d78d30d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py index 014826b5003..d9524f4ef39 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_multiapi_service_client.py index e3c1bf5f8f0..4bc4f474464 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations/_multiapi_service_client_operations.py index 0fea23052ae..7f47fddb36c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -43,7 +42,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,9 +55,7 @@ def _api_version(self, op_name: str) -> str: # pylint: disable=unused-argument return "" @distributed_trace_async - async def test_one( # pylint: disable=inconsistent-return-statements - self, id: int, message: Optional[str] = None, **kwargs: Any - ) -> None: + async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) -> None: """TestOne should be in an FirstVersionOperationsMixin. :param id: An int parameter. Required. @@ -69,7 +66,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,7 +109,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements async def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +264,7 @@ async def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -345,7 +342,7 @@ async def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -450,9 +447,7 @@ async def internal_get_next(next_link=None): ) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements - self, greeting_in_english: str, **kwargs: Any - ) -> None: + async def test_different_calls(self, greeting_in_english: str, **kwargs: Any) -> None: """Has added parameters across the API versions. :param greeting_in_english: pass in 'hello' to pass test. Required. @@ -461,7 +456,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations/_operation_group_one_operations.py index 719cd5f3448..f76a78464d8 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,14 +54,14 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_two(self, **kwargs: Any) -> None: """TestTwo should be in OperationGroupOneOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/models/_models_py3.py index 0ef18154bd1..cbc5fbd265b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_multiapi_service_client_operations.py index e4383b7694f..3a3cd22d345 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -147,7 +146,7 @@ def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -190,7 +189,7 @@ def test_one( # pylint: disable=inconsistent-return-statements def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -342,7 +341,7 @@ def _test_lro_and_paging_initial( test_lro_and_paging_options: Optional[_models.TestLroAndPagingOptions] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -419,7 +418,7 @@ def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -535,7 +534,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_operation_group_one_operations.py index 79e032f7531..f9fd0e6235a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +83,7 @@ def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py index c0569f32480..ccf9343999a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json index 34acf2eb8a5..d5ebe031636 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:param greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:type greeting_in_chinese: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, greeting_in_chinese, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_multiapi_service_client.py index 398e1221b72..d4e7e77885b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py index 9f6131dc23a..3ef47ecd0f2 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_multiapi_service_client.py index 3f048531d8c..dba17194fa3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_multiapi_service_client_operations.py index d0af7544e4a..3dcd40687ba 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +53,7 @@ async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) :rtype: ~multiapiwithsubmodule.submodule.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) return deserialized # type: ignore @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, **kwargs: Any ) -> None: """Has added parameters across the API versions. @@ -112,7 +111,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_operation_group_one_operations.py index 29c19905067..07f2b00ced9 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ async def test_two( :rtype: ~multiapiwithsubmodule.submodule.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -156,14 +155,14 @@ async def test_two( return deserialized # type: ignore @distributed_trace_async - async def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_three(self, **kwargs: Any) -> None: """TestThree should be in OperationGroupOneOperations. Takes in ModelTwo. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_operation_group_two_operations.py index 187dc961e78..9f90431c490 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,9 +54,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, parameter_one: bool, **kwargs: Any - ) -> None: + async def test_four(self, parameter_one: bool, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param parameter_one: A boolean parameter. Required. @@ -66,7 +63,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/models/_models_py3.py index 9cf91d5a57a..46990252065 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_multiapi_service_client_operations.py index 509e091e2f4..f4643b30912 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -103,7 +102,7 @@ def test_one(self, id: int, message: Optional[str] = None, **kwargs: Any) -> _mo :rtype: ~multiapiwithsubmodule.submodule.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,7 +160,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_one_operations.py index c1beb8cbad5..7348de6757f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -144,7 +143,7 @@ def test_two( :rtype: ~multiapiwithsubmodule.submodule.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -207,7 +206,7 @@ def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_two_operations.py index 8018840832e..63bc7ccc0d0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -87,7 +86,7 @@ def test_four(self, parameter_one: bool, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py index eb27ebd4fed..f39362fec82 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json index 1136e01ab3e..d3520011b2b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:param greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:type greeting_in_english: str\n:param greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:type greeting_in_chinese: str\n:param greeting_in_french: pass in \u0027bonjour\u0027 to pass test. Default value is None.\n:type greeting_in_french: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english, greeting_in_chinese, greeting_in_french, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_multiapi_service_client.py index 69f77d96b07..b507e04b23a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py index 502fc55bff8..6da45f95f65 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_multiapi_service_client.py index d2681aaeb1a..abaf7900ef2 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_multiapi_service_client_operations.py index 793f64e0a02..b1d0c672ba7 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,7 +61,7 @@ def test_paging(self, **kwargs: Any) -> AsyncIterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -121,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, @@ -140,7 +139,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_operation_group_one_operations.py index 09a870dcc36..87e66f8c331 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -75,7 +74,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> AsyncIterable["_models.M cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ async def test_two( :rtype: ~multiapiwithsubmodule.submodule.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_operation_group_two_operations.py index 4add104a2af..05151725dd8 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +55,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -72,7 +71,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -89,9 +88,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def test_four(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param input: Input parameter. Is either a SourcePath type or a IO[bytes] type. Default value @@ -101,7 +98,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -153,14 +150,14 @@ async def test_four( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_five(self, **kwargs: Any) -> None: """TestFive should be in OperationGroupTwoOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/models/_models_py3.py index 74fd0d92b84..a7d63282c19 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_multiapi_service_client_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_multiapi_service_client_operations.py index 7a48f9ff1f7..95b84481ec3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_multiapi_service_client_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_multiapi_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse from azure.core.exceptions import ( @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -104,7 +103,7 @@ def test_paging(self, **kwargs: Any) -> Iterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_operation_group_one_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_operation_group_one_operations.py index 4ed58982bdb..fb261b27c7a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_operation_group_one_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_operation_group_one_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -109,7 +108,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> Iterable["_models.ModelT cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -216,7 +215,7 @@ def test_two( :rtype: ~multiapiwithsubmodule.submodule.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_operation_group_two_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_operation_group_two_operations.py index 1c0f7b8f476..efedc6f0ca9 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_operation_group_two_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/operations/_operation_group_two_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -116,7 +115,7 @@ def test_four( # pylint: disable=inconsistent-return-statements """ @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -145,7 +144,7 @@ def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,7 +203,7 @@ def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_configuration.py index b34154fec17..f26bfbe150b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_serialization.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_serialization.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/_configuration.py index 5881df9787d..924dbdb2511 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/operations/_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/operations/_operations.py index fe980f0b56f..c3992e19425 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/operations/_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -41,18 +40,18 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import StreamClosedError from azure.core.exceptions import StreamConsumedError from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from ..._validation import api_version_validation from ...operations._operations import build_operation_group_one_test_three_request @@ -97,7 +96,7 @@ async def test_two( :rtype: ~multiapicombiner.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -157,14 +156,14 @@ async def test_two( method_valid_on=['2.0.0'], ) @distributed_trace_async - async def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_three(self, **kwargs: Any) -> None: """TestThree should be in OperationGroupOneOperations. Takes in ModelTwo. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -217,7 +216,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> AsyncIterable["_models.M cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,9 +302,7 @@ def __init__(self, *args, **kwargs): } ) @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def test_four(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param input: Input parameter. Is either a SourcePath type or a IO[bytes] type. Default value @@ -315,7 +312,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -371,14 +368,14 @@ async def test_four( # pylint: disable=inconsistent-return-statements method_valid_on=['3.0.0'], ) @distributed_trace_async - async def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_five(self, **kwargs: Any) -> None: """TestFive should be in OperationGroupTwoOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -426,7 +423,7 @@ async def _test_lro_and_paging_initial( client_request_id: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -481,7 +478,7 @@ async def _test_lro_and_paging_initial( async def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -631,7 +628,7 @@ async def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -743,7 +740,7 @@ async def internal_get_next(next_link=None): } ) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, *, greeting_in_english: str, @@ -763,7 +760,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -820,7 +817,7 @@ async def test_one(self, *, id: int, message: Optional[str] = None, **kwargs: An :rtype: ~multiapicombiner.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -881,7 +878,7 @@ def test_paging(self, **kwargs: Any) -> AsyncIterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/models/_models.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/models/_models.py index bd39a9c4732..e572bc9fc4c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/models/_models.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/operations/_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/operations/_operations.py index 1197e038089..f0a399d0445 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/operations/_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -42,12 +41,12 @@ -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import StreamClosedError from azure.core.exceptions import StreamConsumedError from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.mgmt.core.polling.arm_polling import ARMPolling -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from .._validation import api_version_validation def build_operation_group_one_test_two_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long @@ -142,7 +141,7 @@ def test_two( :rtype: ~multiapicombiner.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -209,7 +208,7 @@ def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -262,7 +261,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> Iterable["_models.ModelT cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -399,7 +398,7 @@ def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -462,7 +461,7 @@ def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -610,7 +609,7 @@ def _test_lro_and_paging_initial( client_request_id: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -665,7 +664,7 @@ def _test_lro_and_paging_initial( def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -813,7 +812,7 @@ def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -945,7 +944,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1002,7 +1001,7 @@ def test_one(self, *, id: int, message: Optional[str] = None, **kwargs: Any) -> :rtype: ~multiapicombiner.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1063,7 +1062,7 @@ def test_paging(self, **kwargs: Any) -> Iterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_configuration.py index f330e00d42e..79e32d87d94 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_metadata.json index 517dda7a1f1..ff69f821a3d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_metadata.json @@ -108,7 +108,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_one( # pylint: disable=inconsistent-return-statements\n self,\n *,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_one(\n self,\n *,\n id: int,\n message: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:keyword id: An int parameter. Required.\n:paramtype id: int\n:keyword message: An optional string parameter. Default value is None.\n:paramtype message: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "id=id, message=message, **kwargs" } @@ -173,7 +173,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n *,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n *,\n greeting_in_english: str,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:keyword greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:paramtype greeting_in_english: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english=greeting_in_english, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_multiapi_service_client.py index 28e6bbca3a3..24b18be3e61 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_configuration.py index e76b3e1f8b1..f706e232a1e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_multiapi_service_client.py index 0bc71035485..b402ddec33b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/operations/_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/operations/_operations.py index c11420224d8..e915b1c289f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/operations/_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -44,7 +43,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,9 +56,7 @@ def _api_version(self, op_name: str) -> str: # pylint: disable=unused-argument return "" @distributed_trace_async - async def test_one( # pylint: disable=inconsistent-return-statements - self, *, id: int, message: Optional[str] = None, **kwargs: Any - ) -> None: + async def test_one(self, *, id: int, message: Optional[str] = None, **kwargs: Any) -> None: """TestOne should be in an FirstVersionOperationsMixin. :keyword id: An int parameter. Required. @@ -70,7 +67,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -113,7 +110,7 @@ async def test_one( # pylint: disable=inconsistent-return-statements async def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -269,7 +266,7 @@ async def _test_lro_and_paging_initial( client_request_id: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -347,7 +344,7 @@ async def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -452,9 +449,7 @@ async def internal_get_next(next_link=None): ) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements - self, *, greeting_in_english: str, **kwargs: Any - ) -> None: + async def test_different_calls(self, *, greeting_in_english: str, **kwargs: Any) -> None: """Has added parameters across the API versions. :keyword greeting_in_english: pass in 'hello' to pass test. Required. @@ -463,7 +458,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -524,14 +519,14 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_two(self, **kwargs: Any) -> None: """TestTwo should be in OperationGroupOneOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/models/_models_py3.py index 8a803e76468..d1cf00f88d6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/operations/_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/operations/_operations.py index 8c46e49d84d..a7e0aeec963 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/operations/_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v1/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -168,7 +167,7 @@ def test_one( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -211,7 +210,7 @@ def test_one( # pylint: disable=inconsistent-return-statements def _test_lro_initial( self, product: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -364,7 +363,7 @@ def _test_lro_and_paging_initial( client_request_id: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -441,7 +440,7 @@ def begin_test_lro_and_paging( cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -557,7 +556,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -625,7 +624,7 @@ def test_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_configuration.py index a237021b526..f9444070b03 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_metadata.json index d836213a9da..50540a4c507 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n *,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n *,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:keyword greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:paramtype greeting_in_english: str\n:keyword greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:paramtype greeting_in_chinese: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english=greeting_in_english, greeting_in_chinese=greeting_in_chinese, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_multiapi_service_client.py index 4297dcd2a00..5cef307ba5e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_configuration.py index 7066874273c..2156d35f402 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_multiapi_service_client.py index 94fe1ebf6b1..258353eff7a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/operations/_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/operations/_operations.py index c36702a76ce..88972f2a779 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/operations/_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def test_one(self, *, id: int, message: Optional[str] = None, **kwargs: An :rtype: ~multiapicombiner.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,7 +105,7 @@ async def test_one(self, *, id: int, message: Optional[str] = None, **kwargs: An return deserialized # type: ignore @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, *, greeting_in_english: str, greeting_in_chinese: Optional[str] = None, **kwargs: Any ) -> None: """Has added parameters across the API versions. @@ -119,7 +118,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,7 +224,7 @@ async def test_two( :rtype: ~multiapicombiner.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -281,14 +280,14 @@ async def test_two( return deserialized # type: ignore @distributed_trace_async - async def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_three(self, **kwargs: Any) -> None: """TestThree should be in OperationGroupOneOperations. Takes in ModelTwo. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -346,9 +345,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, *, parameter_one: bool, **kwargs: Any - ) -> None: + async def test_four(self, *, parameter_one: bool, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :keyword parameter_one: A boolean parameter. Required. @@ -357,7 +354,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/models/_models_py3.py index 9cf91d5a57a..46990252065 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/operations/_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/operations/_operations.py index 6f7dc0dac52..b15213994b5 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/operations/_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v2/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -167,7 +166,7 @@ def test_one(self, *, id: int, message: Optional[str] = None, **kwargs: Any) -> :rtype: ~multiapicombiner.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,7 +224,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -331,7 +330,7 @@ def test_two( :rtype: ~multiapicombiner.v2.models.ModelTwo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -394,7 +393,7 @@ def test_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -463,7 +462,7 @@ def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_configuration.py index b34154fec17..f26bfbe150b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_metadata.json b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_metadata.json index 8838b85f5ac..abe34802c8b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_metadata.json +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_metadata.json @@ -122,7 +122,7 @@ }, "async": { "coroutine": true, - "signature": "async def test_different_calls( # pylint: disable=inconsistent-return-statements\n self,\n *,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def test_different_calls(\n self,\n *,\n greeting_in_english: str,\n greeting_in_chinese: Optional[str] = None,\n greeting_in_french: Optional[str] = None,\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Has added parameters across the API versions.\n\n:keyword greeting_in_english: pass in \u0027hello\u0027 to pass test. Required.\n:paramtype greeting_in_english: str\n:keyword greeting_in_chinese: pass in \u0027nihao\u0027 to pass test. Default value is None.\n:paramtype greeting_in_chinese: str\n:keyword greeting_in_french: pass in \u0027bonjour\u0027 to pass test. Default value is None.\n:paramtype greeting_in_french: str\n:return: None or the result of cls(response)\n:rtype: None\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"", "call": "greeting_in_english=greeting_in_english, greeting_in_chinese=greeting_in_chinese, greeting_in_french=greeting_in_french, **kwargs" } diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_multiapi_service_client.py index 6738e990013..ad63699a83c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_vendor.py index 62c06452bbc..70517e0b7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_configuration.py index 5881df9787d..924dbdb2511 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_configuration.py @@ -12,13 +12,12 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" -class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_multiapi_service_client.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_multiapi_service_client.py index fdabb9a6603..f840ea392b0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_multiapi_service_client.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_multiapi_service_client.py @@ -21,11 +21,10 @@ from .operations import MultiapiServiceClientOperationsMixin, OperationGroupOneOperations, OperationGroupTwoOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultiapiServiceClient(MultiapiServiceClientOperationsMixin): """Service client for multiapi client testing. :ivar operation_group_one: OperationGroupOneOperations operations diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_vendor.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_vendor.py index f5ac980a7cb..9c6fd05bb21 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_vendor.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultiapiServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from ..._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/operations/_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/operations/_operations.py index 54b74a13a94..c33a78c1d80 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/operations/_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -41,7 +40,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ def test_paging(self, **kwargs: Any) -> AsyncIterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -125,7 +124,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def test_different_calls( # pylint: disable=inconsistent-return-statements + async def test_different_calls( self, *, greeting_in_english: str, @@ -145,7 +144,7 @@ async def test_different_calls( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,7 +219,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> AsyncIterable["_models.M cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -327,7 +326,7 @@ async def test_two( :rtype: ~multiapicombiner.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -404,7 +403,7 @@ def __init__(self, *args, **kwargs) -> None: self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -420,7 +419,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @overload - async def test_four( # pylint: disable=inconsistent-return-statements + async def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -437,9 +436,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def test_four( # pylint: disable=inconsistent-return-statements - self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def test_four(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any) -> None: """TestFour should be in OperationGroupTwoOperations. :param input: Input parameter. Is either a SourcePath type or a IO[bytes] type. Default value @@ -449,7 +446,7 @@ async def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -501,14 +498,14 @@ async def test_four( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def test_five(self, **kwargs: Any) -> None: """TestFive should be in OperationGroupTwoOperations. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/models/_models_py3.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/models/_models_py3.py index dfb7d500bae..9305829f310 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/models/_models_py3.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/operations/_operations.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/operations/_operations.py index c73248a9695..624e1d0b4b0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/operations/_operations.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/multiapicombiner/multiapicombiner/v3/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -184,7 +183,7 @@ def test_paging(self, **kwargs: Any) -> Iterable["_models.ModelThree"]: cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -263,7 +262,7 @@ def test_different_calls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -338,7 +337,7 @@ def test_operation_group_paging(self, **kwargs: Any) -> Iterable["_models.ModelT cls: ClsType[_models.PagingResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -445,7 +444,7 @@ def test_two( :rtype: ~multiapicombiner.v3.models.ModelThree :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -522,7 +521,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -538,7 +537,7 @@ def test_four( # pylint: disable=inconsistent-return-statements """ @overload - def test_four( # pylint: disable=inconsistent-return-statements + def test_four( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """TestFour should be in OperationGroupTwoOperations. @@ -567,7 +566,7 @@ def test_four( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -626,7 +625,7 @@ def test_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/unittests/requirements.txt b/packages/autorest.python/test/unittests/requirements.txt index 64ba07b3d92..f7ce3bcc9a9 100644 --- a/packages/autorest.python/test/unittests/requirements.txt +++ b/packages/autorest.python/test/unittests/requirements.txt @@ -4,4 +4,4 @@ pytest pytest-cov azure-core==1.30.0 -e ../../. --e ../../node_modules/@azure-tools/typespec-python/generator +-e ../../generator diff --git a/packages/autorest.python/test/unittests/storage_models/serialization.py b/packages/autorest.python/test/unittests/storage_models/serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/unittests/storage_models/serialization.py +++ b/packages/autorest.python/test/unittests/storage_models/serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/_configuration.py index 487dd7fb058..983693b3bde 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AdditionalPropertiesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/_configuration.py index 3f002c59bb5..b89dbc916f1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AdditionalPropertiesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py index d7966548416..cef0923fb2c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -104,7 +103,7 @@ async def create_ap_true( :rtype: ~additionalproperties.models.PetAPTrue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -198,7 +197,7 @@ async def create_cat_ap_true( :rtype: ~additionalproperties.models.CatAPTrue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -292,7 +291,7 @@ async def create_ap_object( :rtype: ~additionalproperties.models.PetAPObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -386,7 +385,7 @@ async def create_ap_string( :rtype: ~additionalproperties.models.PetAPString :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -480,7 +479,7 @@ async def create_ap_in_properties( :rtype: ~additionalproperties.models.PetAPInProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -580,7 +579,7 @@ async def create_ap_in_properties_with_ap_string( :rtype: ~additionalproperties.models.PetAPInPropertiesWithAPString :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/models/_models_py3.py index cc42d007664..94b6c28704d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/operations/_pets_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/operations/_pets_operations.py index 461e04edc15..2b629e65fb9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/operations/_pets_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/operations/_pets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -202,7 +201,7 @@ def create_ap_true( :rtype: ~additionalproperties.models.PetAPTrue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -296,7 +295,7 @@ def create_cat_ap_true( :rtype: ~additionalproperties.models.CatAPTrue :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -390,7 +389,7 @@ def create_ap_object( :rtype: ~additionalproperties.models.PetAPObject :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -484,7 +483,7 @@ def create_ap_string( :rtype: ~additionalproperties.models.PetAPString :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -578,7 +577,7 @@ def create_ap_in_properties( :rtype: ~additionalproperties.models.PetAPInProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -678,7 +677,7 @@ def create_ap_in_properties_with_ap_string( :rtype: ~additionalproperties.models.PetAPInPropertiesWithAPString :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_vendor.py index dc910ddc7e5..db0a5a9a33b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AnythingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/_vendor.py index 29d65bdd121..c99b54eef8d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AnythingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/operations/_anything_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/operations/_anything_client_operations.py index b47f932a3c0..e89cf0692d4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/operations/_anything_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/operations/_anything_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +50,7 @@ async def get_object(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89,7 +88,7 @@ async def get_object(self, **kwargs: Any) -> Any: return deserialized # type: ignore @distributed_trace_async - async def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_object(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an object as anything. Pass in {'foo': 'bar'} to get a 200 and anything else to get an object error. @@ -99,7 +98,7 @@ async def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -145,7 +144,7 @@ async def get_string(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -183,7 +182,7 @@ async def get_string(self, **kwargs: Any) -> Any: return deserialized # type: ignore @distributed_trace_async - async def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_string(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an string as anything. Pass in 'anything' to get a 200 and anything else to get an object error. @@ -193,7 +192,7 @@ async def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -239,7 +238,7 @@ async def get_array(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -277,7 +276,7 @@ async def get_array(self, **kwargs: Any) -> Any: return deserialized # type: ignore @distributed_trace_async - async def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_array(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an array as anything. Pass in ['foo', 'bar'] to get a 200 and anything else to get an object error. @@ -287,7 +286,7 @@ async def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/operations/_anything_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/operations/_anything_client_operations.py index c9599ef7847..22ea18d78b9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/operations/_anything_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/operations/_anything_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -131,7 +130,7 @@ def get_object(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -179,7 +178,7 @@ def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,7 +224,7 @@ def get_string(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -273,7 +272,7 @@ def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -319,7 +318,7 @@ def get_array(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -367,7 +366,7 @@ def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/aio/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/aio/operations/_array_operations.py index e0264ec80d4..06562f41b97 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/aio/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/aio/operations/_array_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -100,7 +100,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -132,7 +132,7 @@ async def get_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -178,7 +178,7 @@ async def get_invalid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -224,7 +224,7 @@ async def get_empty(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -263,9 +263,7 @@ async def get_empty(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -279,9 +277,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -295,9 +291,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_empty(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value empty []. :param array_body: Is either a [str] type or a IO[bytes] type. Required. @@ -306,7 +300,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -360,7 +354,7 @@ async def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -399,7 +393,7 @@ async def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + async def put_boolean_tfft( self, array_body: List[bool], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [true, false, false, true]. @@ -415,7 +409,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @overload - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + async def put_boolean_tfft( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [true, false, false, true]. @@ -431,9 +425,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put_boolean_tfft(self, array_body: Union[List[bool], IO[bytes]], **kwargs: Any) -> None: """Set array value empty [true, false, false, true]. :param array_body: Is either a [bool] type or a IO[bytes] type. Required. @@ -442,7 +434,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -496,7 +488,7 @@ async def get_boolean_invalid_null(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -542,7 +534,7 @@ async def get_boolean_invalid_string(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -588,7 +580,7 @@ async def get_integer_valid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -627,7 +619,7 @@ async def get_integer_valid(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put_integer_valid( # pylint: disable=inconsistent-return-statements + async def put_integer_valid( self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -643,7 +635,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_integer_valid( # pylint: disable=inconsistent-return-statements + async def put_integer_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -659,9 +651,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_integer_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put_integer_valid(self, array_body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Is either a [int] type or a IO[bytes] type. Required. @@ -670,7 +660,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -724,7 +714,7 @@ async def get_int_invalid_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -770,7 +760,7 @@ async def get_int_invalid_string(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -816,7 +806,7 @@ async def get_long_valid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -855,7 +845,7 @@ async def get_long_valid(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put_long_valid( # pylint: disable=inconsistent-return-statements + async def put_long_valid( self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -871,7 +861,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_long_valid( # pylint: disable=inconsistent-return-statements + async def put_long_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -887,9 +877,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put_long_valid(self, array_body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Is either a [int] type or a IO[bytes] type. Required. @@ -898,7 +886,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -952,7 +940,7 @@ async def get_long_invalid_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -998,7 +986,7 @@ async def get_long_invalid_string(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1044,7 +1032,7 @@ async def get_float_valid(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1083,7 +1071,7 @@ async def get_float_valid(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - async def put_float_valid( # pylint: disable=inconsistent-return-statements + async def put_float_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1099,7 +1087,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_float_valid( # pylint: disable=inconsistent-return-statements + async def put_float_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1115,9 +1103,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_float_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[float], IO[bytes]], **kwargs: Any - ) -> None: + async def put_float_valid(self, array_body: Union[List[float], IO[bytes]], **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Is either a [float] type or a IO[bytes] type. Required. @@ -1126,7 +1112,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1180,7 +1166,7 @@ async def get_float_invalid_null(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1226,7 +1212,7 @@ async def get_float_invalid_string(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1272,7 +1258,7 @@ async def get_double_valid(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1311,7 +1297,7 @@ async def get_double_valid(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - async def put_double_valid( # pylint: disable=inconsistent-return-statements + async def put_double_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1327,7 +1313,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_double_valid( # pylint: disable=inconsistent-return-statements + async def put_double_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1343,9 +1329,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_double_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[float], IO[bytes]], **kwargs: Any - ) -> None: + async def put_double_valid(self, array_body: Union[List[float], IO[bytes]], **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Is either a [float] type or a IO[bytes] type. Required. @@ -1354,7 +1338,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1408,7 +1392,7 @@ async def get_double_invalid_null(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1454,7 +1438,7 @@ async def get_double_invalid_string(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1500,7 +1484,7 @@ async def get_string_valid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1539,7 +1523,7 @@ async def get_string_valid(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - async def put_string_valid( # pylint: disable=inconsistent-return-statements + async def put_string_valid( self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1555,7 +1539,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_string_valid( # pylint: disable=inconsistent-return-statements + async def put_string_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1571,9 +1555,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_string_valid(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Is either a [str] type or a IO[bytes] type. Required. @@ -1582,7 +1564,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1636,7 +1618,7 @@ async def get_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.FooEnum :rtype: list[str or ~bodyarray.models.FooEnum] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1675,7 +1657,7 @@ async def get_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.FooEnum return deserialized # type: ignore @overload - async def put_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_enum_valid( self, array_body: List[Union[str, _models.FooEnum]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1691,7 +1673,7 @@ async def put_enum_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_enum_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1707,7 +1689,7 @@ async def put_enum_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_enum_valid( self, array_body: Union[List[Union[str, _models.FooEnum]], IO[bytes]], **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1719,7 +1701,7 @@ async def put_enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1773,7 +1755,7 @@ async def get_string_enum_valid(self, **kwargs: Any) -> List[Union[str, _models. :rtype: list[str or ~bodyarray.models.Enum0] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1812,7 +1794,7 @@ async def get_string_enum_valid(self, **kwargs: Any) -> List[Union[str, _models. return deserialized # type: ignore @overload - async def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_string_enum_valid( self, array_body: List[Union[str, _models.Enum1]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1828,7 +1810,7 @@ async def put_string_enum_valid( # pylint: disable=inconsistent-return-statemen """ @overload - async def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_string_enum_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1844,7 +1826,7 @@ async def put_string_enum_valid( # pylint: disable=inconsistent-return-statemen """ @distributed_trace_async - async def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_string_enum_valid( self, array_body: Union[List[Union[str, _models.Enum1]], IO[bytes]], **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1856,7 +1838,7 @@ async def put_string_enum_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1910,7 +1892,7 @@ async def get_string_with_null(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1956,7 +1938,7 @@ async def get_string_with_invalid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2003,7 +1985,7 @@ async def get_uuid_valid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,7 +2024,7 @@ async def get_uuid_valid(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - async def put_uuid_valid( # pylint: disable=inconsistent-return-statements + async def put_uuid_valid( self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', @@ -2059,7 +2041,7 @@ async def put_uuid_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_uuid_valid( # pylint: disable=inconsistent-return-statements + async def put_uuid_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', @@ -2076,9 +2058,7 @@ async def put_uuid_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_uuid_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_uuid_valid(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']. @@ -2088,7 +2068,7 @@ async def put_uuid_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2142,7 +2122,7 @@ async def get_uuid_invalid_chars(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2188,7 +2168,7 @@ async def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2227,7 +2207,7 @@ async def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: return deserialized # type: ignore @overload - async def put_date_valid( # pylint: disable=inconsistent-return-statements + async def put_date_valid( self, array_body: List[datetime.date], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. @@ -2243,7 +2223,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_valid( # pylint: disable=inconsistent-return-statements + async def put_date_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. @@ -2259,9 +2239,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[datetime.date], IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_valid(self, array_body: Union[List[datetime.date], IO[bytes]], **kwargs: Any) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. :param array_body: Is either a [datetime.date] type or a IO[bytes] type. Required. @@ -2270,7 +2248,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2324,7 +2302,7 @@ async def get_date_invalid_null(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2370,7 +2348,7 @@ async def get_date_invalid_chars(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2417,7 +2395,7 @@ async def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2456,7 +2434,7 @@ async def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: return deserialized # type: ignore @overload - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -2473,7 +2451,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -2490,9 +2468,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_time_valid(self, array_body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', '1492-10-12T10:15:01-08:00']. @@ -2502,7 +2478,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2556,7 +2532,7 @@ async def get_date_time_invalid_null(self, **kwargs: Any) -> List[datetime.datet :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2602,7 +2578,7 @@ async def get_date_time_invalid_chars(self, **kwargs: Any) -> List[datetime.date :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2649,7 +2625,7 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.date :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2688,7 +2664,7 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.date return deserialized # type: ignore @overload - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -2705,7 +2681,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st """ @overload - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -2722,7 +2698,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st """ @distributed_trace_async - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -2734,7 +2710,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2788,7 +2764,7 @@ async def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: :rtype: list[~datetime.timedelta] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2827,7 +2803,7 @@ async def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: return deserialized # type: ignore @overload - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -2843,7 +2819,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -2859,9 +2835,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_duration_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[datetime.timedelta], IO[bytes]], **kwargs: Any - ) -> None: + async def put_duration_valid(self, array_body: Union[List[datetime.timedelta], IO[bytes]], **kwargs: Any) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. :param array_body: Is either a [datetime.timedelta] type or a IO[bytes] type. Required. @@ -2870,7 +2844,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2925,7 +2899,7 @@ async def get_byte_valid(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2964,7 +2938,7 @@ async def get_byte_valid(self, **kwargs: Any) -> List[bytes]: return deserialized # type: ignore @overload - async def put_byte_valid( # pylint: disable=inconsistent-return-statements + async def put_byte_valid( self, array_body: List[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each @@ -2981,7 +2955,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_byte_valid( # pylint: disable=inconsistent-return-statements + async def put_byte_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each @@ -2998,9 +2972,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[bytes], IO[bytes]], **kwargs: Any - ) -> None: + async def put_byte_valid(self, array_body: Union[List[bytes], IO[bytes]], **kwargs: Any) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each elementencoded in base 64. @@ -3010,7 +2982,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3064,7 +3036,7 @@ async def get_byte_invalid_null(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3111,7 +3083,7 @@ async def get_base64_url(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3157,7 +3129,7 @@ async def get_complex_null(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~bodyarray.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3203,7 +3175,7 @@ async def get_complex_empty(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~bodyarray.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3250,7 +3222,7 @@ async def get_complex_item_null(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~bodyarray.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3297,7 +3269,7 @@ async def get_complex_item_empty(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~bodyarray.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3344,7 +3316,7 @@ async def get_complex_valid(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~bodyarray.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3383,7 +3355,7 @@ async def get_complex_valid(self, **kwargs: Any) -> List[_models.Product]: return deserialized # type: ignore @overload - async def put_complex_valid( # pylint: disable=inconsistent-return-statements + async def put_complex_valid( self, array_body: List[_models.Product], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -3400,7 +3372,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_complex_valid( # pylint: disable=inconsistent-return-statements + async def put_complex_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -3417,9 +3389,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_complex_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[_models.Product], IO[bytes]], **kwargs: Any - ) -> None: + async def put_complex_valid(self, array_body: Union[List[_models.Product], IO[bytes]], **kwargs: Any) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, 'string': '4'}, {'integer': 5, 'string': '6'}]. @@ -3429,7 +3399,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3483,7 +3453,7 @@ async def get_array_null(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3529,7 +3499,7 @@ async def get_array_empty(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3575,7 +3545,7 @@ async def get_array_item_null(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3621,7 +3591,7 @@ async def get_array_item_empty(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3667,7 +3637,7 @@ async def get_array_valid(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3706,7 +3676,7 @@ async def get_array_valid(self, **kwargs: Any) -> List[List[str]]: return deserialized # type: ignore @overload - async def put_array_valid( # pylint: disable=inconsistent-return-statements + async def put_array_valid( self, array_body: List[List[str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. @@ -3722,7 +3692,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_array_valid( # pylint: disable=inconsistent-return-statements + async def put_array_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. @@ -3738,9 +3708,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_array_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[List[str]], IO[bytes]], **kwargs: Any - ) -> None: + async def put_array_valid(self, array_body: Union[List[List[str]], IO[bytes]], **kwargs: Any) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. :param array_body: Is either a [[str]] type or a IO[bytes] type. Required. @@ -3749,7 +3717,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3803,7 +3771,7 @@ async def get_dictionary_null(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3849,7 +3817,7 @@ async def get_dictionary_empty(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3896,7 +3864,7 @@ async def get_dictionary_item_null(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3943,7 +3911,7 @@ async def get_dictionary_item_empty(self, **kwargs: Any) -> List[Dict[str, str]] :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3990,7 +3958,7 @@ async def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4029,7 +3997,7 @@ async def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: return deserialized # type: ignore @overload - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: List[Dict[str, str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -4046,7 +4014,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement """ @overload - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -4063,9 +4031,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement """ @distributed_trace_async - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[Dict[str, str]], IO[bytes]], **kwargs: Any - ) -> None: + async def put_dictionary_valid(self, array_body: Union[List[Dict[str, str]], IO[bytes]], **kwargs: Any) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': 'three'}, {'4': 'four', '5': 'five', '6': 'six'}, {'7': 'seven', '8': 'eight', '9': 'nine'}]. @@ -4075,7 +4041,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/models/_models_py3.py index 82cabe16310..6aa1810338a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/operations/_array_operations.py index 6486e93836f..1833d8ed6a0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/operations/_array_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1085,7 +1085,7 @@ def get_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1131,7 +1131,7 @@ def get_invalid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1177,7 +1177,7 @@ def get_empty(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1216,9 +1216,7 @@ def get_empty(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -1232,9 +1230,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -1259,7 +1255,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1313,7 +1309,7 @@ def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1352,7 +1348,7 @@ def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + def put_boolean_tfft( self, array_body: List[bool], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [true, false, false, true]. @@ -1368,9 +1364,7 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @overload - def put_boolean_tfft( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_boolean_tfft(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty [true, false, false, true]. :param array_body: Required. @@ -1395,7 +1389,7 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1449,7 +1443,7 @@ def get_boolean_invalid_null(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1495,7 +1489,7 @@ def get_boolean_invalid_string(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1541,7 +1535,7 @@ def get_integer_valid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1580,7 +1574,7 @@ def get_integer_valid(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put_integer_valid( # pylint: disable=inconsistent-return-statements + def put_integer_valid( self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -1596,7 +1590,7 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_integer_valid( # pylint: disable=inconsistent-return-statements + def put_integer_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -1623,7 +1617,7 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1677,7 +1671,7 @@ def get_int_invalid_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1723,7 +1717,7 @@ def get_int_invalid_string(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1769,7 +1763,7 @@ def get_long_valid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1808,9 +1802,7 @@ def get_long_valid(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long_valid(self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Required. @@ -1824,9 +1816,7 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Required. @@ -1851,7 +1841,7 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1905,7 +1895,7 @@ def get_long_invalid_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1951,7 +1941,7 @@ def get_long_invalid_string(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1997,7 +1987,7 @@ def get_float_valid(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2036,7 +2026,7 @@ def get_float_valid(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - def put_float_valid( # pylint: disable=inconsistent-return-statements + def put_float_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -2052,9 +2042,7 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_float_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_float_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Required. @@ -2079,7 +2067,7 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2133,7 +2121,7 @@ def get_float_invalid_null(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2179,7 +2167,7 @@ def get_float_invalid_string(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2225,7 +2213,7 @@ def get_double_valid(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2264,7 +2252,7 @@ def get_double_valid(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - def put_double_valid( # pylint: disable=inconsistent-return-statements + def put_double_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -2280,9 +2268,7 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_double_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_double_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Required. @@ -2307,7 +2293,7 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2361,7 +2347,7 @@ def get_double_invalid_null(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2407,7 +2393,7 @@ def get_double_invalid_string(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2453,7 +2439,7 @@ def get_string_valid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2492,9 +2478,7 @@ def get_string_valid(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string_valid(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Required. @@ -2508,9 +2492,7 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Required. @@ -2535,7 +2517,7 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2589,7 +2571,7 @@ def get_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.FooEnum]]: :rtype: list[str or ~bodyarray.models.FooEnum] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2628,7 +2610,7 @@ def get_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.FooEnum]]: return deserialized # type: ignore @overload - def put_enum_valid( # pylint: disable=inconsistent-return-statements + def put_enum_valid( self, array_body: List[Union[str, _models.FooEnum]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -2644,9 +2626,7 @@ def put_enum_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_enum_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_enum_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Required. @@ -2672,7 +2652,7 @@ def put_enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2726,7 +2706,7 @@ def get_string_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.Enum0] :rtype: list[str or ~bodyarray.models.Enum0] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2765,7 +2745,7 @@ def get_string_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.Enum0] return deserialized # type: ignore @overload - def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + def put_string_enum_valid( self, array_body: List[Union[str, _models.Enum1]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -2781,7 +2761,7 @@ def put_string_enum_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + def put_string_enum_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -2809,7 +2789,7 @@ def put_string_enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2863,7 +2843,7 @@ def get_string_with_null(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2909,7 +2889,7 @@ def get_string_with_invalid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2956,7 +2936,7 @@ def get_uuid_valid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2995,9 +2975,7 @@ def get_uuid_valid(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - def put_uuid_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_uuid_valid(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']. @@ -3012,9 +2990,7 @@ def put_uuid_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_uuid_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_uuid_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']. @@ -3041,7 +3017,7 @@ def put_uuid_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3095,7 +3071,7 @@ def get_uuid_invalid_chars(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3141,7 +3117,7 @@ def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3180,7 +3156,7 @@ def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: return deserialized # type: ignore @overload - def put_date_valid( # pylint: disable=inconsistent-return-statements + def put_date_valid( self, array_body: List[datetime.date], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. @@ -3196,9 +3172,7 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. :param array_body: Required. @@ -3223,7 +3197,7 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3277,7 +3251,7 @@ def get_date_invalid_null(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3323,7 +3297,7 @@ def get_date_invalid_chars(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3370,7 +3344,7 @@ def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3409,7 +3383,7 @@ def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: return deserialized # type: ignore @overload - def put_date_time_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -3426,7 +3400,7 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_time_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -3455,7 +3429,7 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3509,7 +3483,7 @@ def get_date_time_invalid_null(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3555,7 +3529,7 @@ def get_date_time_invalid_chars(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3602,7 +3576,7 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3641,7 +3615,7 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.datetime]: return deserialized # type: ignore @overload - def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -3658,7 +3632,7 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen """ @overload - def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -3687,7 +3661,7 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3741,7 +3715,7 @@ def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: :rtype: list[~datetime.timedelta] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3780,7 +3754,7 @@ def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: return deserialized # type: ignore @overload - def put_duration_valid( # pylint: disable=inconsistent-return-statements + def put_duration_valid( self, array_body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -3796,7 +3770,7 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_duration_valid( # pylint: disable=inconsistent-return-statements + def put_duration_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -3823,7 +3797,7 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3878,7 +3852,7 @@ def get_byte_valid(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,9 +3891,7 @@ def get_byte_valid(self, **kwargs: Any) -> List[bytes]: return deserialized # type: ignore @overload - def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_byte_valid(self, array_body: List[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each elementencoded in base 64. @@ -3934,9 +3906,7 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_byte_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each elementencoded in base 64. @@ -3963,7 +3933,7 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4017,7 +3987,7 @@ def get_byte_invalid_null(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4064,7 +4034,7 @@ def get_base64_url(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4110,7 +4080,7 @@ def get_complex_null(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~bodyarray.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4156,7 +4126,7 @@ def get_complex_empty(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~bodyarray.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4203,7 +4173,7 @@ def get_complex_item_null(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~bodyarray.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4250,7 +4220,7 @@ def get_complex_item_empty(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~bodyarray.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4297,7 +4267,7 @@ def get_complex_valid(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~bodyarray.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4336,7 +4306,7 @@ def get_complex_valid(self, **kwargs: Any) -> List[_models.Product]: return deserialized # type: ignore @overload - def put_complex_valid( # pylint: disable=inconsistent-return-statements + def put_complex_valid( self, array_body: List[_models.Product], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -4353,7 +4323,7 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_complex_valid( # pylint: disable=inconsistent-return-statements + def put_complex_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -4382,7 +4352,7 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4436,7 +4406,7 @@ def get_array_null(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4482,7 +4452,7 @@ def get_array_empty(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4528,7 +4498,7 @@ def get_array_item_null(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4574,7 +4544,7 @@ def get_array_item_empty(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4620,7 +4590,7 @@ def get_array_valid(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4659,7 +4629,7 @@ def get_array_valid(self, **kwargs: Any) -> List[List[str]]: return deserialized # type: ignore @overload - def put_array_valid( # pylint: disable=inconsistent-return-statements + def put_array_valid( self, array_body: List[List[str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. @@ -4675,9 +4645,7 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_array_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_array_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. :param array_body: Required. @@ -4702,7 +4670,7 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4756,7 +4724,7 @@ def get_dictionary_null(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4802,7 +4770,7 @@ def get_dictionary_empty(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4849,7 +4817,7 @@ def get_dictionary_item_null(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4896,7 +4864,7 @@ def get_dictionary_item_empty(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4943,7 +4911,7 @@ def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4982,7 +4950,7 @@ def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: return deserialized # type: ignore @overload - def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + def put_dictionary_valid( self, array_body: List[Dict[str, str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -4999,7 +4967,7 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + def put_dictionary_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -5028,7 +4996,7 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/aio/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/aio/operations/_array_operations.py index ac19e2040d2..1250b04ed8d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/aio/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/aio/operations/_array_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -100,7 +100,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -132,7 +132,7 @@ async def get_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -178,7 +178,7 @@ async def get_invalid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -224,7 +224,7 @@ async def get_empty(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -263,9 +263,7 @@ async def get_empty(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -279,9 +277,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -295,9 +291,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_empty(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value empty []. :param array_body: Is either a [str] type or a IO[bytes] type. Required. @@ -306,7 +300,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -360,7 +354,7 @@ async def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -399,7 +393,7 @@ async def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + async def put_boolean_tfft( self, array_body: List[bool], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [true, false, false, true]. @@ -415,7 +409,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @overload - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + async def put_boolean_tfft( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [true, false, false, true]. @@ -431,9 +425,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put_boolean_tfft(self, array_body: Union[List[bool], IO[bytes]], **kwargs: Any) -> None: """Set array value empty [true, false, false, true]. :param array_body: Is either a [bool] type or a IO[bytes] type. Required. @@ -442,7 +434,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -496,7 +488,7 @@ async def get_boolean_invalid_null(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -542,7 +534,7 @@ async def get_boolean_invalid_string(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -588,7 +580,7 @@ async def get_integer_valid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -627,7 +619,7 @@ async def get_integer_valid(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put_integer_valid( # pylint: disable=inconsistent-return-statements + async def put_integer_valid( self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -643,7 +635,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_integer_valid( # pylint: disable=inconsistent-return-statements + async def put_integer_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -659,9 +651,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_integer_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put_integer_valid(self, array_body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Is either a [int] type or a IO[bytes] type. Required. @@ -670,7 +660,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -724,7 +714,7 @@ async def get_int_invalid_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -770,7 +760,7 @@ async def get_int_invalid_string(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -816,7 +806,7 @@ async def get_long_valid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -855,7 +845,7 @@ async def get_long_valid(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put_long_valid( # pylint: disable=inconsistent-return-statements + async def put_long_valid( self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -871,7 +861,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_long_valid( # pylint: disable=inconsistent-return-statements + async def put_long_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -887,9 +877,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put_long_valid(self, array_body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Is either a [int] type or a IO[bytes] type. Required. @@ -898,7 +886,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -952,7 +940,7 @@ async def get_long_invalid_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -998,7 +986,7 @@ async def get_long_invalid_string(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1044,7 +1032,7 @@ async def get_float_valid(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1083,7 +1071,7 @@ async def get_float_valid(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - async def put_float_valid( # pylint: disable=inconsistent-return-statements + async def put_float_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1099,7 +1087,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_float_valid( # pylint: disable=inconsistent-return-statements + async def put_float_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1115,9 +1103,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_float_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[float], IO[bytes]], **kwargs: Any - ) -> None: + async def put_float_valid(self, array_body: Union[List[float], IO[bytes]], **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Is either a [float] type or a IO[bytes] type. Required. @@ -1126,7 +1112,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1180,7 +1166,7 @@ async def get_float_invalid_null(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1226,7 +1212,7 @@ async def get_float_invalid_string(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1272,7 +1258,7 @@ async def get_double_valid(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1311,7 +1297,7 @@ async def get_double_valid(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - async def put_double_valid( # pylint: disable=inconsistent-return-statements + async def put_double_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1327,7 +1313,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_double_valid( # pylint: disable=inconsistent-return-statements + async def put_double_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1343,9 +1329,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_double_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[float], IO[bytes]], **kwargs: Any - ) -> None: + async def put_double_valid(self, array_body: Union[List[float], IO[bytes]], **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Is either a [float] type or a IO[bytes] type. Required. @@ -1354,7 +1338,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1408,7 +1392,7 @@ async def get_double_invalid_null(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1454,7 +1438,7 @@ async def get_double_invalid_string(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1500,7 +1484,7 @@ async def get_string_valid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1539,7 +1523,7 @@ async def get_string_valid(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - async def put_string_valid( # pylint: disable=inconsistent-return-statements + async def put_string_valid( self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1555,7 +1539,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_string_valid( # pylint: disable=inconsistent-return-statements + async def put_string_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1571,9 +1555,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_string_valid(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Is either a [str] type or a IO[bytes] type. Required. @@ -1582,7 +1564,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1636,7 +1618,7 @@ async def get_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.FooEnum :rtype: list[str or ~vanilla.body.array.models.FooEnum] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1675,7 +1657,7 @@ async def get_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.FooEnum return deserialized # type: ignore @overload - async def put_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_enum_valid( self, array_body: List[Union[str, _models.FooEnum]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1691,7 +1673,7 @@ async def put_enum_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_enum_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1707,7 +1689,7 @@ async def put_enum_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_enum_valid( self, array_body: Union[List[Union[str, _models.FooEnum]], IO[bytes]], **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1719,7 +1701,7 @@ async def put_enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1773,7 +1755,7 @@ async def get_string_enum_valid(self, **kwargs: Any) -> List[Union[str, _models. :rtype: list[str or ~vanilla.body.array.models.Enum0] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1812,7 +1794,7 @@ async def get_string_enum_valid(self, **kwargs: Any) -> List[Union[str, _models. return deserialized # type: ignore @overload - async def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_string_enum_valid( self, array_body: List[Union[str, _models.Enum1]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1828,7 +1810,7 @@ async def put_string_enum_valid( # pylint: disable=inconsistent-return-statemen """ @overload - async def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_string_enum_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1844,7 +1826,7 @@ async def put_string_enum_valid( # pylint: disable=inconsistent-return-statemen """ @distributed_trace_async - async def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_string_enum_valid( self, array_body: Union[List[Union[str, _models.Enum1]], IO[bytes]], **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1856,7 +1838,7 @@ async def put_string_enum_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1910,7 +1892,7 @@ async def get_string_with_null(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1956,7 +1938,7 @@ async def get_string_with_invalid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2003,7 +1985,7 @@ async def get_uuid_valid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,7 +2024,7 @@ async def get_uuid_valid(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - async def put_uuid_valid( # pylint: disable=inconsistent-return-statements + async def put_uuid_valid( self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', @@ -2059,7 +2041,7 @@ async def put_uuid_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_uuid_valid( # pylint: disable=inconsistent-return-statements + async def put_uuid_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', @@ -2076,9 +2058,7 @@ async def put_uuid_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_uuid_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_uuid_valid(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']. @@ -2088,7 +2068,7 @@ async def put_uuid_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2142,7 +2122,7 @@ async def get_uuid_invalid_chars(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2188,7 +2168,7 @@ async def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2227,7 +2207,7 @@ async def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: return deserialized # type: ignore @overload - async def put_date_valid( # pylint: disable=inconsistent-return-statements + async def put_date_valid( self, array_body: List[datetime.date], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. @@ -2243,7 +2223,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_valid( # pylint: disable=inconsistent-return-statements + async def put_date_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. @@ -2259,9 +2239,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[datetime.date], IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_valid(self, array_body: Union[List[datetime.date], IO[bytes]], **kwargs: Any) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. :param array_body: Is either a [datetime.date] type or a IO[bytes] type. Required. @@ -2270,7 +2248,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2324,7 +2302,7 @@ async def get_date_invalid_null(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2370,7 +2348,7 @@ async def get_date_invalid_chars(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2417,7 +2395,7 @@ async def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2456,7 +2434,7 @@ async def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: return deserialized # type: ignore @overload - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -2473,7 +2451,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -2490,9 +2468,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_time_valid(self, array_body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', '1492-10-12T10:15:01-08:00']. @@ -2502,7 +2478,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2556,7 +2532,7 @@ async def get_date_time_invalid_null(self, **kwargs: Any) -> List[datetime.datet :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2602,7 +2578,7 @@ async def get_date_time_invalid_chars(self, **kwargs: Any) -> List[datetime.date :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2649,7 +2625,7 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.date :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2688,7 +2664,7 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.date return deserialized # type: ignore @overload - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -2705,7 +2681,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st """ @overload - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -2722,7 +2698,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st """ @distributed_trace_async - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -2734,7 +2710,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2788,7 +2764,7 @@ async def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: :rtype: list[~datetime.timedelta] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2827,7 +2803,7 @@ async def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: return deserialized # type: ignore @overload - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -2843,7 +2819,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -2859,9 +2835,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_duration_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[datetime.timedelta], IO[bytes]], **kwargs: Any - ) -> None: + async def put_duration_valid(self, array_body: Union[List[datetime.timedelta], IO[bytes]], **kwargs: Any) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. :param array_body: Is either a [datetime.timedelta] type or a IO[bytes] type. Required. @@ -2870,7 +2844,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2925,7 +2899,7 @@ async def get_byte_valid(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2964,7 +2938,7 @@ async def get_byte_valid(self, **kwargs: Any) -> List[bytes]: return deserialized # type: ignore @overload - async def put_byte_valid( # pylint: disable=inconsistent-return-statements + async def put_byte_valid( self, array_body: List[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each @@ -2981,7 +2955,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_byte_valid( # pylint: disable=inconsistent-return-statements + async def put_byte_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each @@ -2998,9 +2972,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[bytes], IO[bytes]], **kwargs: Any - ) -> None: + async def put_byte_valid(self, array_body: Union[List[bytes], IO[bytes]], **kwargs: Any) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each elementencoded in base 64. @@ -3010,7 +2982,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3064,7 +3036,7 @@ async def get_byte_invalid_null(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3111,7 +3083,7 @@ async def get_base64_url(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3157,7 +3129,7 @@ async def get_complex_null(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~vanilla.body.array.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3203,7 +3175,7 @@ async def get_complex_empty(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~vanilla.body.array.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3250,7 +3222,7 @@ async def get_complex_item_null(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~vanilla.body.array.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3297,7 +3269,7 @@ async def get_complex_item_empty(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~vanilla.body.array.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3344,7 +3316,7 @@ async def get_complex_valid(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~vanilla.body.array.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3383,7 +3355,7 @@ async def get_complex_valid(self, **kwargs: Any) -> List[_models.Product]: return deserialized # type: ignore @overload - async def put_complex_valid( # pylint: disable=inconsistent-return-statements + async def put_complex_valid( self, array_body: List[_models.Product], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -3400,7 +3372,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_complex_valid( # pylint: disable=inconsistent-return-statements + async def put_complex_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -3417,9 +3389,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_complex_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[_models.Product], IO[bytes]], **kwargs: Any - ) -> None: + async def put_complex_valid(self, array_body: Union[List[_models.Product], IO[bytes]], **kwargs: Any) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, 'string': '4'}, {'integer': 5, 'string': '6'}]. @@ -3429,7 +3399,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3483,7 +3453,7 @@ async def get_array_null(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3529,7 +3499,7 @@ async def get_array_empty(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3575,7 +3545,7 @@ async def get_array_item_null(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3621,7 +3591,7 @@ async def get_array_item_empty(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3667,7 +3637,7 @@ async def get_array_valid(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3706,7 +3676,7 @@ async def get_array_valid(self, **kwargs: Any) -> List[List[str]]: return deserialized # type: ignore @overload - async def put_array_valid( # pylint: disable=inconsistent-return-statements + async def put_array_valid( self, array_body: List[List[str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. @@ -3722,7 +3692,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_array_valid( # pylint: disable=inconsistent-return-statements + async def put_array_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. @@ -3738,9 +3708,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_array_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[List[str]], IO[bytes]], **kwargs: Any - ) -> None: + async def put_array_valid(self, array_body: Union[List[List[str]], IO[bytes]], **kwargs: Any) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. :param array_body: Is either a [[str]] type or a IO[bytes] type. Required. @@ -3749,7 +3717,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3803,7 +3771,7 @@ async def get_dictionary_null(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3849,7 +3817,7 @@ async def get_dictionary_empty(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3896,7 +3864,7 @@ async def get_dictionary_item_null(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3943,7 +3911,7 @@ async def get_dictionary_item_empty(self, **kwargs: Any) -> List[Dict[str, str]] :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3990,7 +3958,7 @@ async def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4029,7 +3997,7 @@ async def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: return deserialized # type: ignore @overload - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: List[Dict[str, str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -4046,7 +4014,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement """ @overload - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -4063,9 +4031,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement """ @distributed_trace_async - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[Dict[str, str]], IO[bytes]], **kwargs: Any - ) -> None: + async def put_dictionary_valid(self, array_body: Union[List[Dict[str, str]], IO[bytes]], **kwargs: Any) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': 'three'}, {'4': 'four', '5': 'five', '6': 'six'}, {'7': 'seven', '8': 'eight', '9': 'nine'}]. @@ -4075,7 +4041,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/models/_models_py3.py index 82cabe16310..6aa1810338a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/operations/_array_operations.py index e1204e4f482..34545065559 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/operations/_array_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1085,7 +1085,7 @@ def get_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1131,7 +1131,7 @@ def get_invalid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1177,7 +1177,7 @@ def get_empty(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1216,9 +1216,7 @@ def get_empty(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -1232,9 +1230,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -1259,7 +1255,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1313,7 +1309,7 @@ def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1352,7 +1348,7 @@ def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + def put_boolean_tfft( self, array_body: List[bool], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [true, false, false, true]. @@ -1368,9 +1364,7 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @overload - def put_boolean_tfft( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_boolean_tfft(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty [true, false, false, true]. :param array_body: Required. @@ -1395,7 +1389,7 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1449,7 +1443,7 @@ def get_boolean_invalid_null(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1495,7 +1489,7 @@ def get_boolean_invalid_string(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1541,7 +1535,7 @@ def get_integer_valid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1580,7 +1574,7 @@ def get_integer_valid(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put_integer_valid( # pylint: disable=inconsistent-return-statements + def put_integer_valid( self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -1596,7 +1590,7 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_integer_valid( # pylint: disable=inconsistent-return-statements + def put_integer_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -1623,7 +1617,7 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1677,7 +1671,7 @@ def get_int_invalid_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1723,7 +1717,7 @@ def get_int_invalid_string(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1769,7 +1763,7 @@ def get_long_valid(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1808,9 +1802,7 @@ def get_long_valid(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long_valid(self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Required. @@ -1824,9 +1816,7 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Required. @@ -1851,7 +1841,7 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1905,7 +1895,7 @@ def get_long_invalid_null(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1951,7 +1941,7 @@ def get_long_invalid_string(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1997,7 +1987,7 @@ def get_float_valid(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2036,7 +2026,7 @@ def get_float_valid(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - def put_float_valid( # pylint: disable=inconsistent-return-statements + def put_float_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -2052,9 +2042,7 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_float_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_float_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Required. @@ -2079,7 +2067,7 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2133,7 +2121,7 @@ def get_float_invalid_null(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2179,7 +2167,7 @@ def get_float_invalid_string(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2225,7 +2213,7 @@ def get_double_valid(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2264,7 +2252,7 @@ def get_double_valid(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - def put_double_valid( # pylint: disable=inconsistent-return-statements + def put_double_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -2280,9 +2268,7 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_double_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_double_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Required. @@ -2307,7 +2293,7 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2361,7 +2347,7 @@ def get_double_invalid_null(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2407,7 +2393,7 @@ def get_double_invalid_string(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2453,7 +2439,7 @@ def get_string_valid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2492,9 +2478,7 @@ def get_string_valid(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string_valid(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Required. @@ -2508,9 +2492,7 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Required. @@ -2535,7 +2517,7 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2589,7 +2571,7 @@ def get_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.FooEnum]]: :rtype: list[str or ~vanilla.body.array.models.FooEnum] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2628,7 +2610,7 @@ def get_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.FooEnum]]: return deserialized # type: ignore @overload - def put_enum_valid( # pylint: disable=inconsistent-return-statements + def put_enum_valid( self, array_body: List[Union[str, _models.FooEnum]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -2644,9 +2626,7 @@ def put_enum_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_enum_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_enum_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Required. @@ -2672,7 +2652,7 @@ def put_enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2726,7 +2706,7 @@ def get_string_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.Enum0] :rtype: list[str or ~vanilla.body.array.models.Enum0] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2765,7 +2745,7 @@ def get_string_enum_valid(self, **kwargs: Any) -> List[Union[str, _models.Enum0] return deserialized # type: ignore @overload - def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + def put_string_enum_valid( self, array_body: List[Union[str, _models.Enum1]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -2781,7 +2761,7 @@ def put_string_enum_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + def put_string_enum_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -2809,7 +2789,7 @@ def put_string_enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2863,7 +2843,7 @@ def get_string_with_null(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2909,7 +2889,7 @@ def get_string_with_invalid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2956,7 +2936,7 @@ def get_uuid_valid(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2995,9 +2975,7 @@ def get_uuid_valid(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - def put_uuid_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_uuid_valid(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']. @@ -3012,9 +2990,7 @@ def put_uuid_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_uuid_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_uuid_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']. @@ -3041,7 +3017,7 @@ def put_uuid_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3095,7 +3071,7 @@ def get_uuid_invalid_chars(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3141,7 +3117,7 @@ def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3180,7 +3156,7 @@ def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: return deserialized # type: ignore @overload - def put_date_valid( # pylint: disable=inconsistent-return-statements + def put_date_valid( self, array_body: List[datetime.date], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. @@ -3196,9 +3172,7 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. :param array_body: Required. @@ -3223,7 +3197,7 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3277,7 +3251,7 @@ def get_date_invalid_null(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3323,7 +3297,7 @@ def get_date_invalid_chars(self, **kwargs: Any) -> List[datetime.date]: :rtype: list[~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3370,7 +3344,7 @@ def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3409,7 +3383,7 @@ def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: return deserialized # type: ignore @overload - def put_date_time_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -3426,7 +3400,7 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_time_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -3455,7 +3429,7 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3509,7 +3483,7 @@ def get_date_time_invalid_null(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3555,7 +3529,7 @@ def get_date_time_invalid_chars(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3602,7 +3576,7 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3641,7 +3615,7 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.datetime]: return deserialized # type: ignore @overload - def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -3658,7 +3632,7 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen """ @overload - def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -3687,7 +3661,7 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3741,7 +3715,7 @@ def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: :rtype: list[~datetime.timedelta] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3780,7 +3754,7 @@ def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: return deserialized # type: ignore @overload - def put_duration_valid( # pylint: disable=inconsistent-return-statements + def put_duration_valid( self, array_body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -3796,7 +3770,7 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_duration_valid( # pylint: disable=inconsistent-return-statements + def put_duration_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -3823,7 +3797,7 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3878,7 +3852,7 @@ def get_byte_valid(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,9 +3891,7 @@ def get_byte_valid(self, **kwargs: Any) -> List[bytes]: return deserialized # type: ignore @overload - def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_byte_valid(self, array_body: List[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each elementencoded in base 64. @@ -3934,9 +3906,7 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_byte_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each elementencoded in base 64. @@ -3963,7 +3933,7 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4017,7 +3987,7 @@ def get_byte_invalid_null(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4064,7 +4034,7 @@ def get_base64_url(self, **kwargs: Any) -> List[bytes]: :rtype: list[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4110,7 +4080,7 @@ def get_complex_null(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~vanilla.body.array.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4156,7 +4126,7 @@ def get_complex_empty(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~vanilla.body.array.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4203,7 +4173,7 @@ def get_complex_item_null(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~vanilla.body.array.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4250,7 +4220,7 @@ def get_complex_item_empty(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~vanilla.body.array.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4297,7 +4267,7 @@ def get_complex_valid(self, **kwargs: Any) -> List[_models.Product]: :rtype: list[~vanilla.body.array.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4336,7 +4306,7 @@ def get_complex_valid(self, **kwargs: Any) -> List[_models.Product]: return deserialized # type: ignore @overload - def put_complex_valid( # pylint: disable=inconsistent-return-statements + def put_complex_valid( self, array_body: List[_models.Product], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -4353,7 +4323,7 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_complex_valid( # pylint: disable=inconsistent-return-statements + def put_complex_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -4382,7 +4352,7 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4436,7 +4406,7 @@ def get_array_null(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4482,7 +4452,7 @@ def get_array_empty(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4528,7 +4498,7 @@ def get_array_item_null(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4574,7 +4544,7 @@ def get_array_item_empty(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4620,7 +4590,7 @@ def get_array_valid(self, **kwargs: Any) -> List[List[str]]: :rtype: list[list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4659,7 +4629,7 @@ def get_array_valid(self, **kwargs: Any) -> List[List[str]]: return deserialized # type: ignore @overload - def put_array_valid( # pylint: disable=inconsistent-return-statements + def put_array_valid( self, array_body: List[List[str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. @@ -4675,9 +4645,7 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_array_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_array_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. :param array_body: Required. @@ -4702,7 +4670,7 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4756,7 +4724,7 @@ def get_dictionary_null(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4802,7 +4770,7 @@ def get_dictionary_empty(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4849,7 +4817,7 @@ def get_dictionary_item_null(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4896,7 +4864,7 @@ def get_dictionary_item_empty(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4943,7 +4911,7 @@ def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: :rtype: list[dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4982,7 +4950,7 @@ def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: return deserialized # type: ignore @overload - def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + def put_dictionary_valid( self, array_body: List[Dict[str, str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -4999,7 +4967,7 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + def put_dictionary_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -5028,7 +4996,7 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_download_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_download_operations.py index 7d3f3c50428..bca0aafaaa2 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_download_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_download_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterator, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterator, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def error_stream(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_upload_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_upload_operations.py index a2a19809699..b6f6edd5926 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_upload_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_upload_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar +from typing import Any, Callable, Dict, IO, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,9 +52,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def file( # pylint: disable=inconsistent-return-statements - self, file_param: IO[bytes], **kwargs: Any - ) -> None: + async def file(self, file_param: IO[bytes], **kwargs: Any) -> None: """Uploading json file. :param file_param: JSON file with payload { "more": "cowbell" }. Required. @@ -64,7 +61,7 @@ async def file( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -103,9 +100,7 @@ async def file( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def binary( # pylint: disable=inconsistent-return-statements - self, file_param: IO[bytes], **kwargs: Any - ) -> None: + async def binary(self, file_param: IO[bytes], **kwargs: Any) -> None: """Uploading binary file. :param file_param: Non-empty binary file. Required. @@ -114,7 +109,7 @@ async def binary( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_download_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_download_operations.py index 3010898beb5..bc5571ace28 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_download_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_download_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterator, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterator, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -79,7 +78,7 @@ def error_stream(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_upload_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_upload_operations.py index ff3650b592c..04dbff658c1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_upload_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_upload_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar +from typing import Any, Callable, Dict, IO, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -93,7 +92,7 @@ def file(self, file_param: IO[bytes], **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -141,7 +140,7 @@ def binary(self, file_param: IO[bytes], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/_configuration.py index e795e2a2819..9d55b61840c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestBoolTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestBoolTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestBoolTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/_configuration.py index 25dae13cb76..c95abc76f30 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestBoolTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestBoolTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestBoolTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/operations/_bool_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/operations/_bool_operations.py index 79f8cf0e146..4063f1c26d0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/operations/_bool_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/operations/_bool_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +66,7 @@ async def get_true(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,14 +105,14 @@ async def get_true(self, **kwargs: Any) -> bool: return deserialized # type: ignore @distributed_trace_async - async def put_true(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_true(self, **kwargs: Any) -> None: """Set Boolean value true. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,7 +160,7 @@ async def get_false(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -200,14 +199,14 @@ async def get_false(self, **kwargs: Any) -> bool: return deserialized # type: ignore @distributed_trace_async - async def put_false(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_false(self, **kwargs: Any) -> None: """Set Boolean value false. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -255,7 +254,7 @@ async def get_null(self, **kwargs: Any) -> Optional[bool]: :rtype: bool or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -301,7 +300,7 @@ async def get_invalid(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/operations/_bool_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/operations/_bool_operations.py index f140ff6d54c..e0e73011111 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/operations/_bool_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/operations/_bool_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -155,7 +154,7 @@ def get_true(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -201,7 +200,7 @@ def put_true(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -249,7 +248,7 @@ def get_false(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -295,7 +294,7 @@ def put_false(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -343,7 +342,7 @@ def get_null(self, **kwargs: Any) -> Optional[bool]: :rtype: bool or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -389,7 +388,7 @@ def get_invalid(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/aio/operations/_byte_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/aio/operations/_byte_operations.py index d6e053d3818..a23504ed32c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/aio/operations/_byte_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/aio/operations/_byte_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ async def get_null(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,7 +111,7 @@ async def get_empty(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -158,7 +157,7 @@ async def get_non_ascii(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -197,9 +196,7 @@ async def get_non_ascii(self, **kwargs: Any) -> bytes: return deserialized # type: ignore @distributed_trace_async - async def put_non_ascii( # pylint: disable=inconsistent-return-statements - self, byte_body: bytes, **kwargs: Any - ) -> None: + async def put_non_ascii(self, byte_body: bytes, **kwargs: Any) -> None: """Put non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6). :param byte_body: Base64-encoded non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6). @@ -209,7 +206,7 @@ async def put_non_ascii( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -256,7 +253,7 @@ async def get_invalid(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/operations/_byte_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/operations/_byte_operations.py index ba8bacda478..ffe4356f800 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/operations/_byte_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/operations/_byte_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -136,7 +135,7 @@ def get_null(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ def get_empty(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -228,7 +227,7 @@ def get_non_ascii(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -277,7 +276,7 @@ def put_non_ascii(self, byte_body: bytes, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -324,7 +323,7 @@ def get_invalid(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/operations/_byte_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/operations/_byte_operations.py index 5f5c287500b..153a9b7dac2 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/operations/_byte_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/operations/_byte_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ async def get_null(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,7 +111,7 @@ async def get_empty(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -158,7 +157,7 @@ async def get_non_ascii(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -197,9 +196,7 @@ async def get_non_ascii(self, **kwargs: Any) -> bytes: return deserialized # type: ignore @distributed_trace_async - async def put_non_ascii( # pylint: disable=inconsistent-return-statements - self, byte_body: bytes, **kwargs: Any - ) -> None: + async def put_non_ascii(self, byte_body: bytes, **kwargs: Any) -> None: """Put non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6). :param byte_body: Base64-encoded non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6). @@ -209,7 +206,7 @@ async def put_non_ascii( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -256,7 +253,7 @@ async def get_invalid(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/operations/_byte_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/operations/_byte_operations.py index f6d87b63c5b..17172b0a821 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/operations/_byte_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/operations/_byte_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -136,7 +135,7 @@ def get_null(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ def get_empty(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -228,7 +227,7 @@ def get_non_ascii(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -277,7 +276,7 @@ def put_non_ascii(self, byte_body: bytes, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -324,7 +323,7 @@ def get_invalid(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/_auto_rest_complex_test_service.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/_auto_rest_complex_test_service.py index 3307157d07f..b2944e7ac41 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/_auto_rest_complex_test_service.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/_auto_rest_complex_test_service.py @@ -31,7 +31,7 @@ ) -class AutoRestComplexTestService: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class AutoRestComplexTestService: # pylint: disable=too-many-instance-attributes """Test Infrastructure for AutoRest. :ivar basic: BasicOperations operations diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/_configuration.py index bf63735dd9e..6f524f6076f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestComplexTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestComplexTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestComplexTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/_auto_rest_complex_test_service.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/_auto_rest_complex_test_service.py index db619ff46d1..07d76ee528c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/_auto_rest_complex_test_service.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/_auto_rest_complex_test_service.py @@ -31,7 +31,7 @@ ) -class AutoRestComplexTestService: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class AutoRestComplexTestService: # pylint: disable=too-many-instance-attributes """Test Infrastructure for AutoRest. :ivar basic: BasicOperations operations diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/_configuration.py index df93040976a..8924f21ccda 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestComplexTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestComplexTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestComplexTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_array_operations.py index f937e4f1065..04ec8267712 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_array_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ async def get_valid(self, **kwargs: Any) -> _models.ArrayWrapper: :rtype: ~bodycomplex.models.ArrayWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -105,9 +104,7 @@ async def get_valid(self, **kwargs: Any) -> _models.ArrayWrapper: return deserialized # type: ignore @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, array: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def put_valid(self, array: Optional[List[str]] = None, **kwargs: Any) -> None: """Put complex types with array property. :param array: Default value is None. @@ -116,7 +113,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -164,7 +161,7 @@ async def get_empty(self, **kwargs: Any) -> _models.ArrayWrapper: :rtype: ~bodycomplex.models.ArrayWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -203,9 +200,7 @@ async def get_empty(self, **kwargs: Any) -> _models.ArrayWrapper: return deserialized # type: ignore @distributed_trace_async - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def put_empty(self, array: Optional[List[str]] = None, **kwargs: Any) -> None: """Put complex types with array property which is empty. :param array: Default value is None. @@ -214,7 +209,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -262,7 +257,7 @@ async def get_not_provided(self, **kwargs: Any) -> _models.ArrayWrapper: :rtype: ~bodycomplex.models.ArrayWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py index 92300e52a41..e32ee652cb2 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -68,7 +67,7 @@ async def get_valid(self, **kwargs: Any) -> _models.Basic: :rtype: ~bodycomplex.models.Basic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -107,7 +106,7 @@ async def get_valid(self, **kwargs: Any) -> _models.Basic: return deserialized # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: _models.Basic, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Please put {id: 2, name: 'abc', color: 'Magenta'}. @@ -123,7 +122,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Please put {id: 2, name: 'abc', color: 'Magenta'}. @@ -139,9 +138,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.Basic, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[_models.Basic, IO[bytes]], **kwargs: Any) -> None: """Please put {id: 2, name: 'abc', color: 'Magenta'}. :param complex_body: Please put {id: 2, name: 'abc', color: 'Magenta'}. Is either a Basic type @@ -151,7 +148,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -207,7 +204,7 @@ async def get_invalid(self, **kwargs: Any) -> _models.Basic: :rtype: ~bodycomplex.models.Basic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +250,7 @@ async def get_empty(self, **kwargs: Any) -> _models.Basic: :rtype: ~bodycomplex.models.Basic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -299,7 +296,7 @@ async def get_null(self, **kwargs: Any) -> _models.Basic: :rtype: ~bodycomplex.models.Basic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -345,7 +342,7 @@ async def get_not_provided(self, **kwargs: Any) -> _models.Basic: :rtype: ~bodycomplex.models.Basic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_dictionary_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_dictionary_operations.py index 38e11a62804..d317900ff50 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_dictionary_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_dictionary_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +66,7 @@ async def get_valid(self, **kwargs: Any) -> _models.DictionaryWrapper: :rtype: ~bodycomplex.models.DictionaryWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,9 +105,7 @@ async def get_valid(self, **kwargs: Any) -> _models.DictionaryWrapper: return deserialized # type: ignore @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, default_program: Optional[Dict[str, str]] = None, **kwargs: Any - ) -> None: + async def put_valid(self, default_program: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """Put complex types with dictionary property. :param default_program: Dictionary of :code:``. Default value is None. @@ -117,7 +114,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +162,7 @@ async def get_empty(self, **kwargs: Any) -> _models.DictionaryWrapper: :rtype: ~bodycomplex.models.DictionaryWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,9 +201,7 @@ async def get_empty(self, **kwargs: Any) -> _models.DictionaryWrapper: return deserialized # type: ignore @distributed_trace_async - async def put_empty( # pylint: disable=inconsistent-return-statements - self, default_program: Optional[Dict[str, str]] = None, **kwargs: Any - ) -> None: + async def put_empty(self, default_program: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """Put complex types with dictionary property which is empty. :param default_program: Dictionary of :code:``. Default value is None. @@ -215,7 +210,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -263,7 +258,7 @@ async def get_null(self, **kwargs: Any) -> _models.DictionaryWrapper: :rtype: ~bodycomplex.models.DictionaryWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,7 +304,7 @@ async def get_not_provided(self, **kwargs: Any) -> _models.DictionaryWrapper: :rtype: ~bodycomplex.models.DictionaryWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_flattencomplex_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_flattencomplex_operations.py index 18600f3d901..cea2fdccc7e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_flattencomplex_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_flattencomplex_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,7 +58,7 @@ async def get_valid(self, **kwargs: Any) -> _models.MyBaseType: :rtype: ~bodycomplex.models.MyBaseType :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_inheritance_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_inheritance_operations.py index 3efd136f3d8..455b17c0870 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_inheritance_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_inheritance_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def get_valid(self, **kwargs: Any) -> _models.Siamese: :rtype: ~bodycomplex.models.Siamese :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -100,7 +99,7 @@ async def get_valid(self, **kwargs: Any) -> _models.Siamese: return deserialized # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: _models.Siamese, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that extend others. @@ -118,7 +117,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that extend others. @@ -136,9 +135,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.Siamese, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[_models.Siamese, IO[bytes]], **kwargs: Any) -> None: """Put complex types that extend others. :param complex_body: Please put a siamese with id=2, name="Siameee", color=green, @@ -150,7 +147,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphicrecursive_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphicrecursive_operations.py index 79c23adac3f..f7d8fca0f4d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphicrecursive_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphicrecursive_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def get_valid(self, **kwargs: Any) -> _models.Fish: :rtype: ~bodycomplex.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -100,7 +99,7 @@ async def get_valid(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: _models.Fish, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic and have recursive references. @@ -168,7 +167,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic and have recursive references. @@ -236,9 +235,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.Fish, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[_models.Fish, IO[bytes]], **kwargs: Any) -> None: """Put complex types that are polymorphic and have recursive references. :param complex_body: Please put a salmon that looks like this: @@ -299,7 +296,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py index 5dfb9412f43..33c18f833d9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -39,7 +38,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -71,7 +70,7 @@ async def get_valid(self, **kwargs: Any) -> _models.Fish: :rtype: ~bodycomplex.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -110,7 +109,7 @@ async def get_valid(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: _models.Fish, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic. @@ -158,7 +157,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic. @@ -206,9 +205,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.Fish, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[_models.Fish, IO[bytes]], **kwargs: Any) -> None: """Put complex types that are polymorphic. :param complex_body: Please put a salmon that looks like this: @@ -249,7 +246,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,7 +300,7 @@ async def get_dot_syntax(self, **kwargs: Any) -> _models.DotFish: :rtype: ~bodycomplex.models.DotFish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -351,7 +348,7 @@ async def get_composed_with_discriminator(self, **kwargs: Any) -> _models.DotFis :rtype: ~bodycomplex.models.DotFishMarket :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -399,7 +396,7 @@ async def get_composed_without_discriminator(self, **kwargs: Any) -> _models.Dot :rtype: ~bodycomplex.models.DotFishMarket :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -446,7 +443,7 @@ async def get_complicated(self, **kwargs: Any) -> _models.Salmon: :rtype: ~bodycomplex.models.Salmon :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -485,7 +482,7 @@ async def get_complicated(self, **kwargs: Any) -> _models.Salmon: return deserialized # type: ignore @overload - async def put_complicated( # pylint: disable=inconsistent-return-statements + async def put_complicated( self, complex_body: _models.Salmon, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, but not at the root of the hierarchy; also have @@ -502,7 +499,7 @@ async def put_complicated( # pylint: disable=inconsistent-return-statements """ @overload - async def put_complicated( # pylint: disable=inconsistent-return-statements + async def put_complicated( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, but not at the root of the hierarchy; also have @@ -519,9 +516,7 @@ async def put_complicated( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_complicated( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.Salmon, IO[bytes]], **kwargs: Any - ) -> None: + async def put_complicated(self, complex_body: Union[_models.Salmon, IO[bytes]], **kwargs: Any) -> None: """Put complex types that are polymorphic, but not at the root of the hierarchy; also have additional properties. @@ -531,7 +526,7 @@ async def put_complicated( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -621,7 +616,7 @@ async def put_missing_discriminator( :rtype: ~bodycomplex.models.Salmon :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -672,7 +667,7 @@ async def put_missing_discriminator( return deserialized # type: ignore @overload - async def put_valid_missing_required( # pylint: disable=inconsistent-return-statements + async def put_valid_missing_required( self, complex_body: _models.Fish, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, attempting to omit required 'birthday' field - the @@ -715,7 +710,7 @@ async def put_valid_missing_required( # pylint: disable=inconsistent-return-sta """ @overload - async def put_valid_missing_required( # pylint: disable=inconsistent-return-statements + async def put_valid_missing_required( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, attempting to omit required 'birthday' field - the @@ -758,9 +753,7 @@ async def put_valid_missing_required( # pylint: disable=inconsistent-return-sta """ @distributed_trace_async - async def put_valid_missing_required( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.Fish, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid_missing_required(self, complex_body: Union[_models.Fish, IO[bytes]], **kwargs: Any) -> None: """Put complex types that are polymorphic, attempting to omit required 'birthday' field - the request should not be allowed from the client. @@ -796,7 +789,7 @@ async def put_valid_missing_required( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py index 2121f85ac5e..d3dcc0270fe 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -53,7 +53,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -85,7 +85,7 @@ async def get_int(self, **kwargs: Any) -> _models.IntWrapper: :rtype: ~bodycomplex.models.IntWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -124,7 +124,7 @@ async def get_int(self, **kwargs: Any) -> _models.IntWrapper: return deserialized # type: ignore @overload - async def put_int( # pylint: disable=inconsistent-return-statements + async def put_int( self, complex_body: _models.IntWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with integer properties. @@ -140,9 +140,7 @@ async def put_int( # pylint: disable=inconsistent-return-statements """ @overload - async def put_int( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_int(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with integer properties. :param complex_body: Please put -1 and 2. Required. @@ -156,9 +154,7 @@ async def put_int( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_int( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.IntWrapper, IO[bytes]], **kwargs: Any - ) -> None: + async def put_int(self, complex_body: Union[_models.IntWrapper, IO[bytes]], **kwargs: Any) -> None: """Put complex types with integer properties. :param complex_body: Please put -1 and 2. Is either a IntWrapper type or a IO[bytes] type. @@ -168,7 +164,7 @@ async def put_int( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -222,7 +218,7 @@ async def get_long(self, **kwargs: Any) -> _models.LongWrapper: :rtype: ~bodycomplex.models.LongWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -261,7 +257,7 @@ async def get_long(self, **kwargs: Any) -> _models.LongWrapper: return deserialized # type: ignore @overload - async def put_long( # pylint: disable=inconsistent-return-statements + async def put_long( self, complex_body: _models.LongWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with long properties. @@ -277,9 +273,7 @@ async def put_long( # pylint: disable=inconsistent-return-statements """ @overload - async def put_long( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_long(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with long properties. :param complex_body: Please put 1099511627775 and -999511627788. Required. @@ -293,9 +287,7 @@ async def put_long( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_long( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.LongWrapper, IO[bytes]], **kwargs: Any - ) -> None: + async def put_long(self, complex_body: Union[_models.LongWrapper, IO[bytes]], **kwargs: Any) -> None: """Put complex types with long properties. :param complex_body: Please put 1099511627775 and -999511627788. Is either a LongWrapper type @@ -305,7 +297,7 @@ async def put_long( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -359,7 +351,7 @@ async def get_float(self, **kwargs: Any) -> _models.FloatWrapper: :rtype: ~bodycomplex.models.FloatWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -398,7 +390,7 @@ async def get_float(self, **kwargs: Any) -> _models.FloatWrapper: return deserialized # type: ignore @overload - async def put_float( # pylint: disable=inconsistent-return-statements + async def put_float( self, complex_body: _models.FloatWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with float properties. @@ -414,7 +406,7 @@ async def put_float( # pylint: disable=inconsistent-return-statements """ @overload - async def put_float( # pylint: disable=inconsistent-return-statements + async def put_float( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with float properties. @@ -430,9 +422,7 @@ async def put_float( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_float( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.FloatWrapper, IO[bytes]], **kwargs: Any - ) -> None: + async def put_float(self, complex_body: Union[_models.FloatWrapper, IO[bytes]], **kwargs: Any) -> None: """Put complex types with float properties. :param complex_body: Please put 1.05 and -0.003. Is either a FloatWrapper type or a IO[bytes] @@ -442,7 +432,7 @@ async def put_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -496,7 +486,7 @@ async def get_double(self, **kwargs: Any) -> _models.DoubleWrapper: :rtype: ~bodycomplex.models.DoubleWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -535,7 +525,7 @@ async def get_double(self, **kwargs: Any) -> _models.DoubleWrapper: return deserialized # type: ignore @overload - async def put_double( # pylint: disable=inconsistent-return-statements + async def put_double( self, complex_body: _models.DoubleWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with double properties. @@ -552,7 +542,7 @@ async def put_double( # pylint: disable=inconsistent-return-statements """ @overload - async def put_double( # pylint: disable=inconsistent-return-statements + async def put_double( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with double properties. @@ -569,9 +559,7 @@ async def put_double( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_double( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.DoubleWrapper, IO[bytes]], **kwargs: Any - ) -> None: + async def put_double(self, complex_body: Union[_models.DoubleWrapper, IO[bytes]], **kwargs: Any) -> None: """Put complex types with double properties. :param complex_body: Please put 3e-100 and @@ -582,7 +570,7 @@ async def put_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -636,7 +624,7 @@ async def get_bool(self, **kwargs: Any) -> _models.BooleanWrapper: :rtype: ~bodycomplex.models.BooleanWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -675,7 +663,7 @@ async def get_bool(self, **kwargs: Any) -> _models.BooleanWrapper: return deserialized # type: ignore @overload - async def put_bool( # pylint: disable=inconsistent-return-statements + async def put_bool( self, complex_body: _models.BooleanWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with bool properties. @@ -691,9 +679,7 @@ async def put_bool( # pylint: disable=inconsistent-return-statements """ @overload - async def put_bool( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_bool(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with bool properties. :param complex_body: Please put true and false. Required. @@ -707,9 +693,7 @@ async def put_bool( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_bool( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.BooleanWrapper, IO[bytes]], **kwargs: Any - ) -> None: + async def put_bool(self, complex_body: Union[_models.BooleanWrapper, IO[bytes]], **kwargs: Any) -> None: """Put complex types with bool properties. :param complex_body: Please put true and false. Is either a BooleanWrapper type or a IO[bytes] @@ -719,7 +703,7 @@ async def put_bool( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -773,7 +757,7 @@ async def get_string(self, **kwargs: Any) -> _models.StringWrapper: :rtype: ~bodycomplex.models.StringWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -812,7 +796,7 @@ async def get_string(self, **kwargs: Any) -> _models.StringWrapper: return deserialized # type: ignore @overload - async def put_string( # pylint: disable=inconsistent-return-statements + async def put_string( self, complex_body: _models.StringWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with string properties. @@ -828,7 +812,7 @@ async def put_string( # pylint: disable=inconsistent-return-statements """ @overload - async def put_string( # pylint: disable=inconsistent-return-statements + async def put_string( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with string properties. @@ -844,9 +828,7 @@ async def put_string( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_string( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.StringWrapper, IO[bytes]], **kwargs: Any - ) -> None: + async def put_string(self, complex_body: Union[_models.StringWrapper, IO[bytes]], **kwargs: Any) -> None: """Put complex types with string properties. :param complex_body: Please put 'goodrequest', '', and null. Is either a StringWrapper type or @@ -856,7 +838,7 @@ async def put_string( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -910,7 +892,7 @@ async def get_date(self, **kwargs: Any) -> _models.DateWrapper: :rtype: ~bodycomplex.models.DateWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -949,7 +931,7 @@ async def get_date(self, **kwargs: Any) -> _models.DateWrapper: return deserialized # type: ignore @overload - async def put_date( # pylint: disable=inconsistent-return-statements + async def put_date( self, complex_body: _models.DateWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with date properties. @@ -965,9 +947,7 @@ async def put_date( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_date(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with date properties. :param complex_body: Please put '0001-01-01' and '2016-02-29'. Required. @@ -981,9 +961,7 @@ async def put_date( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.DateWrapper, IO[bytes]], **kwargs: Any - ) -> None: + async def put_date(self, complex_body: Union[_models.DateWrapper, IO[bytes]], **kwargs: Any) -> None: """Put complex types with date properties. :param complex_body: Please put '0001-01-01' and '2016-02-29'. Is either a DateWrapper type or @@ -993,7 +971,7 @@ async def put_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1047,7 +1025,7 @@ async def get_date_time(self, **kwargs: Any) -> _models.DatetimeWrapper: :rtype: ~bodycomplex.models.DatetimeWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1086,7 +1064,7 @@ async def get_date_time(self, **kwargs: Any) -> _models.DatetimeWrapper: return deserialized # type: ignore @overload - async def put_date_time( # pylint: disable=inconsistent-return-statements + async def put_date_time( self, complex_body: _models.DatetimeWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetime properties. @@ -1103,7 +1081,7 @@ async def put_date_time( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_time( # pylint: disable=inconsistent-return-statements + async def put_date_time( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetime properties. @@ -1120,9 +1098,7 @@ async def put_date_time( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_time( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[_models.DatetimeWrapper, IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_time(self, complex_body: Union[_models.DatetimeWrapper, IO[bytes]], **kwargs: Any) -> None: """Put complex types with datetime properties. :param complex_body: Please put '0001-01-01T12:00:00-04:00' and '2015-05-18T11:38:00-08:00'. Is @@ -1132,7 +1108,7 @@ async def put_date_time( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1186,7 +1162,7 @@ async def get_date_time_rfc1123(self, **kwargs: Any) -> _models.Datetimerfc1123W :rtype: ~bodycomplex.models.Datetimerfc1123Wrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1225,7 +1201,7 @@ async def get_date_time_rfc1123(self, **kwargs: Any) -> _models.Datetimerfc1123W return deserialized # type: ignore @overload - async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123( self, complex_body: _models.Datetimerfc1123Wrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetimeRfc1123 properties. @@ -1242,7 +1218,7 @@ async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statemen """ @overload - async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetimeRfc1123 properties. @@ -1259,7 +1235,7 @@ async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statemen """ @distributed_trace_async - async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123( self, complex_body: Union[_models.Datetimerfc1123Wrapper, IO[bytes]], **kwargs: Any ) -> None: """Put complex types with datetimeRfc1123 properties. @@ -1271,7 +1247,7 @@ async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1325,7 +1301,7 @@ async def get_duration(self, **kwargs: Any) -> _models.DurationWrapper: :rtype: ~bodycomplex.models.DurationWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1364,9 +1340,7 @@ async def get_duration(self, **kwargs: Any) -> _models.DurationWrapper: return deserialized # type: ignore @distributed_trace_async - async def put_duration( # pylint: disable=inconsistent-return-statements - self, field: Optional[datetime.timedelta] = None, **kwargs: Any - ) -> None: + async def put_duration(self, field: Optional[datetime.timedelta] = None, **kwargs: Any) -> None: """Put complex types with duration properties. :param field: Default value is None. @@ -1375,7 +1349,7 @@ async def put_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1423,7 +1397,7 @@ async def get_byte(self, **kwargs: Any) -> _models.ByteWrapper: :rtype: ~bodycomplex.models.ByteWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1462,9 +1436,7 @@ async def get_byte(self, **kwargs: Any) -> _models.ByteWrapper: return deserialized # type: ignore @distributed_trace_async - async def put_byte( # pylint: disable=inconsistent-return-statements - self, field: Optional[bytes] = None, **kwargs: Any - ) -> None: + async def put_byte(self, field: Optional[bytes] = None, **kwargs: Any) -> None: """Put complex types with byte properties. :param field: Default value is None. @@ -1473,7 +1445,7 @@ async def put_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_readonlyproperty_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_readonlyproperty_operations.py index 2624972ca08..d48d086f7e9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_readonlyproperty_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_readonlyproperty_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -60,7 +59,7 @@ async def get_valid(self, **kwargs: Any) -> _models.ReadonlyObj: :rtype: ~bodycomplex.models.ReadonlyObj :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,9 +98,7 @@ async def get_valid(self, **kwargs: Any) -> _models.ReadonlyObj: return deserialized # type: ignore @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, size: Optional[int] = None, **kwargs: Any - ) -> None: + async def put_valid(self, size: Optional[int] = None, **kwargs: Any) -> None: """Put complex types that have readonly properties. :param size: Default value is None. @@ -110,7 +107,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/models/_models_py3.py index 4c14fa59097..a0a1d0d6aa6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/models/_models_py3.py @@ -1,5 +1,5 @@ -# coding=utf-8 # pylint: disable=too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +13,6 @@ import msrest.serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_array_operations.py index 384b3275415..c5438172348 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_array_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from msrest import Serializer @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -139,7 +138,7 @@ def get_valid(self, **kwargs: Any) -> _models.ArrayWrapper: :rtype: ~bodycomplex.models.ArrayWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -189,7 +188,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -237,7 +236,7 @@ def get_empty(self, **kwargs: Any) -> _models.ArrayWrapper: :rtype: ~bodycomplex.models.ArrayWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -287,7 +286,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -335,7 +334,7 @@ def get_not_provided(self, **kwargs: Any) -> _models.ArrayWrapper: :rtype: ~bodycomplex.models.ArrayWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py index 635e3b8bfb1..6d654331ac7 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -156,7 +155,7 @@ def get_valid(self, **kwargs: Any) -> _models.Basic: :rtype: ~bodycomplex.models.Basic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -195,9 +194,7 @@ def get_valid(self, **kwargs: Any) -> _models.Basic: return deserialized # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: _models.Basic, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: _models.Basic, *, content_type: str = "application/json", **kwargs: Any) -> None: """Please put {id: 2, name: 'abc', color: 'Magenta'}. :param complex_body: Please put {id: 2, name: 'abc', color: 'Magenta'}. Required. @@ -211,9 +208,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Please put {id: 2, name: 'abc', color: 'Magenta'}. :param complex_body: Please put {id: 2, name: 'abc', color: 'Magenta'}. Required. @@ -239,7 +234,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -295,7 +290,7 @@ def get_invalid(self, **kwargs: Any) -> _models.Basic: :rtype: ~bodycomplex.models.Basic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -341,7 +336,7 @@ def get_empty(self, **kwargs: Any) -> _models.Basic: :rtype: ~bodycomplex.models.Basic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -387,7 +382,7 @@ def get_null(self, **kwargs: Any) -> _models.Basic: :rtype: ~bodycomplex.models.Basic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -433,7 +428,7 @@ def get_not_provided(self, **kwargs: Any) -> _models.Basic: :rtype: ~bodycomplex.models.Basic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_dictionary_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_dictionary_operations.py index 4062a6ec473..16e04896450 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_dictionary_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_dictionary_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -153,7 +152,7 @@ def get_valid(self, **kwargs: Any) -> _models.DictionaryWrapper: :rtype: ~bodycomplex.models.DictionaryWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -203,7 +202,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -251,7 +250,7 @@ def get_empty(self, **kwargs: Any) -> _models.DictionaryWrapper: :rtype: ~bodycomplex.models.DictionaryWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -301,7 +300,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -349,7 +348,7 @@ def get_null(self, **kwargs: Any) -> _models.DictionaryWrapper: :rtype: ~bodycomplex.models.DictionaryWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -395,7 +394,7 @@ def get_not_provided(self, **kwargs: Any) -> _models.DictionaryWrapper: :rtype: ~bodycomplex.models.DictionaryWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_flattencomplex_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_flattencomplex_operations.py index 8365e1ebd9a..444637e18da 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_flattencomplex_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_flattencomplex_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -77,7 +76,7 @@ def get_valid(self, **kwargs: Any) -> _models.MyBaseType: :rtype: ~bodycomplex.models.MyBaseType :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_inheritance_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_inheritance_operations.py index 635f5f50a7f..39cbf6a7ca4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_inheritance_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_inheritance_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -95,7 +94,7 @@ def get_valid(self, **kwargs: Any) -> _models.Siamese: :rtype: ~bodycomplex.models.Siamese :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,7 +133,7 @@ def get_valid(self, **kwargs: Any) -> _models.Siamese: return deserialized # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements + def put_valid( self, complex_body: _models.Siamese, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that extend others. @@ -152,9 +151,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that extend others. :param complex_body: Please put a siamese with id=2, name="Siameee", color=green, @@ -184,7 +181,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphicrecursive_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphicrecursive_operations.py index 304642a3f8e..54168b649d5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphicrecursive_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphicrecursive_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -95,7 +94,7 @@ def get_valid(self, **kwargs: Any) -> _models.Fish: :rtype: ~bodycomplex.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,9 +133,7 @@ def get_valid(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: _models.Fish, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: _models.Fish, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic and have recursive references. :param complex_body: Please put a salmon that looks like this: @@ -202,9 +199,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic and have recursive references. :param complex_body: Please put a salmon that looks like this: @@ -333,7 +328,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphism_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphism_operations.py index b4b6a425031..086012606db 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphism_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphism_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from msrest import Serializer @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -202,7 +201,7 @@ def get_valid(self, **kwargs: Any) -> _models.Fish: :rtype: ~bodycomplex.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -241,9 +240,7 @@ def get_valid(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: _models.Fish, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: _models.Fish, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic. :param complex_body: Please put a salmon that looks like this: @@ -289,9 +286,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic. :param complex_body: Please put a salmon that looks like this: @@ -380,7 +375,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -434,7 +429,7 @@ def get_dot_syntax(self, **kwargs: Any) -> _models.DotFish: :rtype: ~bodycomplex.models.DotFish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,7 +477,7 @@ def get_composed_with_discriminator(self, **kwargs: Any) -> _models.DotFishMarke :rtype: ~bodycomplex.models.DotFishMarket :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -530,7 +525,7 @@ def get_composed_without_discriminator(self, **kwargs: Any) -> _models.DotFishMa :rtype: ~bodycomplex.models.DotFishMarket :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -577,7 +572,7 @@ def get_complicated(self, **kwargs: Any) -> _models.Salmon: :rtype: ~bodycomplex.models.Salmon :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -616,7 +611,7 @@ def get_complicated(self, **kwargs: Any) -> _models.Salmon: return deserialized # type: ignore @overload - def put_complicated( # pylint: disable=inconsistent-return-statements + def put_complicated( self, complex_body: _models.Salmon, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, but not at the root of the hierarchy; also have @@ -633,7 +628,7 @@ def put_complicated( # pylint: disable=inconsistent-return-statements """ @overload - def put_complicated( # pylint: disable=inconsistent-return-statements + def put_complicated( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, but not at the root of the hierarchy; also have @@ -662,7 +657,7 @@ def put_complicated( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -752,7 +747,7 @@ def put_missing_discriminator( :rtype: ~bodycomplex.models.Salmon :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -803,7 +798,7 @@ def put_missing_discriminator( return deserialized # type: ignore @overload - def put_valid_missing_required( # pylint: disable=inconsistent-return-statements + def put_valid_missing_required( self, complex_body: _models.Fish, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, attempting to omit required 'birthday' field - the @@ -846,7 +841,7 @@ def put_valid_missing_required( # pylint: disable=inconsistent-return-statement """ @overload - def put_valid_missing_required( # pylint: disable=inconsistent-return-statements + def put_valid_missing_required( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, attempting to omit required 'birthday' field - the @@ -927,7 +922,7 @@ def put_valid_missing_required( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_primitive_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_primitive_operations.py index b78a95abaa9..592823c3a53 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_primitive_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_primitive_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from msrest import Serializer @@ -31,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -406,7 +406,7 @@ def get_int(self, **kwargs: Any) -> _models.IntWrapper: :rtype: ~bodycomplex.models.IntWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -445,7 +445,7 @@ def get_int(self, **kwargs: Any) -> _models.IntWrapper: return deserialized # type: ignore @overload - def put_int( # pylint: disable=inconsistent-return-statements + def put_int( self, complex_body: _models.IntWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with integer properties. @@ -461,9 +461,7 @@ def put_int( # pylint: disable=inconsistent-return-statements """ @overload - def put_int( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_int(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with integer properties. :param complex_body: Please put -1 and 2. Required. @@ -489,7 +487,7 @@ def put_int( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -543,7 +541,7 @@ def get_long(self, **kwargs: Any) -> _models.LongWrapper: :rtype: ~bodycomplex.models.LongWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -582,7 +580,7 @@ def get_long(self, **kwargs: Any) -> _models.LongWrapper: return deserialized # type: ignore @overload - def put_long( # pylint: disable=inconsistent-return-statements + def put_long( self, complex_body: _models.LongWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with long properties. @@ -598,9 +596,7 @@ def put_long( # pylint: disable=inconsistent-return-statements """ @overload - def put_long( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with long properties. :param complex_body: Please put 1099511627775 and -999511627788. Required. @@ -626,7 +622,7 @@ def put_long( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -680,7 +676,7 @@ def get_float(self, **kwargs: Any) -> _models.FloatWrapper: :rtype: ~bodycomplex.models.FloatWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -719,7 +715,7 @@ def get_float(self, **kwargs: Any) -> _models.FloatWrapper: return deserialized # type: ignore @overload - def put_float( # pylint: disable=inconsistent-return-statements + def put_float( self, complex_body: _models.FloatWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with float properties. @@ -735,9 +731,7 @@ def put_float( # pylint: disable=inconsistent-return-statements """ @overload - def put_float( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_float(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with float properties. :param complex_body: Please put 1.05 and -0.003. Required. @@ -763,7 +757,7 @@ def put_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -817,7 +811,7 @@ def get_double(self, **kwargs: Any) -> _models.DoubleWrapper: :rtype: ~bodycomplex.models.DoubleWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -856,7 +850,7 @@ def get_double(self, **kwargs: Any) -> _models.DoubleWrapper: return deserialized # type: ignore @overload - def put_double( # pylint: disable=inconsistent-return-statements + def put_double( self, complex_body: _models.DoubleWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with double properties. @@ -873,9 +867,7 @@ def put_double( # pylint: disable=inconsistent-return-statements """ @overload - def put_double( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_double(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with double properties. :param complex_body: Please put 3e-100 and @@ -903,7 +895,7 @@ def put_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -957,7 +949,7 @@ def get_bool(self, **kwargs: Any) -> _models.BooleanWrapper: :rtype: ~bodycomplex.models.BooleanWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -996,7 +988,7 @@ def get_bool(self, **kwargs: Any) -> _models.BooleanWrapper: return deserialized # type: ignore @overload - def put_bool( # pylint: disable=inconsistent-return-statements + def put_bool( self, complex_body: _models.BooleanWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with bool properties. @@ -1012,9 +1004,7 @@ def put_bool( # pylint: disable=inconsistent-return-statements """ @overload - def put_bool( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_bool(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with bool properties. :param complex_body: Please put true and false. Required. @@ -1040,7 +1030,7 @@ def put_bool( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1094,7 +1084,7 @@ def get_string(self, **kwargs: Any) -> _models.StringWrapper: :rtype: ~bodycomplex.models.StringWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1133,7 +1123,7 @@ def get_string(self, **kwargs: Any) -> _models.StringWrapper: return deserialized # type: ignore @overload - def put_string( # pylint: disable=inconsistent-return-statements + def put_string( self, complex_body: _models.StringWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with string properties. @@ -1149,9 +1139,7 @@ def put_string( # pylint: disable=inconsistent-return-statements """ @overload - def put_string( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with string properties. :param complex_body: Please put 'goodrequest', '', and null. Required. @@ -1177,7 +1165,7 @@ def put_string( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1231,7 +1219,7 @@ def get_date(self, **kwargs: Any) -> _models.DateWrapper: :rtype: ~bodycomplex.models.DateWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1270,7 +1258,7 @@ def get_date(self, **kwargs: Any) -> _models.DateWrapper: return deserialized # type: ignore @overload - def put_date( # pylint: disable=inconsistent-return-statements + def put_date( self, complex_body: _models.DateWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with date properties. @@ -1286,9 +1274,7 @@ def put_date( # pylint: disable=inconsistent-return-statements """ @overload - def put_date( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with date properties. :param complex_body: Please put '0001-01-01' and '2016-02-29'. Required. @@ -1314,7 +1300,7 @@ def put_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1368,7 +1354,7 @@ def get_date_time(self, **kwargs: Any) -> _models.DatetimeWrapper: :rtype: ~bodycomplex.models.DatetimeWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1407,7 +1393,7 @@ def get_date_time(self, **kwargs: Any) -> _models.DatetimeWrapper: return deserialized # type: ignore @overload - def put_date_time( # pylint: disable=inconsistent-return-statements + def put_date_time( self, complex_body: _models.DatetimeWrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetime properties. @@ -1424,9 +1410,7 @@ def put_date_time( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_time( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date_time(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with datetime properties. :param complex_body: Please put '0001-01-01T12:00:00-04:00' and '2015-05-18T11:38:00-08:00'. @@ -1453,7 +1437,7 @@ def put_date_time( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1507,7 +1491,7 @@ def get_date_time_rfc1123(self, **kwargs: Any) -> _models.Datetimerfc1123Wrapper :rtype: ~bodycomplex.models.Datetimerfc1123Wrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1546,7 +1530,7 @@ def get_date_time_rfc1123(self, **kwargs: Any) -> _models.Datetimerfc1123Wrapper return deserialized # type: ignore @overload - def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123( self, complex_body: _models.Datetimerfc1123Wrapper, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetimeRfc1123 properties. @@ -1563,7 +1547,7 @@ def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetimeRfc1123 properties. @@ -1592,7 +1576,7 @@ def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1646,7 +1630,7 @@ def get_duration(self, **kwargs: Any) -> _models.DurationWrapper: :rtype: ~bodycomplex.models.DurationWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1696,7 +1680,7 @@ def put_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1744,7 +1728,7 @@ def get_byte(self, **kwargs: Any) -> _models.ByteWrapper: :rtype: ~bodycomplex.models.ByteWrapper :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1794,7 +1778,7 @@ def put_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_readonlyproperty_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_readonlyproperty_operations.py index 602604cd837..b5682c7b982 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_readonlyproperty_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_readonlyproperty_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -94,7 +93,7 @@ def get_valid(self, **kwargs: Any) -> _models.ReadonlyObj: :rtype: ~bodycomplex.models.ReadonlyObj :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -144,7 +143,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/_configuration.py index e9e1250ddc2..02320ab2fa0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestDateTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDateTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDateTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/_configuration.py index 819bf167db8..5396196f09d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestDateTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDateTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDateTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/operations/_date_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/operations/_date_operations.py index 06f567606c2..0e026b7e23e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/operations/_date_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/operations/_date_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -70,7 +69,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.date]: :rtype: ~datetime.date or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -116,7 +115,7 @@ async def get_invalid_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -162,7 +161,7 @@ async def get_overflow_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -208,7 +207,7 @@ async def get_underflow_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -247,9 +246,7 @@ async def get_underflow_date(self, **kwargs: Any) -> datetime.date: return deserialized # type: ignore @distributed_trace_async - async def put_max_date( # pylint: disable=inconsistent-return-statements - self, date_body: datetime.date, **kwargs: Any - ) -> None: + async def put_max_date(self, date_body: datetime.date, **kwargs: Any) -> None: """Put max date value 9999-12-31. :param date_body: date body. Required. @@ -258,7 +255,7 @@ async def put_max_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -305,7 +302,7 @@ async def get_max_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -344,9 +341,7 @@ async def get_max_date(self, **kwargs: Any) -> datetime.date: return deserialized # type: ignore @distributed_trace_async - async def put_min_date( # pylint: disable=inconsistent-return-statements - self, date_body: datetime.date, **kwargs: Any - ) -> None: + async def put_min_date(self, date_body: datetime.date, **kwargs: Any) -> None: """Put min date value 0000-01-01. :param date_body: date body. Required. @@ -355,7 +350,7 @@ async def put_min_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -402,7 +397,7 @@ async def get_min_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/operations/_date_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/operations/_date_operations.py index a999c637319..80e84ea8405 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/operations/_date_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/operations/_date_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -182,7 +181,7 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.date]: :rtype: ~datetime.date or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -228,7 +227,7 @@ def get_invalid_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -274,7 +273,7 @@ def get_overflow_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -320,7 +319,7 @@ def get_underflow_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -370,7 +369,7 @@ def put_max_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -417,7 +416,7 @@ def get_max_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -467,7 +466,7 @@ def put_min_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -514,7 +513,7 @@ def get_min_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/_configuration.py index 518c2823f7c..219f45e5cb1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestDateTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDateTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDateTimeTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/_configuration.py index c9dd8c3d20c..456ca558015 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestDateTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDateTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDateTimeTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/operations/_datetime_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/operations/_datetime_operations.py index fe6a2fa4498..de572c79ab0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/operations/_datetime_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/operations/_datetime_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -52,7 +52,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +84,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -130,7 +130,7 @@ async def get_invalid(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -176,7 +176,7 @@ async def get_overflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -222,7 +222,7 @@ async def get_underflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -261,9 +261,7 @@ async def get_underflow(self, **kwargs: Any) -> datetime.datetime: return deserialized # type: ignore @distributed_trace_async - async def put_utc_max_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_utc_max_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put max datetime value 9999-12-31T23:59:59.999Z. :param datetime_body: datetime body. Required. @@ -272,7 +270,7 @@ async def put_utc_max_date_time( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -312,9 +310,7 @@ async def put_utc_max_date_time( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_utc_max_date_time7_digits( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_utc_max_date_time7_digits(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put max datetime value 9999-12-31T23:59:59.9999999Z. This is against the recommendation that asks for 3 digits, but allow to test what happens in @@ -326,7 +322,7 @@ async def put_utc_max_date_time7_digits( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -373,7 +369,7 @@ async def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datet :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -419,7 +415,7 @@ async def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datet :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,7 +464,7 @@ async def get_utc_uppercase_max_date_time7_digits(self, **kwargs: Any) -> dateti :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -507,9 +503,7 @@ async def get_utc_uppercase_max_date_time7_digits(self, **kwargs: Any) -> dateti return deserialized # type: ignore @distributed_trace_async - async def put_local_positive_offset_max_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_local_positive_offset_max_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put max datetime value with positive numoffset 9999-12-31t23:59:59.999+14:00. :param datetime_body: datetime body. Required. @@ -518,7 +512,7 @@ async def put_local_positive_offset_max_date_time( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -567,7 +561,7 @@ async def get_local_positive_offset_lowercase_max_date_time( # pylint: disable= :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -615,7 +609,7 @@ async def get_local_positive_offset_uppercase_max_date_time( # pylint: disable= :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -654,9 +648,7 @@ async def get_local_positive_offset_uppercase_max_date_time( # pylint: disable= return deserialized # type: ignore @distributed_trace_async - async def put_local_negative_offset_max_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_local_negative_offset_max_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put max datetime value with positive numoffset 9999-12-31t23:59:59.999-14:00. :param datetime_body: datetime body. Required. @@ -665,7 +657,7 @@ async def put_local_negative_offset_max_date_time( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -714,7 +706,7 @@ async def get_local_negative_offset_uppercase_max_date_time( # pylint: disable= :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -762,7 +754,7 @@ async def get_local_negative_offset_lowercase_max_date_time( # pylint: disable= :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -801,9 +793,7 @@ async def get_local_negative_offset_lowercase_max_date_time( # pylint: disable= return deserialized # type: ignore @distributed_trace_async - async def put_utc_min_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_utc_min_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put min datetime value 0001-01-01T00:00:00Z. :param datetime_body: datetime body. Required. @@ -812,7 +802,7 @@ async def put_utc_min_date_time( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -859,7 +849,7 @@ async def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -898,9 +888,7 @@ async def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: return deserialized # type: ignore @distributed_trace_async - async def put_local_positive_offset_min_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_local_positive_offset_min_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put min datetime value 0001-01-01T00:00:00+14:00. :param datetime_body: datetime body. Required. @@ -909,7 +897,7 @@ async def put_local_positive_offset_min_date_time( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -956,7 +944,7 @@ async def get_local_positive_offset_min_date_time(self, **kwargs: Any) -> dateti :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,9 +983,7 @@ async def get_local_positive_offset_min_date_time(self, **kwargs: Any) -> dateti return deserialized # type: ignore @distributed_trace_async - async def put_local_negative_offset_min_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_local_negative_offset_min_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put min datetime value 0001-01-01T00:00:00-14:00. :param datetime_body: datetime body. Required. @@ -1006,7 +992,7 @@ async def put_local_negative_offset_min_date_time( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1053,7 +1039,7 @@ async def get_local_negative_offset_min_date_time(self, **kwargs: Any) -> dateti :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1099,7 +1085,7 @@ async def get_local_no_offset_min_date_time(self, **kwargs: Any) -> datetime.dat :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/operations/_datetime_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/operations/_datetime_operations.py index 84d568e0c18..b45085ec6be 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/operations/_datetime_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/operations/_datetime_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -417,7 +417,7 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -463,7 +463,7 @@ def get_invalid(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -509,7 +509,7 @@ def get_overflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -555,7 +555,7 @@ def get_underflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -605,7 +605,7 @@ def put_utc_max_date_time( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -659,7 +659,7 @@ def put_utc_max_date_time7_digits( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -706,7 +706,7 @@ def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -752,7 +752,7 @@ def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -801,7 +801,7 @@ def get_utc_uppercase_max_date_time7_digits(self, **kwargs: Any) -> datetime.dat :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -851,7 +851,7 @@ def put_local_positive_offset_max_date_time( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -900,7 +900,7 @@ def get_local_positive_offset_lowercase_max_date_time( # pylint: disable=name-t :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -948,7 +948,7 @@ def get_local_positive_offset_uppercase_max_date_time( # pylint: disable=name-t :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -998,7 +998,7 @@ def put_local_negative_offset_max_date_time( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1047,7 +1047,7 @@ def get_local_negative_offset_uppercase_max_date_time( # pylint: disable=name-t :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1095,7 +1095,7 @@ def get_local_negative_offset_lowercase_max_date_time( # pylint: disable=name-t :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1145,7 +1145,7 @@ def put_utc_min_date_time( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1192,7 +1192,7 @@ def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1242,7 +1242,7 @@ def put_local_positive_offset_min_date_time( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1289,7 +1289,7 @@ def get_local_positive_offset_min_date_time(self, **kwargs: Any) -> datetime.dat :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1339,7 +1339,7 @@ def put_local_negative_offset_min_date_time( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1386,7 +1386,7 @@ def get_local_negative_offset_min_date_time(self, **kwargs: Any) -> datetime.dat :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1432,7 +1432,7 @@ def get_local_no_offset_min_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/aio/operations/_datetimerfc1123_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/aio/operations/_datetimerfc1123_operations.py index 320ebd5ecdb..627ab5b0f88 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/aio/operations/_datetimerfc1123_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/aio/operations/_datetimerfc1123_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -39,7 +38,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -71,7 +70,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -117,7 +116,7 @@ async def get_invalid(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -163,7 +162,7 @@ async def get_overflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -209,7 +208,7 @@ async def get_underflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -248,9 +247,7 @@ async def get_underflow(self, **kwargs: Any) -> datetime.datetime: return deserialized # type: ignore @distributed_trace_async - async def put_utc_max_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_utc_max_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put max datetime value Fri, 31 Dec 9999 23:59:59 GMT. :param datetime_body: datetime body. Required. @@ -259,7 +256,7 @@ async def put_utc_max_date_time( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -306,7 +303,7 @@ async def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datet :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,7 +349,7 @@ async def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datet :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -391,9 +388,7 @@ async def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datet return deserialized # type: ignore @distributed_trace_async - async def put_utc_min_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_utc_min_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put min datetime value Mon, 1 Jan 0001 00:00:00 GMT. :param datetime_body: datetime body. Required. @@ -402,7 +397,7 @@ async def put_utc_min_date_time( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -449,7 +444,7 @@ async def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/operations/_datetimerfc1123_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/operations/_datetimerfc1123_operations.py index d85554410b9..2b877b0adee 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/operations/_datetimerfc1123_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/operations/_datetimerfc1123_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -196,7 +195,7 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -242,7 +241,7 @@ def get_invalid(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +287,7 @@ def get_overflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -334,7 +333,7 @@ def get_underflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -384,7 +383,7 @@ def put_utc_max_date_time( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -431,7 +430,7 @@ def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -477,7 +476,7 @@ def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -527,7 +526,7 @@ def put_utc_min_date_time( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -574,7 +573,7 @@ def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/aio/operations/_dictionary_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/aio/operations/_dictionary_operations.py index 9908644f614..7f7303d5763 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/aio/operations/_dictionary_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/aio/operations/_dictionary_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -96,7 +96,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -128,7 +128,7 @@ async def get_null(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -174,7 +174,7 @@ async def get_empty(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -213,7 +213,7 @@ async def get_empty(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - async def put_empty( # pylint: disable=inconsistent-return-statements + async def put_empty( self, array_body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {}. @@ -229,9 +229,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value empty {}. :param array_body: Required. @@ -245,9 +243,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_empty(self, array_body: Union[Dict[str, str], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value empty {}. :param array_body: Is either a {str: str} type or a IO[bytes] type. Required. @@ -256,7 +252,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -310,7 +306,7 @@ async def get_null_value(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -356,7 +352,7 @@ async def get_null_key(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -402,7 +398,7 @@ async def get_empty_string_key(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -448,7 +444,7 @@ async def get_invalid(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -494,7 +490,7 @@ async def get_boolean_tfft(self, **kwargs: Any) -> Dict[str, bool]: :rtype: dict[str, bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -533,7 +529,7 @@ async def get_boolean_tfft(self, **kwargs: Any) -> Dict[str, bool]: return deserialized # type: ignore @overload - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + async def put_boolean_tfft( self, array_body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. @@ -549,7 +545,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @overload - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + async def put_boolean_tfft( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. @@ -565,9 +561,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put_boolean_tfft(self, array_body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. :param array_body: Is either a {str: bool} type or a IO[bytes] type. Required. @@ -576,7 +570,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +624,7 @@ async def get_boolean_invalid_null(self, **kwargs: Any) -> Dict[str, bool]: :rtype: dict[str, bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -676,7 +670,7 @@ async def get_boolean_invalid_string(self, **kwargs: Any) -> Dict[str, bool]: :rtype: dict[str, bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -722,7 +716,7 @@ async def get_integer_valid(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -761,7 +755,7 @@ async def get_integer_valid(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - async def put_integer_valid( # pylint: disable=inconsistent-return-statements + async def put_integer_valid( self, array_body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -777,7 +771,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_integer_valid( # pylint: disable=inconsistent-return-statements + async def put_integer_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -793,9 +787,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_integer_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, int], IO[bytes]], **kwargs: Any - ) -> None: + async def put_integer_valid(self, array_body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. :param array_body: Is either a {str: int} type or a IO[bytes] type. Required. @@ -804,7 +796,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -858,7 +850,7 @@ async def get_int_invalid_null(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -904,7 +896,7 @@ async def get_int_invalid_string(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -950,7 +942,7 @@ async def get_long_valid(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -989,7 +981,7 @@ async def get_long_valid(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - async def put_long_valid( # pylint: disable=inconsistent-return-statements + async def put_long_valid( self, array_body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -1005,7 +997,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_long_valid( # pylint: disable=inconsistent-return-statements + async def put_long_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -1021,9 +1013,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, int], IO[bytes]], **kwargs: Any - ) -> None: + async def put_long_valid(self, array_body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. :param array_body: Is either a {str: int} type or a IO[bytes] type. Required. @@ -1032,7 +1022,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1086,7 +1076,7 @@ async def get_long_invalid_null(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1132,7 +1122,7 @@ async def get_long_invalid_string(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1178,7 +1168,7 @@ async def get_float_valid(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1217,7 +1207,7 @@ async def get_float_valid(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - async def put_float_valid( # pylint: disable=inconsistent-return-statements + async def put_float_valid( self, array_body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -1233,7 +1223,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_float_valid( # pylint: disable=inconsistent-return-statements + async def put_float_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -1249,9 +1239,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_float_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, float], IO[bytes]], **kwargs: Any - ) -> None: + async def put_float_valid(self, array_body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. :param array_body: Is either a {str: float} type or a IO[bytes] type. Required. @@ -1260,7 +1248,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1314,7 +1302,7 @@ async def get_float_invalid_null(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1360,7 +1348,7 @@ async def get_float_invalid_string(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1406,7 +1394,7 @@ async def get_double_valid(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1445,7 +1433,7 @@ async def get_double_valid(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - async def put_double_valid( # pylint: disable=inconsistent-return-statements + async def put_double_valid( self, array_body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -1461,7 +1449,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_double_valid( # pylint: disable=inconsistent-return-statements + async def put_double_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -1477,9 +1465,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_double_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, float], IO[bytes]], **kwargs: Any - ) -> None: + async def put_double_valid(self, array_body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. :param array_body: Is either a {str: float} type or a IO[bytes] type. Required. @@ -1488,7 +1474,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1542,7 +1528,7 @@ async def get_double_invalid_null(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1588,7 +1574,7 @@ async def get_double_invalid_string(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1634,7 +1620,7 @@ async def get_string_valid(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1673,7 +1659,7 @@ async def get_string_valid(self, **kwargs: Any) -> Dict[str, str]: return deserialized # type: ignore @overload - async def put_string_valid( # pylint: disable=inconsistent-return-statements + async def put_string_valid( self, array_body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. @@ -1689,7 +1675,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_string_valid( # pylint: disable=inconsistent-return-statements + async def put_string_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. @@ -1705,9 +1691,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_string_valid(self, array_body: Union[Dict[str, str], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. :param array_body: Is either a {str: str} type or a IO[bytes] type. Required. @@ -1716,7 +1700,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1770,7 +1754,7 @@ async def get_string_with_null(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1816,7 +1800,7 @@ async def get_string_with_invalid(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1862,7 +1846,7 @@ async def get_date_valid(self, **kwargs: Any) -> Dict[str, datetime.date]: :rtype: dict[str, ~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1901,7 +1885,7 @@ async def get_date_valid(self, **kwargs: Any) -> Dict[str, datetime.date]: return deserialized # type: ignore @overload - async def put_date_valid( # pylint: disable=inconsistent-return-statements + async def put_date_valid( self, array_body: Dict[str, datetime.date], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}. @@ -1917,7 +1901,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_valid( # pylint: disable=inconsistent-return-statements + async def put_date_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}. @@ -1933,9 +1917,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, datetime.date], IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_valid(self, array_body: Union[Dict[str, datetime.date], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}. :param array_body: Is either a {str: datetime.date} type or a IO[bytes] type. Required. @@ -1944,7 +1926,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1998,7 +1980,7 @@ async def get_date_invalid_null(self, **kwargs: Any) -> Dict[str, datetime.date] :rtype: dict[str, ~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2044,7 +2026,7 @@ async def get_date_invalid_chars(self, **kwargs: Any) -> Dict[str, datetime.date :rtype: dict[str, ~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2091,7 +2073,7 @@ async def get_date_time_valid(self, **kwargs: Any) -> Dict[str, datetime.datetim :rtype: dict[str, ~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2130,7 +2112,7 @@ async def get_date_time_valid(self, **kwargs: Any) -> Dict[str, datetime.datetim return deserialized # type: ignore @overload - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": @@ -2147,7 +2129,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": @@ -2164,7 +2146,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": @@ -2176,7 +2158,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2230,7 +2212,7 @@ async def get_date_time_invalid_null(self, **kwargs: Any) -> Dict[str, datetime. :rtype: dict[str, ~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2276,7 +2258,7 @@ async def get_date_time_invalid_chars(self, **kwargs: Any) -> Dict[str, datetime :rtype: dict[str, ~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2323,7 +2305,7 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> Dict[str, datetime :rtype: dict[str, ~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2362,7 +2344,7 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> Dict[str, datetime return deserialized # type: ignore @overload - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 @@ -2379,7 +2361,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st """ @overload - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 @@ -2396,7 +2378,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st """ @distributed_trace_async - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any ) -> None: """Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 @@ -2408,7 +2390,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2462,7 +2444,7 @@ async def get_duration_valid(self, **kwargs: Any) -> Dict[str, datetime.timedelt :rtype: dict[str, ~datetime.timedelta] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2501,7 +2483,7 @@ async def get_duration_valid(self, **kwargs: Any) -> Dict[str, datetime.timedelt return deserialized # type: ignore @overload - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. @@ -2517,7 +2499,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. @@ -2533,7 +2515,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: Union[Dict[str, datetime.timedelta], IO[bytes]], **kwargs: Any ) -> None: """Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. @@ -2544,7 +2526,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2599,7 +2581,7 @@ async def get_byte_valid(self, **kwargs: Any) -> Dict[str, bytes]: :rtype: dict[str, bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2638,7 +2620,7 @@ async def get_byte_valid(self, **kwargs: Any) -> Dict[str, bytes]: return deserialized # type: ignore @overload - async def put_byte_valid( # pylint: disable=inconsistent-return-statements + async def put_byte_valid( self, array_body: Dict[str, bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} @@ -2655,7 +2637,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_byte_valid( # pylint: disable=inconsistent-return-statements + async def put_byte_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} @@ -2672,9 +2654,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, bytes], IO[bytes]], **kwargs: Any - ) -> None: + async def put_byte_valid(self, array_body: Union[Dict[str, bytes], IO[bytes]], **kwargs: Any) -> None: """Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} with each elementencoded in base 64. @@ -2684,7 +2664,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2739,7 +2719,7 @@ async def get_byte_invalid_null(self, **kwargs: Any) -> Dict[str, bytes]: :rtype: dict[str, bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2786,7 +2766,7 @@ async def get_base64_url(self, **kwargs: Any) -> Dict[str, bytes]: :rtype: dict[str, bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2832,7 +2812,7 @@ async def get_complex_null(self, **kwargs: Any) -> Optional[Dict[str, _models.Wi :rtype: dict[str, ~bodydictionary.models.Widget] or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2878,7 +2858,7 @@ async def get_complex_empty(self, **kwargs: Any) -> Dict[str, _models.Widget]: :rtype: dict[str, ~bodydictionary.models.Widget] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2925,7 +2905,7 @@ async def get_complex_item_null(self, **kwargs: Any) -> Dict[str, _models.Widget :rtype: dict[str, ~bodydictionary.models.Widget] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2972,7 +2952,7 @@ async def get_complex_item_empty(self, **kwargs: Any) -> Dict[str, _models.Widge :rtype: dict[str, ~bodydictionary.models.Widget] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3019,7 +2999,7 @@ async def get_complex_valid(self, **kwargs: Any) -> Dict[str, _models.Widget]: :rtype: dict[str, ~bodydictionary.models.Widget] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3058,7 +3038,7 @@ async def get_complex_valid(self, **kwargs: Any) -> Dict[str, _models.Widget]: return deserialized # type: ignore @overload - async def put_complex_valid( # pylint: disable=inconsistent-return-statements + async def put_complex_valid( self, array_body: Dict[str, _models.Widget], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": @@ -3075,7 +3055,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_complex_valid( # pylint: disable=inconsistent-return-statements + async def put_complex_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": @@ -3092,9 +3072,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_complex_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, _models.Widget], IO[bytes]], **kwargs: Any - ) -> None: + async def put_complex_valid(self, array_body: Union[Dict[str, _models.Widget], IO[bytes]], **kwargs: Any) -> None: """Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": {"integer": 3, "string": "4"}, "2": {"integer": 5, "string": "6"}}. @@ -3104,7 +3082,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3158,7 +3136,7 @@ async def get_array_null(self, **kwargs: Any) -> Optional[Dict[str, List[str]]]: :rtype: dict[str, list[str]] or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3204,7 +3182,7 @@ async def get_array_empty(self, **kwargs: Any) -> Dict[str, List[str]]: :rtype: dict[str, list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3250,7 +3228,7 @@ async def get_array_item_null(self, **kwargs: Any) -> Dict[str, List[str]]: :rtype: dict[str, list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3296,7 +3274,7 @@ async def get_array_item_empty(self, **kwargs: Any) -> Dict[str, List[str]]: :rtype: dict[str, list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3343,7 +3321,7 @@ async def get_array_valid(self, **kwargs: Any) -> Dict[str, List[str]]: :rtype: dict[str, list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3382,7 +3360,7 @@ async def get_array_valid(self, **kwargs: Any) -> Dict[str, List[str]]: return deserialized # type: ignore @overload - async def put_array_valid( # pylint: disable=inconsistent-return-statements + async def put_array_valid( self, array_body: Dict[str, List[str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", @@ -3399,7 +3377,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_array_valid( # pylint: disable=inconsistent-return-statements + async def put_array_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", @@ -3416,9 +3394,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_array_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, List[str]], IO[bytes]], **kwargs: Any - ) -> None: + async def put_array_valid(self, array_body: Union[Dict[str, List[str]], IO[bytes]], **kwargs: Any) -> None: """Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", "9"]}. @@ -3428,7 +3404,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3482,7 +3458,7 @@ async def get_dictionary_null(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: :rtype: dict[str, dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3528,7 +3504,7 @@ async def get_dictionary_empty(self, **kwargs: Any) -> Dict[str, Dict[str, str]] :rtype: dict[str, dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3575,7 +3551,7 @@ async def get_dictionary_item_null(self, **kwargs: Any) -> Dict[str, Dict[str, s :rtype: dict[str, dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3622,7 +3598,7 @@ async def get_dictionary_item_empty(self, **kwargs: Any) -> Dict[str, Dict[str, :rtype: dict[str, dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3670,7 +3646,7 @@ async def get_dictionary_valid(self, **kwargs: Any) -> Dict[str, Dict[str, str]] :rtype: dict[str, dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3709,7 +3685,7 @@ async def get_dictionary_valid(self, **kwargs: Any) -> Dict[str, Dict[str, str]] return deserialized # type: ignore @overload - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: Dict[str, Dict[str, str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": @@ -3727,7 +3703,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement """ @overload - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": @@ -3745,7 +3721,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement """ @distributed_trace_async - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: Union[Dict[str, Dict[str, str]], IO[bytes]], **kwargs: Any ) -> None: """Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": @@ -3758,7 +3734,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/models/_models_py3.py index 6906555b777..21059e5baf1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py index 6cd19094145..df95303c0d3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1020,7 +1020,7 @@ def get_null(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1066,7 +1066,7 @@ def get_empty(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1105,9 +1105,7 @@ def get_empty(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, array_body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value empty {}. :param array_body: Required. @@ -1121,9 +1119,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value empty {}. :param array_body: Required. @@ -1148,7 +1144,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1202,7 +1198,7 @@ def get_null_value(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1248,7 +1244,7 @@ def get_null_key(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1294,7 +1290,7 @@ def get_empty_string_key(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1340,7 +1336,7 @@ def get_invalid(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1386,7 +1382,7 @@ def get_boolean_tfft(self, **kwargs: Any) -> Dict[str, bool]: :rtype: dict[str, bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1425,7 +1421,7 @@ def get_boolean_tfft(self, **kwargs: Any) -> Dict[str, bool]: return deserialized # type: ignore @overload - def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + def put_boolean_tfft( self, array_body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. @@ -1441,9 +1437,7 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @overload - def put_boolean_tfft( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_boolean_tfft(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. :param array_body: Required. @@ -1468,7 +1462,7 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1522,7 +1516,7 @@ def get_boolean_invalid_null(self, **kwargs: Any) -> Dict[str, bool]: :rtype: dict[str, bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1568,7 +1562,7 @@ def get_boolean_invalid_string(self, **kwargs: Any) -> Dict[str, bool]: :rtype: dict[str, bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1614,7 +1608,7 @@ def get_integer_valid(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1653,7 +1647,7 @@ def get_integer_valid(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - def put_integer_valid( # pylint: disable=inconsistent-return-statements + def put_integer_valid( self, array_body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -1669,7 +1663,7 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_integer_valid( # pylint: disable=inconsistent-return-statements + def put_integer_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -1696,7 +1690,7 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1750,7 +1744,7 @@ def get_int_invalid_null(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1796,7 +1790,7 @@ def get_int_invalid_string(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1842,7 +1836,7 @@ def get_long_valid(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1875,7 @@ def get_long_valid(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - def put_long_valid( # pylint: disable=inconsistent-return-statements + def put_long_valid( self, array_body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -1897,9 +1891,7 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. :param array_body: Required. @@ -1924,7 +1916,7 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1978,7 +1970,7 @@ def get_long_invalid_null(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2024,7 +2016,7 @@ def get_long_invalid_string(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2070,7 +2062,7 @@ def get_float_valid(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2109,7 +2101,7 @@ def get_float_valid(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - def put_float_valid( # pylint: disable=inconsistent-return-statements + def put_float_valid( self, array_body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -2125,9 +2117,7 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_float_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_float_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. :param array_body: Required. @@ -2152,7 +2142,7 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2206,7 +2196,7 @@ def get_float_invalid_null(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2252,7 +2242,7 @@ def get_float_invalid_string(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2298,7 +2288,7 @@ def get_double_valid(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2337,7 +2327,7 @@ def get_double_valid(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - def put_double_valid( # pylint: disable=inconsistent-return-statements + def put_double_valid( self, array_body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -2353,9 +2343,7 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_double_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_double_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. :param array_body: Required. @@ -2380,7 +2368,7 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2434,7 +2422,7 @@ def get_double_invalid_null(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2480,7 +2468,7 @@ def get_double_invalid_string(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2526,7 +2514,7 @@ def get_string_valid(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2565,7 +2553,7 @@ def get_string_valid(self, **kwargs: Any) -> Dict[str, str]: return deserialized # type: ignore @overload - def put_string_valid( # pylint: disable=inconsistent-return-statements + def put_string_valid( self, array_body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. @@ -2581,9 +2569,7 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. :param array_body: Required. @@ -2608,7 +2594,7 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2662,7 +2648,7 @@ def get_string_with_null(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2708,7 +2694,7 @@ def get_string_with_invalid(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2754,7 +2740,7 @@ def get_date_valid(self, **kwargs: Any) -> Dict[str, datetime.date]: :rtype: dict[str, ~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2793,7 +2779,7 @@ def get_date_valid(self, **kwargs: Any) -> Dict[str, datetime.date]: return deserialized # type: ignore @overload - def put_date_valid( # pylint: disable=inconsistent-return-statements + def put_date_valid( self, array_body: Dict[str, datetime.date], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}. @@ -2809,9 +2795,7 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}. :param array_body: Required. @@ -2836,7 +2820,7 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2890,7 +2874,7 @@ def get_date_invalid_null(self, **kwargs: Any) -> Dict[str, datetime.date]: :rtype: dict[str, ~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2936,7 +2920,7 @@ def get_date_invalid_chars(self, **kwargs: Any) -> Dict[str, datetime.date]: :rtype: dict[str, ~datetime.date] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2983,7 +2967,7 @@ def get_date_time_valid(self, **kwargs: Any) -> Dict[str, datetime.datetime]: :rtype: dict[str, ~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3022,7 +3006,7 @@ def get_date_time_valid(self, **kwargs: Any) -> Dict[str, datetime.datetime]: return deserialized # type: ignore @overload - def put_date_time_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_valid( self, array_body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": @@ -3039,7 +3023,7 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_time_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": @@ -3068,7 +3052,7 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3122,7 +3106,7 @@ def get_date_time_invalid_null(self, **kwargs: Any) -> Dict[str, datetime.dateti :rtype: dict[str, ~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3168,7 +3152,7 @@ def get_date_time_invalid_chars(self, **kwargs: Any) -> Dict[str, datetime.datet :rtype: dict[str, ~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3215,7 +3199,7 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> Dict[str, datetime.datet :rtype: dict[str, ~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3254,7 +3238,7 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> Dict[str, datetime.datet return deserialized # type: ignore @overload - def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123_valid( self, array_body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 @@ -3271,7 +3255,7 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen """ @overload - def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 @@ -3300,7 +3284,7 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3354,7 +3338,7 @@ def get_duration_valid(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: :rtype: dict[str, ~datetime.timedelta] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3393,7 +3377,7 @@ def get_duration_valid(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: return deserialized # type: ignore @overload - def put_duration_valid( # pylint: disable=inconsistent-return-statements + def put_duration_valid( self, array_body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. @@ -3409,7 +3393,7 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_duration_valid( # pylint: disable=inconsistent-return-statements + def put_duration_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. @@ -3436,7 +3420,7 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3491,7 +3475,7 @@ def get_byte_valid(self, **kwargs: Any) -> Dict[str, bytes]: :rtype: dict[str, bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3530,7 +3514,7 @@ def get_byte_valid(self, **kwargs: Any) -> Dict[str, bytes]: return deserialized # type: ignore @overload - def put_byte_valid( # pylint: disable=inconsistent-return-statements + def put_byte_valid( self, array_body: Dict[str, bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} @@ -3547,9 +3531,7 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_byte_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} with each elementencoded in base 64. @@ -3576,7 +3558,7 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3631,7 +3613,7 @@ def get_byte_invalid_null(self, **kwargs: Any) -> Dict[str, bytes]: :rtype: dict[str, bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3678,7 +3660,7 @@ def get_base64_url(self, **kwargs: Any) -> Dict[str, bytes]: :rtype: dict[str, bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3724,7 +3706,7 @@ def get_complex_null(self, **kwargs: Any) -> Optional[Dict[str, _models.Widget]] :rtype: dict[str, ~bodydictionary.models.Widget] or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3770,7 +3752,7 @@ def get_complex_empty(self, **kwargs: Any) -> Dict[str, _models.Widget]: :rtype: dict[str, ~bodydictionary.models.Widget] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3817,7 +3799,7 @@ def get_complex_item_null(self, **kwargs: Any) -> Dict[str, _models.Widget]: :rtype: dict[str, ~bodydictionary.models.Widget] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3864,7 +3846,7 @@ def get_complex_item_empty(self, **kwargs: Any) -> Dict[str, _models.Widget]: :rtype: dict[str, ~bodydictionary.models.Widget] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3911,7 +3893,7 @@ def get_complex_valid(self, **kwargs: Any) -> Dict[str, _models.Widget]: :rtype: dict[str, ~bodydictionary.models.Widget] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3950,7 +3932,7 @@ def get_complex_valid(self, **kwargs: Any) -> Dict[str, _models.Widget]: return deserialized # type: ignore @overload - def put_complex_valid( # pylint: disable=inconsistent-return-statements + def put_complex_valid( self, array_body: Dict[str, _models.Widget], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": @@ -3967,7 +3949,7 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_complex_valid( # pylint: disable=inconsistent-return-statements + def put_complex_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": @@ -3996,7 +3978,7 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4050,7 +4032,7 @@ def get_array_null(self, **kwargs: Any) -> Optional[Dict[str, List[str]]]: :rtype: dict[str, list[str]] or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4096,7 +4078,7 @@ def get_array_empty(self, **kwargs: Any) -> Dict[str, List[str]]: :rtype: dict[str, list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4142,7 +4124,7 @@ def get_array_item_null(self, **kwargs: Any) -> Dict[str, List[str]]: :rtype: dict[str, list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4188,7 +4170,7 @@ def get_array_item_empty(self, **kwargs: Any) -> Dict[str, List[str]]: :rtype: dict[str, list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4235,7 +4217,7 @@ def get_array_valid(self, **kwargs: Any) -> Dict[str, List[str]]: :rtype: dict[str, list[str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4274,7 +4256,7 @@ def get_array_valid(self, **kwargs: Any) -> Dict[str, List[str]]: return deserialized # type: ignore @overload - def put_array_valid( # pylint: disable=inconsistent-return-statements + def put_array_valid( self, array_body: Dict[str, List[str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", @@ -4291,9 +4273,7 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_array_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_array_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", "9"]}. @@ -4320,7 +4300,7 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4374,7 +4354,7 @@ def get_dictionary_null(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: :rtype: dict[str, dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4420,7 +4400,7 @@ def get_dictionary_empty(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: :rtype: dict[str, dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4467,7 +4447,7 @@ def get_dictionary_item_null(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: :rtype: dict[str, dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4514,7 +4494,7 @@ def get_dictionary_item_empty(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: :rtype: dict[str, dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4562,7 +4542,7 @@ def get_dictionary_valid(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: :rtype: dict[str, dict[str, str]] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4601,7 +4581,7 @@ def get_dictionary_valid(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: return deserialized # type: ignore @overload - def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + def put_dictionary_valid( self, array_body: Dict[str, Dict[str, str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": @@ -4619,7 +4599,7 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + def put_dictionary_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": @@ -4650,7 +4630,7 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/_configuration.py index e4448ee79b4..4c8dabf1a84 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDurationTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/_configuration.py index 131a151c25e..2720ec54e59 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDurationTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/operations/_duration_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/operations/_duration_operations.py index 22c39c4e88f..cbb76823548 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/operations/_duration_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/operations/_duration_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: :rtype: ~datetime.timedelta or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -105,9 +104,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: return deserialized # type: ignore @distributed_trace_async - async def put_positive_duration( # pylint: disable=inconsistent-return-statements - self, duration_body: datetime.timedelta, **kwargs: Any - ) -> None: + async def put_positive_duration(self, duration_body: datetime.timedelta, **kwargs: Any) -> None: """Put a positive duration value. :param duration_body: duration body. Required. @@ -116,7 +113,7 @@ async def put_positive_duration( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -163,7 +160,7 @@ async def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -209,7 +206,7 @@ async def get_invalid(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/operations/_duration_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/operations/_duration_operations.py index ef34cc19b6d..5abfdef5b39 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/operations/_duration_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/operations/_duration_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -123,7 +122,7 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: :rtype: ~datetime.timedelta or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -173,7 +172,7 @@ def put_positive_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,7 +219,7 @@ def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +265,7 @@ def get_invalid(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/aio/operations/_files_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/aio/operations/_files_operations.py index 389702ce9e1..c0416851a21 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/aio/operations/_files_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/aio/operations/_files_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterator, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterator, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -65,7 +64,7 @@ async def get_file(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -116,7 +115,7 @@ async def get_file_large(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -167,7 +166,7 @@ async def get_empty_file(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/operations/_files_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/operations/_files_operations.py index ed667aad0fd..da772413685 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/operations/_files_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/operations/_files_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterator, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterator, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -107,7 +106,7 @@ def get_file(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -158,7 +157,7 @@ def get_file_large(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -209,7 +208,7 @@ def get_empty_file(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/aio/operations/_formdata_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/aio/operations/_formdata_operations.py index 76e09d1b18a..4520bc68be6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/aio/operations/_formdata_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/aio/operations/_formdata_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, Type, TypeVar +from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -71,7 +70,7 @@ async def upload_file(self, file_content: IO[bytes], file_name: str, **kwargs: A :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -133,7 +132,7 @@ async def upload_file_via_body(self, file_content: IO[bytes], **kwargs: Any) -> :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -191,7 +190,7 @@ async def upload_files(self, file_content: List[IO[bytes]], **kwargs: Any) -> As :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/models/_models_py3.py index 56e47321d12..ea317c7f3f6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/operations/_formdata_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/operations/_formdata_operations.py index 966acdb26ce..a758ce7d523 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/operations/_formdata_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/operations/_formdata_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, Iterator, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -117,7 +116,7 @@ def upload_file(self, file_content: IO[bytes], file_name: str, **kwargs: Any) -> :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -179,7 +178,7 @@ def upload_file_via_body(self, file_content: IO[bytes], **kwargs: Any) -> Iterat :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -237,7 +236,7 @@ def upload_files(self, file_content: List[IO[bytes]], **kwargs: Any) -> Iterator :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/_configuration.py index 729c77b83ba..4e9f75919bc 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class BodyFormsDataURLEncodedConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class BodyFormsDataURLEncodedConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for BodyFormsDataURLEncoded. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/aio/_configuration.py index 1c25f7867d1..88785f26831 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class BodyFormsDataURLEncodedConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class BodyFormsDataURLEncodedConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for BodyFormsDataURLEncoded. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/aio/operations/_formdataurlencoded_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/aio/operations/_formdataurlencoded_operations.py index ddec05fba7d..fe31e8002e1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/aio/operations/_formdataurlencoded_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/aio/operations/_formdataurlencoded_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Literal, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +55,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def update_pet_with_form( # pylint: disable=inconsistent-return-statements + async def update_pet_with_form( self, pet_id: int, pet_type: Union[str, _models.PetType], @@ -88,7 +87,7 @@ async def update_pet_with_form( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -137,9 +136,7 @@ async def update_pet_with_form( # pylint: disable=inconsistent-return-statement return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def partial_constant_body( # pylint: disable=inconsistent-return-statements - self, service: str, access_token: str, **kwargs: Any - ) -> None: + async def partial_constant_body(self, service: str, access_token: str, **kwargs: Any) -> None: """Test a partially constant formdata body. Pass in { grant_type: 'access_token', access_token: 'foo', service: 'bar' } to pass the test. @@ -152,7 +149,7 @@ async def partial_constant_body( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/models/_models_py3.py index 13d4f2fd161..d684fe1f617 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/operations/_formdataurlencoded_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/operations/_formdataurlencoded_operations.py index d424c719887..9960db7b0e1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/operations/_formdataurlencoded_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/operations/_formdataurlencoded_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Literal, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -113,7 +112,7 @@ def update_pet_with_form( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -177,7 +176,7 @@ def partial_constant_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/_configuration.py index 564d09352e7..24bab0f210e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestIntegerTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestIntegerTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestIntegerTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/_configuration.py index a42ef16e73c..c03e7bf6d08 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestIntegerTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestIntegerTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestIntegerTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/operations/_int_operations_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/operations/_int_operations_operations.py index 9d49952ce17..0d19fcc1a19 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/operations/_int_operations_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/operations/_int_operations_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -44,7 +43,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -76,7 +75,7 @@ async def get_null(self, **kwargs: Any) -> Optional[int]: :rtype: int or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -122,7 +121,7 @@ async def get_invalid(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -168,7 +167,7 @@ async def get_overflow_int32(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -214,7 +213,7 @@ async def get_underflow_int32(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -260,7 +259,7 @@ async def get_overflow_int64(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -306,7 +305,7 @@ async def get_underflow_int64(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -345,7 +344,7 @@ async def get_underflow_int64(self, **kwargs: Any) -> int: return deserialized # type: ignore @distributed_trace_async - async def put_max32(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_max32(self, int_body: int, **kwargs: Any) -> None: """Put max int32 value. :param int_body: int body. Required. @@ -354,7 +353,7 @@ async def put_max32(self, int_body: int, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -394,7 +393,7 @@ async def put_max32(self, int_body: int, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_max64(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_max64(self, int_body: int, **kwargs: Any) -> None: """Put max int64 value. :param int_body: int body. Required. @@ -403,7 +402,7 @@ async def put_max64(self, int_body: int, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -443,7 +442,7 @@ async def put_max64(self, int_body: int, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_min32(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_min32(self, int_body: int, **kwargs: Any) -> None: """Put min int32 value. :param int_body: int body. Required. @@ -452,7 +451,7 @@ async def put_min32(self, int_body: int, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -492,7 +491,7 @@ async def put_min32(self, int_body: int, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_min64(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_min64(self, int_body: int, **kwargs: Any) -> None: """Put min int64 value. :param int_body: int body. Required. @@ -501,7 +500,7 @@ async def put_min64(self, int_body: int, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -548,7 +547,7 @@ async def get_unix_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -587,9 +586,7 @@ async def get_unix_time(self, **kwargs: Any) -> datetime.datetime: return deserialized # type: ignore @distributed_trace_async - async def put_unix_time_date( # pylint: disable=inconsistent-return-statements - self, int_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_unix_time_date(self, int_body: datetime.datetime, **kwargs: Any) -> None: """Put datetime encoded as Unix time. :param int_body: int body. Required. @@ -598,7 +595,7 @@ async def put_unix_time_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -645,7 +642,7 @@ async def get_invalid_unix_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -691,7 +688,7 @@ async def get_null_unix_time(self, **kwargs: Any) -> Optional[datetime.datetime] :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/operations/_int_operations_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/operations/_int_operations_operations.py index d3b84ed576c..05ca15e53f9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/operations/_int_operations_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/operations/_int_operations_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -275,7 +274,7 @@ def get_null(self, **kwargs: Any) -> Optional[int]: :rtype: int or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -321,7 +320,7 @@ def get_invalid(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -367,7 +366,7 @@ def get_overflow_int32(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -413,7 +412,7 @@ def get_underflow_int32(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -459,7 +458,7 @@ def get_overflow_int64(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -505,7 +504,7 @@ def get_underflow_int64(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -553,7 +552,7 @@ def put_max32(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -602,7 +601,7 @@ def put_max64(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -651,7 +650,7 @@ def put_min32(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -700,7 +699,7 @@ def put_min64(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -747,7 +746,7 @@ def get_unix_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -797,7 +796,7 @@ def put_unix_time_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -844,7 +843,7 @@ def get_invalid_unix_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -890,7 +889,7 @@ def get_null_unix_time(self, **kwargs: Any) -> Optional[datetime.datetime]: :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/_configuration.py index ece6b6ff624..db942dffcdd 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestNumberTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestNumberTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestNumberTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/_configuration.py index 9dab82ed033..9e6932db3e4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestNumberTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestNumberTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestNumberTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/operations/_number_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/operations/_number_operations.py index 24e7b5578ed..16e8f550b95 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/operations/_number_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/operations/_number_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -53,7 +53,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -85,7 +85,7 @@ async def get_null(self, **kwargs: Any) -> Optional[float]: :rtype: float or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -131,7 +131,7 @@ async def get_invalid_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -177,7 +177,7 @@ async def get_invalid_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -223,7 +223,7 @@ async def get_invalid_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -262,9 +262,7 @@ async def get_invalid_decimal(self, **kwargs: Any) -> float: return deserialized # type: ignore @distributed_trace_async - async def put_big_float( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_big_float(self, number_body: float, **kwargs: Any) -> None: """Put big float value 3.402823e+20. :param number_body: number body. Required. @@ -273,7 +271,7 @@ async def put_big_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -320,7 +318,7 @@ async def get_big_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -359,9 +357,7 @@ async def get_big_float(self, **kwargs: Any) -> float: return deserialized # type: ignore @distributed_trace_async - async def put_big_double( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_big_double(self, number_body: float, **kwargs: Any) -> None: """Put big double value 2.5976931e+101. :param number_body: number body. Required. @@ -370,7 +366,7 @@ async def put_big_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -417,7 +413,7 @@ async def get_big_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -456,16 +452,14 @@ async def get_big_double(self, **kwargs: Any) -> float: return deserialized # type: ignore @distributed_trace_async - async def put_big_double_positive_decimal( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def put_big_double_positive_decimal(self, **kwargs: Any) -> None: """Put big double value 99999999.99. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -513,7 +507,7 @@ async def get_big_double_positive_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -552,16 +546,14 @@ async def get_big_double_positive_decimal(self, **kwargs: Any) -> float: return deserialized # type: ignore @distributed_trace_async - async def put_big_double_negative_decimal( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def put_big_double_negative_decimal(self, **kwargs: Any) -> None: """Put big double value -99999999.99. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -609,7 +601,7 @@ async def get_big_double_negative_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -648,9 +640,7 @@ async def get_big_double_negative_decimal(self, **kwargs: Any) -> float: return deserialized # type: ignore @distributed_trace_async - async def put_big_decimal( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_big_decimal(self, number_body: float, **kwargs: Any) -> None: """Put big decimal value 2.5976931e+101. :param number_body: number body. Required. @@ -659,7 +649,7 @@ async def put_big_decimal( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -706,7 +696,7 @@ async def get_big_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -745,16 +735,14 @@ async def get_big_decimal(self, **kwargs: Any) -> float: return deserialized # type: ignore @distributed_trace_async - async def put_big_decimal_positive_decimal( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def put_big_decimal_positive_decimal(self, **kwargs: Any) -> None: """Put big decimal value 99999999.99. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -802,7 +790,7 @@ async def get_big_decimal_positive_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -841,16 +829,14 @@ async def get_big_decimal_positive_decimal(self, **kwargs: Any) -> float: return deserialized # type: ignore @distributed_trace_async - async def put_big_decimal_negative_decimal( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def put_big_decimal_negative_decimal(self, **kwargs: Any) -> None: """Put big decimal value -99999999.99. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -898,7 +884,7 @@ async def get_big_decimal_negative_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -937,9 +923,7 @@ async def get_big_decimal_negative_decimal(self, **kwargs: Any) -> float: return deserialized # type: ignore @distributed_trace_async - async def put_small_float( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_small_float(self, number_body: float, **kwargs: Any) -> None: """Put small float value 3.402823e-20. :param number_body: number body. Required. @@ -948,7 +932,7 @@ async def put_small_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,7 +979,7 @@ async def get_small_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1034,9 +1018,7 @@ async def get_small_float(self, **kwargs: Any) -> float: return deserialized # type: ignore @distributed_trace_async - async def put_small_double( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_small_double(self, number_body: float, **kwargs: Any) -> None: """Put small double value 2.5976931e-101. :param number_body: number body. Required. @@ -1045,7 +1027,7 @@ async def put_small_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1092,7 +1074,7 @@ async def get_small_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1131,9 +1113,7 @@ async def get_small_double(self, **kwargs: Any) -> float: return deserialized # type: ignore @distributed_trace_async - async def put_small_decimal( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_small_decimal(self, number_body: float, **kwargs: Any) -> None: """Put small decimal value 2.5976931e-101. :param number_body: number body. Required. @@ -1142,7 +1122,7 @@ async def put_small_decimal( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1189,7 +1169,7 @@ async def get_small_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/operations/_number_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/operations/_number_operations.py index e2d520e5175..256be8531c4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/operations/_number_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/operations/_number_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -433,7 +433,7 @@ def get_null(self, **kwargs: Any) -> Optional[float]: :rtype: float or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -479,7 +479,7 @@ def get_invalid_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -525,7 +525,7 @@ def get_invalid_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -571,7 +571,7 @@ def get_invalid_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -621,7 +621,7 @@ def put_big_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -668,7 +668,7 @@ def get_big_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +718,7 @@ def put_big_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -765,7 +765,7 @@ def get_big_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -811,7 +811,7 @@ def put_big_double_positive_decimal(self, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -859,7 +859,7 @@ def get_big_double_positive_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -905,7 +905,7 @@ def put_big_double_negative_decimal(self, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -953,7 +953,7 @@ def get_big_double_negative_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1003,7 +1003,7 @@ def put_big_decimal( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1050,7 +1050,7 @@ def get_big_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1096,7 +1096,7 @@ def put_big_decimal_positive_decimal(self, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1144,7 +1144,7 @@ def get_big_decimal_positive_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1190,7 +1190,7 @@ def put_big_decimal_negative_decimal(self, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1238,7 +1238,7 @@ def get_big_decimal_negative_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1288,7 +1288,7 @@ def put_small_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1335,7 +1335,7 @@ def get_small_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1385,7 +1385,7 @@ def put_small_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1432,7 +1432,7 @@ def get_small_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1482,7 +1482,7 @@ def put_small_decimal( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1529,7 +1529,7 @@ def get_small_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/_configuration.py index 2c6dff094a4..dc516a65c50 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestSwaggerBATServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestSwaggerBATServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestSwaggerBATService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/_configuration.py index 47a3fd0eef2..3be2d984cff 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestSwaggerBATServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestSwaggerBATServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestSwaggerBATService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_enum_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_enum_operations.py index f79c2371a3b..d0262ab0ee6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_enum_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_enum_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Literal, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +66,7 @@ async def get_not_expandable(self, **kwargs: Any) -> Union[str, _models.Colors]: :rtype: str or ~bodystring.models.Colors :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,9 +105,7 @@ async def get_not_expandable(self, **kwargs: Any) -> Union[str, _models.Colors]: return deserialized # type: ignore @distributed_trace_async - async def put_not_expandable( # pylint: disable=inconsistent-return-statements - self, string_body: Union[str, _models.Colors], **kwargs: Any - ) -> None: + async def put_not_expandable(self, string_body: Union[str, _models.Colors], **kwargs: Any) -> None: """Sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'. :param string_body: string body. Known values are: "red color", "green-color", and @@ -118,7 +115,7 @@ async def put_not_expandable( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +162,7 @@ async def get_referenced(self, **kwargs: Any) -> Union[str, _models.Colors]: :rtype: str or ~bodystring.models.Colors :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,9 +201,7 @@ async def get_referenced(self, **kwargs: Any) -> Union[str, _models.Colors]: return deserialized # type: ignore @distributed_trace_async - async def put_referenced( # pylint: disable=inconsistent-return-statements - self, enum_string_body: Union[str, _models.Colors], **kwargs: Any - ) -> None: + async def put_referenced(self, enum_string_body: Union[str, _models.Colors], **kwargs: Any) -> None: """Sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'. :param enum_string_body: enum string body. Known values are: "red color", "green-color", and @@ -216,7 +211,7 @@ async def put_referenced( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -263,7 +258,7 @@ async def get_referenced_constant(self, **kwargs: Any) -> _models.RefColorConsta :rtype: ~bodystring.models.RefColorConstant :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -302,9 +297,7 @@ async def get_referenced_constant(self, **kwargs: Any) -> _models.RefColorConsta return deserialized # type: ignore @distributed_trace_async - async def put_referenced_constant( # pylint: disable=inconsistent-return-statements - self, field1: Optional[str] = None, **kwargs: Any - ) -> None: + async def put_referenced_constant(self, field1: Optional[str] = None, **kwargs: Any) -> None: """Sends value 'green-color' from a constant. :param field1: Sample string. Default value is None. @@ -313,7 +306,7 @@ async def put_referenced_constant( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_string_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_string_operations.py index ed1dec743cc..a4c21a4ad10 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_string_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_string_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -74,7 +73,7 @@ async def get_null(self, **kwargs: Any) -> Optional[str]: :rtype: str or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -113,9 +112,7 @@ async def get_null(self, **kwargs: Any) -> Optional[str]: return deserialized # type: ignore @distributed_trace_async - async def put_null( # pylint: disable=inconsistent-return-statements - self, string_body: Optional[str] = None, **kwargs: Any - ) -> None: + async def put_null(self, string_body: Optional[str] = None, **kwargs: Any) -> None: """Set string value null. :param string_body: string body. Default value is None. @@ -124,7 +121,7 @@ async def put_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -174,7 +171,7 @@ async def get_empty(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -213,14 +210,14 @@ async def get_empty(self, **kwargs: Any) -> str: return deserialized # type: ignore @distributed_trace_async - async def put_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_empty(self, **kwargs: Any) -> None: """Set string value empty ''. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +265,7 @@ async def get_mbcs(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -307,14 +304,14 @@ async def get_mbcs(self, **kwargs: Any) -> str: return deserialized # type: ignore @distributed_trace_async - async def put_mbcs(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_mbcs(self, **kwargs: Any) -> None: """Set string value mbcs '啊齄丂狛狜隣郎隣兀﨩ˊ〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€'. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +366,7 @@ async def get_whitespace(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -408,7 +405,7 @@ async def get_whitespace(self, **kwargs: Any) -> str: return deserialized # type: ignore @distributed_trace_async - async def put_whitespace(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_whitespace(self, **kwargs: Any) -> None: """Set String value with leading and trailing whitespace ':code:``:code:``:code:``Now is the time for all good men to come to the aid of their country:code:``:code:``:code:``'. @@ -417,7 +414,7 @@ async def put_whitespace(self, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -467,7 +464,7 @@ async def get_not_provided(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -513,7 +510,7 @@ async def get_base64_encoded(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -559,7 +556,7 @@ async def get_base64_url_encoded(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -598,9 +595,7 @@ async def get_base64_url_encoded(self, **kwargs: Any) -> bytes: return deserialized # type: ignore @distributed_trace_async - async def put_base64_url_encoded( # pylint: disable=inconsistent-return-statements - self, string_body: bytes, **kwargs: Any - ) -> None: + async def put_base64_url_encoded(self, string_body: bytes, **kwargs: Any) -> None: """Put value that is base64url encoded. :param string_body: string body. Required. @@ -609,7 +604,7 @@ async def put_base64_url_encoded( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -656,7 +651,7 @@ async def get_null_base64_url_encoded(self, **kwargs: Any) -> Optional[bytes]: :rtype: bytes or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/models/_models_py3.py index 183ad4f7273..4a9643cf3a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_enum_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_enum_operations.py index a24b0a21fff..942d2da0877 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_enum_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_enum_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Literal, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -156,7 +155,7 @@ def get_not_expandable(self, **kwargs: Any) -> Union[str, _models.Colors]: :rtype: str or ~bodystring.models.Colors :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -207,7 +206,7 @@ def put_not_expandable( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -254,7 +253,7 @@ def get_referenced(self, **kwargs: Any) -> Union[str, _models.Colors]: :rtype: str or ~bodystring.models.Colors :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -305,7 +304,7 @@ def put_referenced( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,7 +351,7 @@ def get_referenced_constant(self, **kwargs: Any) -> _models.RefColorConstant: :rtype: ~bodystring.models.RefColorConstant :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -402,7 +401,7 @@ def put_referenced_constant( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py index a55727f5754..73f79551303 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -270,7 +269,7 @@ def get_null(self, **kwargs: Any) -> Optional[str]: :rtype: str or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -320,7 +319,7 @@ def put_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -370,7 +369,7 @@ def get_empty(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -416,7 +415,7 @@ def put_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -464,7 +463,7 @@ def get_mbcs(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -510,7 +509,7 @@ def put_mbcs(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -565,7 +564,7 @@ def get_whitespace(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -613,7 +612,7 @@ def put_whitespace(self, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -663,7 +662,7 @@ def get_not_provided(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -709,7 +708,7 @@ def get_base64_encoded(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -755,7 +754,7 @@ def get_base64_url_encoded(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -805,7 +804,7 @@ def put_base64_url_encoded( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,7 +851,7 @@ def get_null_base64_url_encoded(self, **kwargs: Any) -> Optional[bytes]: :rtype: bytes or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/_configuration.py index d2c1b19a1f8..2d0332c2bc5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestTimeTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/_configuration.py index 3c48c0776f1..5f76f91e64e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestTimeTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/operations/_time_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/operations/_time_operations.py index 25565d50dd0..68dd59272ca 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/operations/_time_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/operations/_time_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def get(self, **kwargs: Any) -> datetime.time: :rtype: ~datetime.time :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -109,7 +108,7 @@ async def put(self, time_body: datetime.time, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/operations/_time_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/operations/_time_operations.py index dfeee171416..070b5bd7f34 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/operations/_time_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/operations/_time_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -95,7 +94,7 @@ def get(self, **kwargs: Any) -> datetime.time: :rtype: ~datetime.time :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -143,7 +142,7 @@ def put(self, time_body: datetime.time, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_vendor.py index 3f1c320adb9..f74d78ebfa4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ClientWithEnumConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/_vendor.py index 031c576fdb5..121f3fa2125 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ClientWithEnumConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/operations/_client_with_enum_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/operations/_client_with_enum_operations.py index 39f3efb621d..f25d2ab3cee 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/operations/_client_with_enum_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/operations/_client_with_enum_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class ClientWithEnumOperationsMixin(ClientWithEnumMixinABC): @distributed_trace_async - async def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head(self, **kwargs: Any) -> None: """Send a head request to the service. Should have header ``x-ms-enum`` with value ``single``. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/operations/_client_with_enum_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/operations/_client_with_enum_operations.py index ffa115b2d4b..57609962957 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/operations/_client_with_enum_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/operations/_client_with_enum_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -59,7 +58,7 @@ def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/aio/operations/_contants_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/aio/operations/_contants_operations.py index f67931b1f52..918f6cef733 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/aio/operations/_contants_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/aio/operations/_contants_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Literal, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -46,7 +45,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -71,7 +70,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def put_no_model_as_string_no_required_two_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_no_required_two_value_no_default( # pylint: disable=name-too-long self, input: Optional[Union[str, _models.NoModelAsStringNoRequiredTwoValueNoDefaultOpEnum]] = None, **kwargs: Any @@ -86,7 +85,7 @@ async def put_no_model_as_string_no_required_two_value_no_default( # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -121,7 +120,7 @@ async def put_no_model_as_string_no_required_two_value_no_default( # pylint: di return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_no_required_two_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_no_required_two_value_default( # pylint: disable=name-too-long self, input: Union[str, _models.NoModelAsStringNoRequiredTwoValueDefaultOpEnum] = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -134,7 +133,7 @@ async def put_no_model_as_string_no_required_two_value_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -169,7 +168,7 @@ async def put_no_model_as_string_no_required_two_value_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_no_required_one_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_no_required_one_value_no_default( # pylint: disable=name-too-long self, input: Literal["value1"] = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -182,7 +181,7 @@ async def put_no_model_as_string_no_required_one_value_no_default( # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -217,7 +216,7 @@ async def put_no_model_as_string_no_required_one_value_no_default( # pylint: di return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_no_required_one_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_no_required_one_value_default( # pylint: disable=name-too-long self, input: Literal["value1"] = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -230,7 +229,7 @@ async def put_no_model_as_string_no_required_one_value_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -265,7 +264,7 @@ async def put_no_model_as_string_no_required_one_value_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_required_two_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_required_two_value_no_default( # pylint: disable=name-too-long self, input: Union[str, _models.NoModelAsStringRequiredTwoValueNoDefaultOpEnum], **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -278,7 +277,7 @@ async def put_no_model_as_string_required_two_value_no_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -313,7 +312,7 @@ async def put_no_model_as_string_required_two_value_no_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_required_two_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_required_two_value_default( # pylint: disable=name-too-long self, input: Union[str, _models.NoModelAsStringRequiredTwoValueDefaultOpEnum] = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -326,7 +325,7 @@ async def put_no_model_as_string_required_two_value_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -361,7 +360,7 @@ async def put_no_model_as_string_required_two_value_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_required_one_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_required_one_value_no_default( # pylint: disable=name-too-long self, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -372,7 +371,7 @@ async def put_no_model_as_string_required_one_value_no_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -408,7 +407,7 @@ async def put_no_model_as_string_required_one_value_no_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_required_one_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_required_one_value_default( # pylint: disable=name-too-long self, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -419,7 +418,7 @@ async def put_no_model_as_string_required_one_value_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -455,7 +454,7 @@ async def put_no_model_as_string_required_one_value_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_no_required_two_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_no_required_two_value_no_default( # pylint: disable=name-too-long self, input: Optional[Union[str, _models.ModelAsStringNoRequiredTwoValueNoDefaultOpEnum]] = None, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -468,7 +467,7 @@ async def put_model_as_string_no_required_two_value_no_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -503,7 +502,7 @@ async def put_model_as_string_no_required_two_value_no_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_no_required_two_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_no_required_two_value_default( # pylint: disable=name-too-long self, input: Union[str, _models.ModelAsStringNoRequiredTwoValueDefaultOpEnum] = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -516,7 +515,7 @@ async def put_model_as_string_no_required_two_value_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -551,7 +550,7 @@ async def put_model_as_string_no_required_two_value_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_no_required_one_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_no_required_one_value_no_default( # pylint: disable=name-too-long self, input: Optional[Union[str, _models.ModelAsStringNoRequiredOneValueNoDefaultOpEnum]] = None, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -564,7 +563,7 @@ async def put_model_as_string_no_required_one_value_no_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -599,7 +598,7 @@ async def put_model_as_string_no_required_one_value_no_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_no_required_one_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_no_required_one_value_default( # pylint: disable=name-too-long self, input: Union[str, _models.ModelAsStringNoRequiredOneValueDefaultOpEnum] = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -612,7 +611,7 @@ async def put_model_as_string_no_required_one_value_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -647,7 +646,7 @@ async def put_model_as_string_no_required_one_value_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_required_two_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_required_two_value_no_default( # pylint: disable=name-too-long self, input: Union[str, _models.ModelAsStringRequiredTwoValueNoDefaultOpEnum], **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -660,7 +659,7 @@ async def put_model_as_string_required_two_value_no_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -695,7 +694,7 @@ async def put_model_as_string_required_two_value_no_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_required_two_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_required_two_value_default( # pylint: disable=name-too-long self, input: Union[str, _models.ModelAsStringRequiredTwoValueDefaultOpEnum] = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -708,7 +707,7 @@ async def put_model_as_string_required_two_value_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -743,7 +742,7 @@ async def put_model_as_string_required_two_value_default( # pylint: disable=inc return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_required_one_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_required_one_value_no_default( # pylint: disable=name-too-long self, input: Union[str, _models.ModelAsStringRequiredOneValueNoDefaultOpEnum], **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -756,7 +755,7 @@ async def put_model_as_string_required_one_value_no_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -791,7 +790,7 @@ async def put_model_as_string_required_one_value_no_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_required_one_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_required_one_value_default( # pylint: disable=name-too-long self, input: Union[str, _models.ModelAsStringRequiredOneValueDefaultOpEnum] = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -804,7 +803,7 @@ async def put_model_as_string_required_one_value_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -839,7 +838,7 @@ async def put_model_as_string_required_one_value_default( # pylint: disable=inc return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_client_constants(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_client_constants(self, **kwargs: Any) -> None: """Pass constants from the client to this function. Will pass in constant path, query, and header parameters. @@ -847,7 +846,7 @@ async def put_client_constants(self, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/models/_models_py3.py index 57cac91270a..3f916138cc1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/operations/_contants_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/operations/_contants_operations.py index c5597215437..4bc217132cb 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/operations/_contants_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/constants/operations/_contants_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Literal, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -329,7 +329,7 @@ def put_no_model_as_string_no_required_two_value_no_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -377,7 +377,7 @@ def put_no_model_as_string_no_required_two_value_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -425,7 +425,7 @@ def put_no_model_as_string_no_required_one_value_no_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -473,7 +473,7 @@ def put_no_model_as_string_no_required_one_value_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -521,7 +521,7 @@ def put_no_model_as_string_required_two_value_no_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -569,7 +569,7 @@ def put_no_model_as_string_required_two_value_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -615,7 +615,7 @@ def put_no_model_as_string_required_one_value_no_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -662,7 +662,7 @@ def put_no_model_as_string_required_one_value_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -711,7 +711,7 @@ def put_model_as_string_no_required_two_value_no_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -759,7 +759,7 @@ def put_model_as_string_no_required_two_value_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -807,7 +807,7 @@ def put_model_as_string_no_required_one_value_no_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -855,7 +855,7 @@ def put_model_as_string_no_required_one_value_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -903,7 +903,7 @@ def put_model_as_string_required_two_value_no_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -951,7 +951,7 @@ def put_model_as_string_required_two_value_default( # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -999,7 +999,7 @@ def put_model_as_string_required_one_value_no_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1047,7 +1047,7 @@ def put_model_as_string_required_one_value_default( # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1090,7 +1090,7 @@ def put_client_constants(self, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py index f7fd81fc79b..225c4d6d4b9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,9 +51,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_empty( # pylint: disable=inconsistent-return-statements - self, account_name: str, **kwargs: Any - ) -> None: + async def get_empty(self, account_name: str, **kwargs: Any) -> None: """Get a 200 to test a valid base uri. :param account_name: Account Name. Required. @@ -63,7 +60,7 @@ async def get_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/models/_models_py3.py index dee497e2600..68d3f5cbdf3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py index 2749155efda..ac15c341ede 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -79,7 +78,7 @@ def get_empty(self, account_name: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/_auto_rest_parameterized_custom_host_test_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/_auto_rest_parameterized_custom_host_test_client.py index b3028737c79..9fb2b5b47e7 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/_auto_rest_parameterized_custom_host_test_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/_auto_rest_parameterized_custom_host_test_client.py @@ -20,7 +20,7 @@ from .operations import PathsOperations -class AutoRestParameterizedCustomHostTestClient: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestParameterizedCustomHostTestClient: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar paths: PathsOperations operations diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/_auto_rest_parameterized_custom_host_test_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/_auto_rest_parameterized_custom_host_test_client.py index 65093507dfb..e7c75bfb443 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/_auto_rest_parameterized_custom_host_test_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/_auto_rest_parameterized_custom_host_test_client.py @@ -20,7 +20,7 @@ from .operations import PathsOperations -class AutoRestParameterizedCustomHostTestClient: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestParameterizedCustomHostTestClient: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar paths: PathsOperations operations diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/operations/_paths_operations.py index 796dea2ac60..abc47819475 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/operations/_paths_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,9 +51,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_empty( # pylint: disable=inconsistent-return-statements - self, vault: str, secret: str, key_name: str, key_version: str = "v1", **kwargs: Any - ) -> None: + async def get_empty(self, vault: str, secret: str, key_name: str, key_version: str = "v1", **kwargs: Any) -> None: """Get a 200 to test a valid base uri. :param vault: The vault name, e.g. https://myvault. Required. @@ -69,7 +66,7 @@ async def get_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/operations/_paths_operations.py index 28406011d57..581d934916e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/operations/_paths_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ def get_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_configuration.py index f78c9d2bd5b..e2549560074 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ErrorWithSecretsConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ErrorWithSecretsConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ErrorWithSecrets. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_vendor.py index 57b8012132b..fb1aa891cce 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ErrorWithSecretsConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_configuration.py index f9fde6b7c89..c00f94fffdc 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ErrorWithSecretsConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ErrorWithSecretsConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ErrorWithSecrets. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_vendor.py index 004d69077c2..e000cbd9842 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ErrorWithSecretsConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/_error_with_secrets_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/_error_with_secrets_operations.py index f2ef8918208..08246458074 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/_error_with_secrets_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/_error_with_secrets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +45,7 @@ async def create_secret(self, **kwargs: Any) -> _models.SecretResponse: :rtype: ~errorwithsecrets.models.SecretResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -85,14 +84,14 @@ async def create_secret(self, **kwargs: Any) -> _models.SecretResponse: return deserialized # type: ignore @distributed_trace_async - async def get_error_with_secrets(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_error_with_secrets(self, **kwargs: Any) -> None: """Gets an error response containing secrets and PII. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/models/_models_py3.py index aa76931c44a..0721c41ba08 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/_error_with_secrets_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/_error_with_secrets_operations.py index ca776e43017..032e4ca32ec 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/_error_with_secrets_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/_error_with_secrets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -75,7 +74,7 @@ def create_secret(self, **kwargs: Any) -> _models.SecretResponse: :rtype: ~errorwithsecrets.models.SecretResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -121,7 +120,7 @@ def get_error_with_secrets(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/aio/operations/_pet_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/aio/operations/_pet_operations.py index c13ba2289b9..0b1e07ce9a6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/aio/operations/_pet_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/aio/operations/_pet_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,7 +62,7 @@ async def get_by_pet_id(self, pet_id: str, **kwargs: Any) -> _models.Pet: :rtype: ~extensibleenumsswagger.models.Pet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -143,7 +142,7 @@ async def add_pet(self, pet_param: Optional[Union[_models.Pet, IO[bytes]]] = Non :rtype: ~extensibleenumsswagger.models.Pet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/models/_models_py3.py index e14543fe7ad..34a5f6ea52b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/operations/_pet_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/operations/_pet_operations.py index 0cf76684f7a..07414c0e6c8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/operations/_pet_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/extensibleenumsswagger/operations/_pet_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -102,7 +101,7 @@ def get_by_pet_id(self, pet_id: str, **kwargs: Any) -> _models.Pet: :rtype: ~extensibleenumsswagger.models.Pet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ def add_pet(self, pet_param: Optional[Union[_models.Pet, IO[bytes]]] = None, **k :rtype: ~extensibleenumsswagger.models.Pet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/aio/operations/_header_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/aio/operations/_header_operations.py index 97528575376..2e71408df4c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/aio/operations/_header_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/aio/operations/_header_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -58,7 +58,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -83,9 +83,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def param_existing_key( # pylint: disable=inconsistent-return-statements - self, user_agent_parameter: str, **kwargs: Any - ) -> None: + async def param_existing_key(self, user_agent_parameter: str, **kwargs: Any) -> None: """Send a post request with header value "User-Agent": "overwrite". :param user_agent_parameter: Send a post request with header value "User-Agent": "overwrite". @@ -95,7 +93,7 @@ async def param_existing_key( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -131,14 +129,14 @@ async def param_existing_key( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_existing_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def response_existing_key(self, **kwargs: Any) -> None: """Get a response with header value "User-Agent": "overwrite". :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -176,14 +174,14 @@ async def response_existing_key(self, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_protected_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def param_protected_key(self, **kwargs: Any) -> None: """Send a post request with header value "Content-Type": "text/html". :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,14 +218,14 @@ async def param_protected_key(self, **kwargs: Any) -> None: # pylint: disable=i return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_protected_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def response_protected_key(self, **kwargs: Any) -> None: """Get a response with header value "Content-Type": "text/html". :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -265,9 +263,7 @@ async def response_protected_key(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_integer( # pylint: disable=inconsistent-return-statements - self, scenario: str, value: int, **kwargs: Any - ) -> None: + async def param_integer(self, scenario: str, value: int, **kwargs: Any) -> None: """Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2. @@ -280,7 +276,7 @@ async def param_integer( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -317,9 +313,7 @@ async def param_integer( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_integer( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_integer(self, scenario: str, **kwargs: Any) -> None: """Get a response with header value "value": 1 or -2. :param scenario: Send a post request with header values "scenario": "positive" or "negative". @@ -329,7 +323,7 @@ async def response_integer( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -368,9 +362,7 @@ async def response_integer( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_long( # pylint: disable=inconsistent-return-statements - self, scenario: str, value: int, **kwargs: Any - ) -> None: + async def param_long(self, scenario: str, value: int, **kwargs: Any) -> None: """Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2. @@ -383,7 +375,7 @@ async def param_long( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -420,9 +412,7 @@ async def param_long( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_long( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_long(self, scenario: str, **kwargs: Any) -> None: """Get a response with header value "value": 105 or -2. :param scenario: Send a post request with header values "scenario": "positive" or "negative". @@ -432,7 +422,7 @@ async def response_long( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -471,9 +461,7 @@ async def response_long( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_float( # pylint: disable=inconsistent-return-statements - self, scenario: str, value: float, **kwargs: Any - ) -> None: + async def param_float(self, scenario: str, value: float, **kwargs: Any) -> None: """Send a post request with header values "scenario": "positive", "value": 0.07 or "scenario": "negative", "value": -3.0. @@ -486,7 +474,7 @@ async def param_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -523,9 +511,7 @@ async def param_float( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_float( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_float(self, scenario: str, **kwargs: Any) -> None: """Get a response with header value "value": 0.07 or -3.0. :param scenario: Send a post request with header values "scenario": "positive" or "negative". @@ -535,7 +521,7 @@ async def response_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -574,9 +560,7 @@ async def response_float( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_double( # pylint: disable=inconsistent-return-statements - self, scenario: str, value: float, **kwargs: Any - ) -> None: + async def param_double(self, scenario: str, value: float, **kwargs: Any) -> None: """Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0. @@ -589,7 +573,7 @@ async def param_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -626,9 +610,7 @@ async def param_double( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_double( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_double(self, scenario: str, **kwargs: Any) -> None: """Get a response with header value "value": 7e120 or -3.0. :param scenario: Send a post request with header values "scenario": "positive" or "negative". @@ -638,7 +620,7 @@ async def response_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -677,9 +659,7 @@ async def response_double( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_bool( # pylint: disable=inconsistent-return-statements - self, scenario: str, value: bool, **kwargs: Any - ) -> None: + async def param_bool(self, scenario: str, value: bool, **kwargs: Any) -> None: """Send a post request with header values "scenario": "true", "value": true or "scenario": "false", "value": false. @@ -692,7 +672,7 @@ async def param_bool( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -729,9 +709,7 @@ async def param_bool( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_bool( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_bool(self, scenario: str, **kwargs: Any) -> None: """Get a response with header value "value": true or false. :param scenario: Send a post request with header values "scenario": "true" or "false". @@ -741,7 +719,7 @@ async def response_bool( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -780,9 +758,7 @@ async def response_bool( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_string( # pylint: disable=inconsistent-return-statements - self, scenario: str, value: Optional[str] = None, **kwargs: Any - ) -> None: + async def param_string(self, scenario: str, value: Optional[str] = None, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "The quick brown fox jumps over the lazy dog" or "scenario": "null", "value": null or "scenario": "empty", "value": "". @@ -796,7 +772,7 @@ async def param_string( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -833,9 +809,7 @@ async def param_string( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_string( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_string(self, scenario: str, **kwargs: Any) -> None: """Get a response with header values "The quick brown fox jumps over the lazy dog" or null or "". :param scenario: Send a post request with header values "scenario": "valid" or "null" or @@ -845,7 +819,7 @@ async def response_string( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -884,9 +858,7 @@ async def response_string( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_date( # pylint: disable=inconsistent-return-statements - self, scenario: str, value: datetime.date, **kwargs: Any - ) -> None: + async def param_date(self, scenario: str, value: datetime.date, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "2010-01-01" or "scenario": "min", "value": "0001-01-01". @@ -898,7 +870,7 @@ async def param_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -935,9 +907,7 @@ async def param_date( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_date( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_date(self, scenario: str, **kwargs: Any) -> None: """Get a response with header values "2010-01-01" or "0001-01-01". :param scenario: Send a post request with header values "scenario": "valid" or "min". Required. @@ -946,7 +916,7 @@ async def response_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -985,9 +955,7 @@ async def response_date( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_datetime( # pylint: disable=inconsistent-return-statements - self, scenario: str, value: datetime.datetime, **kwargs: Any - ) -> None: + async def param_datetime(self, scenario: str, value: datetime.datetime, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": "0001-01-01T00:00:00Z". @@ -1000,7 +968,7 @@ async def param_datetime( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1037,9 +1005,7 @@ async def param_datetime( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_datetime( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_datetime(self, scenario: str, **kwargs: Any) -> None: """Get a response with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z". :param scenario: Send a post request with header values "scenario": "valid" or "min". Required. @@ -1048,7 +1014,7 @@ async def response_datetime( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1087,7 +1053,7 @@ async def response_datetime( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_datetime_rfc1123( # pylint: disable=inconsistent-return-statements + async def param_datetime_rfc1123( self, scenario: str, value: Optional[datetime.datetime] = None, **kwargs: Any ) -> None: """Send a post request with header values "scenario": "valid", "value": "Wed, 01 Jan 2010 12:34:56 @@ -1102,7 +1068,7 @@ async def param_datetime_rfc1123( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1139,9 +1105,7 @@ async def param_datetime_rfc1123( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_datetime_rfc1123( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_datetime_rfc1123(self, scenario: str, **kwargs: Any) -> None: """Get a response with header values "Wed, 01 Jan 2010 12:34:56 GMT" or "Mon, 01 Jan 0001 00:00:00 GMT". @@ -1151,7 +1115,7 @@ async def response_datetime_rfc1123( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1190,9 +1154,7 @@ async def response_datetime_rfc1123( # pylint: disable=inconsistent-return-stat return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_duration( # pylint: disable=inconsistent-return-statements - self, scenario: str, value: datetime.timedelta, **kwargs: Any - ) -> None: + async def param_duration(self, scenario: str, value: datetime.timedelta, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "P123DT22H14M12.011S". :param scenario: Send a post request with header values "scenario": "valid". Required. @@ -1203,7 +1165,7 @@ async def param_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1240,9 +1202,7 @@ async def param_duration( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_duration( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_duration(self, scenario: str, **kwargs: Any) -> None: """Get a response with header values "P123DT22H14M12.011S". :param scenario: Send a post request with header values "scenario": "valid". Required. @@ -1251,7 +1211,7 @@ async def response_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1290,9 +1250,7 @@ async def response_duration( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_byte( # pylint: disable=inconsistent-return-statements - self, scenario: str, value: bytes, **kwargs: Any - ) -> None: + async def param_byte(self, scenario: str, value: bytes, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "啊齄丂狛狜隣郎隣兀﨩". :param scenario: Send a post request with header values "scenario": "valid". Required. @@ -1303,7 +1261,7 @@ async def param_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1340,9 +1298,7 @@ async def param_byte( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_byte( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_byte(self, scenario: str, **kwargs: Any) -> None: """Get a response with header values "啊齄丂狛狜隣郎隣兀﨩". :param scenario: Send a post request with header values "scenario": "valid". Required. @@ -1351,7 +1307,7 @@ async def response_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1390,7 +1346,7 @@ async def response_byte( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_enum( # pylint: disable=inconsistent-return-statements + async def param_enum( self, scenario: str, value: Optional[Union[str, _models.GreyscaleColors]] = None, **kwargs: Any ) -> None: """Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": @@ -1406,7 +1362,7 @@ async def param_enum( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1443,9 +1399,7 @@ async def param_enum( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_enum( # pylint: disable=inconsistent-return-statements - self, scenario: str, **kwargs: Any - ) -> None: + async def response_enum(self, scenario: str, **kwargs: Any) -> None: """Get a response with header values "GREY" or null. :param scenario: Send a post request with header values "scenario": "valid" or "null" or @@ -1455,7 +1409,7 @@ async def response_enum( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1494,7 +1448,7 @@ async def response_enum( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def custom_request_id(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def custom_request_id(self, **kwargs: Any) -> None: """Send x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request. @@ -1502,7 +1456,7 @@ async def custom_request_id(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/operations/_header_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/operations/_header_operations.py index dc86a046bd1..eab3c080aa8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/operations/_header_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/operations/_header_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -521,7 +521,7 @@ def param_existing_key( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -564,7 +564,7 @@ def response_existing_key(self, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -609,7 +609,7 @@ def param_protected_key(self, **kwargs: Any) -> None: # pylint: disable=inconsi :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -653,7 +653,7 @@ def response_protected_key(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -706,7 +706,7 @@ def param_integer( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -753,7 +753,7 @@ def response_integer(self, scenario: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -807,7 +807,7 @@ def param_long( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,7 +854,7 @@ def response_long(self, scenario: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -908,7 +908,7 @@ def param_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -955,7 +955,7 @@ def response_float(self, scenario: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1009,7 +1009,7 @@ def param_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1056,7 +1056,7 @@ def response_double(self, scenario: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1110,7 +1110,7 @@ def param_bool( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1157,7 +1157,7 @@ def response_bool(self, scenario: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1212,7 +1212,7 @@ def param_string( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1259,7 +1259,7 @@ def response_string(self, scenario: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1312,7 +1312,7 @@ def param_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1358,7 +1358,7 @@ def response_date(self, scenario: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1412,7 +1412,7 @@ def param_datetime( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1458,7 +1458,7 @@ def response_datetime(self, scenario: str, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1512,7 +1512,7 @@ def param_datetime_rfc1123( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1561,7 +1561,7 @@ def response_datetime_rfc1123( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1613,7 +1613,7 @@ def param_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1659,7 @@ def response_duration(self, scenario: str, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1711,7 +1711,7 @@ def param_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1757,7 +1757,7 @@ def response_byte(self, scenario: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1812,7 +1812,7 @@ def param_enum( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1859,7 +1859,7 @@ def response_enum(self, scenario: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1906,7 +1906,7 @@ def custom_request_id(self, **kwargs: Any) -> None: # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_client_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_client_failure_operations.py index cc800d87e61..bfb30fee8d1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_client_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_client_failure_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -55,7 +55,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -80,14 +80,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head400(self, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -122,14 +122,14 @@ async def head400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get400(self, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -164,14 +164,14 @@ async def get400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def options400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def options400(self, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -206,9 +206,7 @@ async def options400(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put400( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put400(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -218,7 +216,7 @@ async def put400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -261,9 +259,7 @@ async def put400( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch400( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def patch400(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -273,7 +269,7 @@ async def patch400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -316,9 +312,7 @@ async def patch400( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post400( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post400(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -328,7 +322,7 @@ async def post400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -371,9 +365,7 @@ async def post400( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete400( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def delete400(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -383,7 +375,7 @@ async def delete400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -426,14 +418,14 @@ async def delete400( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head401(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head401(self, **kwargs: Any) -> None: """Return 401 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,14 +460,14 @@ async def head401(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get402(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get402(self, **kwargs: Any) -> None: """Return 402 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -510,14 +502,14 @@ async def get402(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def options403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def options403(self, **kwargs: Any) -> None: """Return 403 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -552,14 +544,14 @@ async def options403(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get403(self, **kwargs: Any) -> None: """Return 403 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -594,9 +586,7 @@ async def get403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put404( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put404(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 404 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -606,7 +596,7 @@ async def put404( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -649,9 +639,7 @@ async def put404( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch405( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def patch405(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 405 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -661,7 +649,7 @@ async def patch405( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -704,9 +692,7 @@ async def patch405( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post406( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post406(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 406 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -716,7 +702,7 @@ async def post406( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -759,9 +745,7 @@ async def post406( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete407( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def delete407(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 407 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -771,7 +755,7 @@ async def delete407( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -814,9 +798,7 @@ async def delete407( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put409( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put409(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 409 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -826,7 +808,7 @@ async def put409( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -869,14 +851,14 @@ async def put409( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head410(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head410(self, **kwargs: Any) -> None: """Return 410 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -911,14 +893,14 @@ async def head410(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get411(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get411(self, **kwargs: Any) -> None: """Return 411 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -953,14 +935,14 @@ async def get411(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def options412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def options412(self, **kwargs: Any) -> None: """Return 412 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,14 +977,14 @@ async def options412(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get412(self, **kwargs: Any) -> None: """Return 412 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1037,9 +1019,7 @@ async def get412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put413( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put413(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 413 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -1049,7 +1029,7 @@ async def put413( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1092,9 +1072,7 @@ async def put413( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch414( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def patch414(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 414 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -1104,7 +1082,7 @@ async def patch414( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1147,9 +1125,7 @@ async def patch414( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post415( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post415(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 415 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -1159,7 +1135,7 @@ async def post415( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1202,14 +1178,14 @@ async def post415( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get416(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get416(self, **kwargs: Any) -> None: """Return 416 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1244,9 +1220,7 @@ async def get416(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete417( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def delete417(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 417 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -1256,7 +1230,7 @@ async def delete417( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1299,14 +1273,14 @@ async def delete417( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head429(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head429(self, **kwargs: Any) -> None: """Return 429 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py index aaddccc6062..53517851b1c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,7 +62,7 @@ async def get_empty_error(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -109,7 +108,7 @@ async def get_no_model_error(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -154,7 +153,7 @@ async def get_no_model_empty(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_redirects_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_redirects_operations.py index e687e98e7e7..58464b75d7d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_redirects_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_redirects_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -45,7 +44,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -70,14 +69,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head300(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head300(self, **kwargs: Any) -> None: """Return 300 status code and redirect to /http/success/200. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ async def get300(self, **kwargs: Any) -> Optional[List[str]]: :rtype: list[str] or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -167,14 +166,14 @@ async def get300(self, **kwargs: Any) -> Optional[List[str]]: return deserialized # type: ignore @distributed_trace_async - async def head301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head301(self, **kwargs: Any) -> None: """Return 301 status code and redirect to /http/success/200. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -213,14 +212,14 @@ async def head301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def get301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get301(self, **kwargs: Any) -> None: """Return 301 status code and redirect to /http/success/200. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -259,9 +258,7 @@ async def get301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def put301( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put301(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Put true Boolean value in request returns 301. This request should not be automatically redirected, but should return the received 301 to the caller for evaluation. @@ -272,7 +269,7 @@ async def put301( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -318,14 +315,14 @@ async def put301( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def head302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head302(self, **kwargs: Any) -> None: """Return 302 status code and redirect to /http/success/200. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -364,14 +361,14 @@ async def head302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def get302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get302(self, **kwargs: Any) -> None: """Return 302 status code and redirect to /http/success/200. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -410,9 +407,7 @@ async def get302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def patch302( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def patch302(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Patch true Boolean value in request returns 302. This request should not be automatically redirected, but should return the received 302 to the caller for evaluation. @@ -423,7 +418,7 @@ async def patch302( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -469,9 +464,7 @@ async def patch302( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def post303( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post303(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Post true Boolean value in request returns 303. This request should be automatically redirected usign a get, ultimately returning a 200 status code. @@ -482,7 +475,7 @@ async def post303( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -529,14 +522,14 @@ async def post303( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def head307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head307(self, **kwargs: Any) -> None: """Redirect with 307, resulting in a 200 success. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -575,14 +568,14 @@ async def head307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def get307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get307(self, **kwargs: Any) -> None: """Redirect get with 307, resulting in a 200 success. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -621,14 +614,14 @@ async def get307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def options307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def options307(self, **kwargs: Any) -> None: """options redirected with 307, resulting in a 200 after redirect. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -667,9 +660,7 @@ async def options307(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def put307( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put307(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Put redirected with 307, resulting in a 200 after redirect. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -679,7 +670,7 @@ async def put307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -726,9 +717,7 @@ async def put307( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def patch307( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def patch307(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Patch redirected with 307, resulting in a 200 after redirect. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -738,7 +727,7 @@ async def patch307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,9 +774,7 @@ async def patch307( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def post307( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post307(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Post redirected with 307, resulting in a 200 after redirect. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -797,7 +784,7 @@ async def post307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -844,9 +831,7 @@ async def post307( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def delete307( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def delete307(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Delete redirected with 307, resulting in a 200 after redirect. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -856,7 +841,7 @@ async def delete307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_retry_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_retry_operations.py index b5035f848de..39c3d9e1506 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_retry_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_retry_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,14 +62,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head408(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head408(self, **kwargs: Any) -> None: """Return 408 status code, then 200 after retry. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -105,9 +104,7 @@ async def head408(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put500( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put500(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 500 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -117,7 +114,7 @@ async def put500( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,9 +157,7 @@ async def put500( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch500( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def patch500(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 500 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -172,7 +167,7 @@ async def patch500( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -215,14 +210,14 @@ async def patch500( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get502(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get502(self, **kwargs: Any) -> None: """Return 502 status code, then 200 after retry. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -264,7 +259,7 @@ async def options502(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,9 +298,7 @@ async def options502(self, **kwargs: Any) -> bool: return deserialized # type: ignore @distributed_trace_async - async def post503( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post503(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 503 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -315,7 +308,7 @@ async def post503( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -358,9 +351,7 @@ async def post503( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete503( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def delete503(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 503 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -370,7 +361,7 @@ async def delete503( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -413,9 +404,7 @@ async def delete503( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put504( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put504(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 504 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -425,7 +414,7 @@ async def put504( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,9 +457,7 @@ async def put504( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch504( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def patch504(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 504 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -480,7 +467,7 @@ async def patch504( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_server_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_server_failure_operations.py index d86af033b57..28f256c36af 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_server_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_server_failure_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,14 +57,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head501(self, **kwargs: Any) -> None: """Return 501 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -100,14 +99,14 @@ async def head501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get501(self, **kwargs: Any) -> None: """Return 501 status code - should be represented in the client as an error. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -142,9 +141,7 @@ async def get501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post505( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post505(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 505 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -154,7 +151,7 @@ async def post505( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -197,9 +194,7 @@ async def post505( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete505( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def delete505(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Return 505 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -209,7 +204,7 @@ async def delete505( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_success_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_success_operations.py index f213efec1e8..08074696784 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_success_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_success_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -48,7 +48,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -73,14 +73,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head200(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head200(self, **kwargs: Any) -> None: """Return 200 status code if successful. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -122,7 +122,7 @@ async def get200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -168,7 +168,7 @@ async def options200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -207,9 +207,7 @@ async def options200(self, **kwargs: Any) -> bool: return deserialized # type: ignore @distributed_trace_async - async def put200( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put200(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Put boolean value true returning 200 success. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -219,7 +217,7 @@ async def put200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -262,9 +260,7 @@ async def put200( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch200( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def patch200(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Patch true Boolean value in request returning 200. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -274,7 +270,7 @@ async def patch200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -317,9 +313,7 @@ async def patch200( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post200( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post200(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Post bollean value true in request that returns a 200. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -329,7 +323,7 @@ async def post200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -372,9 +366,7 @@ async def post200( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete200( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def delete200(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Delete simple boolean value true returns 200. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -384,7 +376,7 @@ async def delete200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -427,9 +419,7 @@ async def delete200( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put201( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put201(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Put true Boolean value in request returns 201. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -439,7 +429,7 @@ async def put201( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,9 +472,7 @@ async def put201( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post201( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post201(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Post true Boolean value in request returns 201 (Created). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -494,7 +482,7 @@ async def post201( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -537,9 +525,7 @@ async def post201( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put202( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put202(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Put true Boolean value in request returns 202 (Accepted). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -549,7 +535,7 @@ async def put202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -592,9 +578,7 @@ async def put202( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch202( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def patch202(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Patch true Boolean value in request returns 202. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -604,7 +588,7 @@ async def patch202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -647,9 +631,7 @@ async def patch202( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post202( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post202(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Post true Boolean value in request returns 202 (Accepted). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -659,7 +641,7 @@ async def post202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -702,9 +684,7 @@ async def post202( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete202( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def delete202(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Delete true Boolean value in request returns 202 (accepted). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -714,7 +694,7 @@ async def delete202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -757,14 +737,14 @@ async def delete202( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head204(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head204(self, **kwargs: Any) -> None: """Return 204 status code if successful. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -799,9 +779,7 @@ async def head204(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put204( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def put204(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Put true Boolean value in request returns 204 (no content). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -811,7 +789,7 @@ async def put204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,9 +832,7 @@ async def put204( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch204( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def patch204(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Patch true Boolean value in request returns 204 (no content). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -866,7 +842,7 @@ async def patch204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -909,9 +885,7 @@ async def patch204( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post204( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def post204(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Post true Boolean value in request returns 204 (no content). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -921,7 +895,7 @@ async def post204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -964,9 +938,7 @@ async def post204( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete204( # pylint: disable=inconsistent-return-statements - self, boolean_value: Literal[True] = True, **kwargs: Any - ) -> None: + async def delete204(self, boolean_value: Literal[True] = True, **kwargs: Any) -> None: """Delete true Boolean value in request returns 204 (no content). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -976,7 +948,7 @@ async def delete204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1019,14 +991,14 @@ async def delete204( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head404(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head404(self, **kwargs: Any) -> None: """Return 404 status code. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_multiple_responses_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_multiple_responses_operations.py index bbc4688e730..30532b5be64 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_multiple_responses_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_multiple_responses_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -62,7 +62,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -96,7 +96,7 @@ async def get200_model204_no_model_default_error200_valid( # pylint: disable=na :rtype: ~httpinfrastructure.models.MyException or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -146,7 +146,7 @@ async def get200_model204_no_model_default_error204_valid( # pylint: disable=na :rtype: ~httpinfrastructure.models.MyException or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -196,7 +196,7 @@ async def get200_model204_no_model_default_error201_invalid( # pylint: disable= :rtype: ~httpinfrastructure.models.MyException or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -246,7 +246,7 @@ async def get200_model204_no_model_default_error202_none( # pylint: disable=nam :rtype: ~httpinfrastructure.models.MyException or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -296,7 +296,7 @@ async def get200_model204_no_model_default_error400_valid( # pylint: disable=na :rtype: ~httpinfrastructure.models.MyException or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -346,7 +346,7 @@ async def get200_model201_model_default_error200_valid( # pylint: disable=name- :rtype: ~httpinfrastructure.models.MyException or ~httpinfrastructure.models.B :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -398,7 +398,7 @@ async def get200_model201_model_default_error201_valid( # pylint: disable=name- :rtype: ~httpinfrastructure.models.MyException or ~httpinfrastructure.models.B :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -450,7 +450,7 @@ async def get200_model201_model_default_error400_valid( # pylint: disable=name- :rtype: ~httpinfrastructure.models.MyException or ~httpinfrastructure.models.B :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -503,7 +503,7 @@ async def get200_model_a201_model_c404_model_d_default_error200_valid( # pylint ~httpinfrastructure.models.D :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -559,7 +559,7 @@ async def get200_model_a201_model_c404_model_d_default_error201_valid( # pylint ~httpinfrastructure.models.D :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -615,7 +615,7 @@ async def get200_model_a201_model_c404_model_d_default_error404_valid( # pylint ~httpinfrastructure.models.D :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -671,7 +671,7 @@ async def get200_model_a201_model_c404_model_d_default_error400_valid( # pylint ~httpinfrastructure.models.D :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -717,16 +717,14 @@ async def get200_model_a201_model_c404_model_d_default_error400_valid( # pylint return deserialized # type: ignore @distributed_trace_async - async def get202_none204_none_default_error202_none( # pylint: disable=inconsistent-return-statements,name-too-long - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_error202_none(self, **kwargs: Any) -> None: # pylint: disable=name-too-long """Send a 202 response with no payload. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -761,16 +759,14 @@ async def get202_none204_none_default_error202_none( # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_error204_none( # pylint: disable=inconsistent-return-statements,name-too-long - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_error204_none(self, **kwargs: Any) -> None: # pylint: disable=name-too-long """Send a 204 response with no payload. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -805,16 +801,14 @@ async def get202_none204_none_default_error204_none( # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_error400_valid( # pylint: disable=inconsistent-return-statements,name-too-long - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_error400_valid(self, **kwargs: Any) -> None: # pylint: disable=name-too-long """Send a 400 response with valid payload: {'code': '400', 'message': 'client error'}. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -849,16 +843,14 @@ async def get202_none204_none_default_error400_valid( # pylint: disable=inconsi return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_none202_invalid( # pylint: disable=inconsistent-return-statements,name-too-long - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_none202_invalid(self, **kwargs: Any) -> None: # pylint: disable=name-too-long """Send a 202 response with an unexpected payload {'property': 'value'}. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -892,16 +884,14 @@ async def get202_none204_none_default_none202_invalid( # pylint: disable=incons return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_none204_none( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_none204_none(self, **kwargs: Any) -> None: """Send a 204 response with no payload. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -935,16 +925,14 @@ async def get202_none204_none_default_none204_none( # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_none400_none( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_none400_none(self, **kwargs: Any) -> None: """Send a 400 response with no payload. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -978,16 +966,14 @@ async def get202_none204_none_default_none400_none( # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_none400_invalid( # pylint: disable=inconsistent-return-statements,name-too-long - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_none400_invalid(self, **kwargs: Any) -> None: # pylint: disable=name-too-long """Send a 400 response with an unexpected payload {'property': 'value'}. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1028,7 +1014,7 @@ async def get_default_model_a200_valid(self, **kwargs: Any) -> _models.MyExcepti :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1073,7 +1059,7 @@ async def get_default_model_a200_none(self, **kwargs: Any) -> _models.MyExceptio :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1111,16 +1097,14 @@ async def get_default_model_a200_none(self, **kwargs: Any) -> _models.MyExceptio return deserialized # type: ignore @distributed_trace_async - async def get_default_model_a400_valid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_default_model_a400_valid(self, **kwargs: Any) -> None: """Send a 400 response with valid payload: {'statusCode': '400'}. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1155,16 +1139,14 @@ async def get_default_model_a400_valid( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_default_model_a400_none( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_default_model_a400_none(self, **kwargs: Any) -> None: """Send a 400 response with no payload. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1199,16 +1181,14 @@ async def get_default_model_a400_none( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_default_none200_invalid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_default_none200_invalid(self, **kwargs: Any) -> None: """Send a 200 response with invalid payload: {'statusCode': '200'}. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1242,14 +1222,14 @@ async def get_default_none200_invalid( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_default_none200_none(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_default_none200_none(self, **kwargs: Any) -> None: """Send a 200 response with no payload. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1283,16 +1263,14 @@ async def get_default_none200_none(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_default_none400_invalid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_default_none400_invalid(self, **kwargs: Any) -> None: """Send a 400 response with valid payload: {'statusCode': '400'}. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1326,14 +1304,14 @@ async def get_default_none400_invalid( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_default_none400_none(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_default_none400_none(self, **kwargs: Any) -> None: """Send a 400 response with no payload. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1375,7 +1353,7 @@ async def get200_model_a200_none(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1420,7 +1398,7 @@ async def get200_model_a200_valid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1465,7 +1443,7 @@ async def get200_model_a200_invalid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1510,7 +1488,7 @@ async def get200_model_a400_none(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1555,7 +1533,7 @@ async def get200_model_a400_valid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1600,7 +1578,7 @@ async def get200_model_a400_invalid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1645,7 +1623,7 @@ async def get200_model_a202_valid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/models/_models_py3.py index 2e6cb173982..76c457e360d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_client_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_client_failure_operations.py index 735cef32228..c8d91ebfc54 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_client_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_client_failure_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -466,7 +466,7 @@ def head400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -508,7 +508,7 @@ def get400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -550,7 +550,7 @@ def options400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -597,7 +597,7 @@ def put400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -652,7 +652,7 @@ def patch400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +707,7 @@ def post400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -762,7 +762,7 @@ def delete400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -812,7 +812,7 @@ def head401(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,7 +854,7 @@ def get402(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -896,7 +896,7 @@ def options403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -938,7 +938,7 @@ def get403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -985,7 +985,7 @@ def put404( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1040,7 +1040,7 @@ def patch405( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1095,7 +1095,7 @@ def post406( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1150,7 +1150,7 @@ def delete407( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1205,7 +1205,7 @@ def put409( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1255,7 +1255,7 @@ def head410(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1297,7 +1297,7 @@ def get411(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1339,7 +1339,7 @@ def options412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1381,7 +1381,7 @@ def get412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1428,7 +1428,7 @@ def put413( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1483,7 +1483,7 @@ def patch414( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1538,7 +1538,7 @@ def post415( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1588,7 +1588,7 @@ def get416(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1635,7 +1635,7 @@ def delete417( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1685,7 +1685,7 @@ def head429(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_failure_operations.py index 2d18324fd2e..e15e85d1f4f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_failure_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -105,7 +104,7 @@ def get_empty_error(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -151,7 +150,7 @@ def get_no_model_error(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -196,7 +195,7 @@ def get_no_model_empty(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_redirects_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_redirects_operations.py index 0e2636e1e6e..20ae5e3c656 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_redirects_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_redirects_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -308,7 +308,7 @@ def head300(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -354,7 +354,7 @@ def get300(self, **kwargs: Any) -> Optional[List[str]]: :rtype: list[str] or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -405,7 +405,7 @@ def head301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -451,7 +451,7 @@ def get301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -503,7 +503,7 @@ def put301( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -556,7 +556,7 @@ def head302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -602,7 +602,7 @@ def get302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -654,7 +654,7 @@ def patch302( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -713,7 +713,7 @@ def post303( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,7 +767,7 @@ def head307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -813,7 +813,7 @@ def get307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -859,7 +859,7 @@ def options307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -910,7 +910,7 @@ def put307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -969,7 +969,7 @@ def patch307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1028,7 +1028,7 @@ def post307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1087,7 +1087,7 @@ def delete307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_retry_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_retry_operations.py index cd7da311e88..b0ddf9ad22f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_retry_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_retry_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -207,7 +206,7 @@ def head408(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -254,7 +253,7 @@ def put500( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,7 +308,7 @@ def patch500( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -359,7 +358,7 @@ def get502(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -401,7 +400,7 @@ def options502(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -452,7 +451,7 @@ def post503( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -507,7 +506,7 @@ def delete503( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -562,7 +561,7 @@ def put504( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -617,7 +616,7 @@ def patch504( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_server_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_server_failure_operations.py index b151315a645..cc669bdecbb 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_server_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_server_failure_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -125,7 +124,7 @@ def head501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -167,7 +166,7 @@ def get501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -214,7 +213,7 @@ def post505( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -269,7 +268,7 @@ def delete505( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_success_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_success_operations.py index 411a7cb4334..c058c289b39 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_success_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_success_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -371,7 +371,7 @@ def head200(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -413,7 +413,7 @@ def get200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -459,7 +459,7 @@ def options200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -510,7 +510,7 @@ def put200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -565,7 +565,7 @@ def patch200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -620,7 +620,7 @@ def post200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -675,7 +675,7 @@ def delete200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -730,7 +730,7 @@ def put201( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ def post201( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -840,7 +840,7 @@ def put202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -895,7 +895,7 @@ def patch202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -950,7 +950,7 @@ def post202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1005,7 +1005,7 @@ def delete202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1055,7 +1055,7 @@ def head204(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1102,7 +1102,7 @@ def put204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1157,7 +1157,7 @@ def patch204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1212,7 +1212,7 @@ def post204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1267,7 +1267,7 @@ def delete204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1317,7 +1317,7 @@ def head404(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py index 08bdb795a98..4fabc47c762 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -523,7 +523,7 @@ def get200_model204_no_model_default_error200_valid( # pylint: disable=name-too :rtype: ~httpinfrastructure.models.MyException or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -573,7 +573,7 @@ def get200_model204_no_model_default_error204_valid( # pylint: disable=name-too :rtype: ~httpinfrastructure.models.MyException or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -623,7 +623,7 @@ def get200_model204_no_model_default_error201_invalid( # pylint: disable=name-t :rtype: ~httpinfrastructure.models.MyException or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -673,7 +673,7 @@ def get200_model204_no_model_default_error202_none( # pylint: disable=name-too- :rtype: ~httpinfrastructure.models.MyException or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -723,7 +723,7 @@ def get200_model204_no_model_default_error400_valid( # pylint: disable=name-too :rtype: ~httpinfrastructure.models.MyException or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -773,7 +773,7 @@ def get200_model201_model_default_error200_valid( # pylint: disable=name-too-lo :rtype: ~httpinfrastructure.models.MyException or ~httpinfrastructure.models.B :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -825,7 +825,7 @@ def get200_model201_model_default_error201_valid( # pylint: disable=name-too-lo :rtype: ~httpinfrastructure.models.MyException or ~httpinfrastructure.models.B :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -877,7 +877,7 @@ def get200_model201_model_default_error400_valid( # pylint: disable=name-too-lo :rtype: ~httpinfrastructure.models.MyException or ~httpinfrastructure.models.B :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -930,7 +930,7 @@ def get200_model_a201_model_c404_model_d_default_error200_valid( # pylint: disa ~httpinfrastructure.models.D :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -986,7 +986,7 @@ def get200_model_a201_model_c404_model_d_default_error201_valid( # pylint: disa ~httpinfrastructure.models.D :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1042,7 +1042,7 @@ def get200_model_a201_model_c404_model_d_default_error404_valid( # pylint: disa ~httpinfrastructure.models.D :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1098,7 +1098,7 @@ def get200_model_a201_model_c404_model_d_default_error400_valid( # pylint: disa ~httpinfrastructure.models.D :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1153,7 +1153,7 @@ def get202_none204_none_default_error202_none( # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1197,7 +1197,7 @@ def get202_none204_none_default_error204_none( # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1241,7 +1241,7 @@ def get202_none204_none_default_error400_valid( # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1285,7 +1285,7 @@ def get202_none204_none_default_none202_invalid( # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1328,7 +1328,7 @@ def get202_none204_none_default_none204_none( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1371,7 +1371,7 @@ def get202_none204_none_default_none400_none( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1414,7 +1414,7 @@ def get202_none204_none_default_none400_invalid( # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1455,7 +1455,7 @@ def get_default_model_a200_valid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1500,7 +1500,7 @@ def get_default_model_a200_none(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1545,7 +1545,7 @@ def get_default_model_a400_valid(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1587,7 +1587,7 @@ def get_default_model_a400_none(self, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1629,7 +1629,7 @@ def get_default_none200_invalid(self, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1670,7 +1670,7 @@ def get_default_none200_none(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1711,7 +1711,7 @@ def get_default_none400_invalid(self, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1752,7 +1752,7 @@ def get_default_none400_none(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1794,7 +1794,7 @@ def get200_model_a200_none(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1839,7 +1839,7 @@ def get200_model_a200_valid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1884,7 +1884,7 @@ def get200_model_a200_invalid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1929,7 +1929,7 @@ def get200_model_a400_none(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1974,7 +1974,7 @@ def get200_model_a400_valid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2019,7 +2019,7 @@ def get200_model_a400_invalid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2064,7 +2064,7 @@ def get200_model_a202_valid(self, **kwargs: Any) -> _models.MyException: :rtype: ~httpinfrastructure.models.MyException :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_configuration.py index bf9531790ff..1a420f42331 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class IncorrectReturnedErrorModelConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class IncorrectReturnedErrorModelConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for IncorrectReturnedErrorModel. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_vendor.py index f44286f6df3..dc5c02fbead 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import IncorrectReturnedErrorModelConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_configuration.py index 6b8246a13f6..c0dd6fd9271 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class IncorrectReturnedErrorModelConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class IncorrectReturnedErrorModelConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for IncorrectReturnedErrorModel. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_vendor.py index 890e7156ceb..5f03a29a82f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import IncorrectReturnedErrorModelConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/operations/_incorrect_returned_error_model_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/operations/_incorrect_returned_error_model_operations.py index d597c7973fd..9943c672fdc 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/operations/_incorrect_returned_error_model_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/operations/_incorrect_returned_error_model_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,9 +34,7 @@ class IncorrectReturnedErrorModelOperationsMixin(IncorrectReturnedErrorModelMixinABC): # pylint: disable=name-too-long @distributed_trace_async - async def get_incorrect_error_from_server( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_incorrect_error_from_server(self, **kwargs: Any) -> None: """Get an error response from the server that is not as described in our Error object. Want to swallow the deserialization error and still return an HttpResponseError to the users. @@ -45,7 +42,7 @@ async def get_incorrect_error_from_server( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/operations/_incorrect_returned_error_model_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/operations/_incorrect_returned_error_model_operations.py index e87ed1bf621..679ea2d485d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/operations/_incorrect_returned_error_model_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/operations/_incorrect_returned_error_model_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +52,7 @@ def get_incorrect_error_from_server(self, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_configuration.py index 34422af1871..149c5ef0dae 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MediaTypesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_vendor.py index 059f572c7b2..89badf10b3f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MediaTypesClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_configuration.py index 8039efe6598..0fd970a352b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MediaTypesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_vendor.py index 2e6d0c12365..09bfff1a7fa 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MediaTypesClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/operations/_media_types_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/operations/_media_types_client_operations.py index 4518d32f5c9..1d6dc01d57e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/operations/_media_types_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/operations/_media_types_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -89,7 +88,7 @@ async def analyze_body(self, input: Optional[Union[_models.SourcePath, IO[bytes] :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -142,7 +141,7 @@ async def analyze_body(self, input: Optional[Union[_models.SourcePath, IO[bytes] return deserialized # type: ignore @overload - async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + async def analyze_body_no_accept_header( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -159,7 +158,7 @@ async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return- """ @overload - async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + async def analyze_body_no_accept_header( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -177,7 +176,7 @@ async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + async def analyze_body_no_accept_header( self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -190,7 +189,7 @@ async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -248,7 +247,7 @@ async def content_type_with_encoding(self, input: Optional[str] = None, **kwargs :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -304,7 +303,7 @@ async def binary_body_with_two_content_types(self, message: IO[bytes], **kwargs: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -358,7 +357,7 @@ async def binary_body_with_three_content_types(self, message: IO[bytes], **kwarg :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -423,7 +422,7 @@ async def _body_three_types(self, message: Union[Any, IO[bytes], str], **kwargs: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +482,7 @@ async def put_text_and_json_body(self, message: str, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/models/_models_py3.py index f28528a3b05..cb4813a0e1c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/operations/_media_types_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/operations/_media_types_client_operations.py index 020edcf48ed..17fd3ac785f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/operations/_media_types_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/operations/_media_types_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -204,7 +203,7 @@ def analyze_body(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = N :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -257,7 +256,7 @@ def analyze_body(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = N return deserialized # type: ignore @overload - def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + def analyze_body_no_accept_header( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -274,7 +273,7 @@ def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statem """ @overload - def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + def analyze_body_no_accept_header( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -305,7 +304,7 @@ def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -363,7 +362,7 @@ def content_type_with_encoding(self, input: Optional[str] = None, **kwargs: Any) :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -419,7 +418,7 @@ def binary_body_with_two_content_types(self, message: IO[bytes], **kwargs: Any) :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -473,7 +472,7 @@ def binary_body_with_three_content_types(self, message: IO[bytes], **kwargs: Any :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -536,7 +535,7 @@ def _body_three_types(self, message: Union[Any, IO[bytes], str], **kwargs: Any) :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -596,7 +595,7 @@ def put_text_and_json_body(self, message: str, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_configuration.py index 8f1c651319a..5173debe784 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MediaTypesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_vendor.py index 059f572c7b2..89badf10b3f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MediaTypesClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_configuration.py index d4dee2ed8f6..58c343efa42 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MediaTypesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_vendor.py index 2e6d0c12365..09bfff1a7fa 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MediaTypesClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/operations/_media_types_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/operations/_media_types_client_operations.py index 209fab32ebd..aefef5e8ed6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/operations/_media_types_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/operations/_media_types_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -89,7 +88,7 @@ async def analyze_body(self, input: Optional[Union[_models.SourcePath, IO[bytes] :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -142,7 +141,7 @@ async def analyze_body(self, input: Optional[Union[_models.SourcePath, IO[bytes] return deserialized # type: ignore @overload - async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + async def analyze_body_no_accept_header( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -159,7 +158,7 @@ async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return- """ @overload - async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + async def analyze_body_no_accept_header( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -177,7 +176,7 @@ async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + async def analyze_body_no_accept_header( self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = None, **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -190,7 +189,7 @@ async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -248,7 +247,7 @@ async def content_type_with_encoding(self, input: Optional[str] = None, **kwargs :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -304,7 +303,7 @@ async def binary_body_with_two_content_types(self, message: IO[bytes], **kwargs: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -358,7 +357,7 @@ async def binary_body_with_three_content_types(self, message: IO[bytes], **kwarg :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -463,7 +462,7 @@ async def body_three_types(self, message: Union[Any, IO[bytes], str], **kwargs: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -523,7 +522,7 @@ async def put_text_and_json_body(self, message: str, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/models/_models_py3.py index f28528a3b05..cb4813a0e1c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/operations/_media_types_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/operations/_media_types_client_operations.py index e8c354b600b..328131b3a30 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/operations/_media_types_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/operations/_media_types_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -204,7 +203,7 @@ def analyze_body(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = N :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -257,7 +256,7 @@ def analyze_body(self, input: Optional[Union[_models.SourcePath, IO[bytes]]] = N return deserialized # type: ignore @overload - def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + def analyze_body_no_accept_header( self, input: Optional[_models.SourcePath] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -274,7 +273,7 @@ def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statem """ @overload - def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + def analyze_body_no_accept_header( self, input: Optional[IO[bytes]] = None, *, content_type: Optional[str] = None, **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -305,7 +304,7 @@ def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -363,7 +362,7 @@ def content_type_with_encoding(self, input: Optional[str] = None, **kwargs: Any) :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -419,7 +418,7 @@ def binary_body_with_two_content_types(self, message: IO[bytes], **kwargs: Any) :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -473,7 +472,7 @@ def binary_body_with_three_content_types(self, message: IO[bytes], **kwargs: Any :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -578,7 +577,7 @@ def body_three_types(self, message: Union[Any, IO[bytes], str], **kwargs: Any) - :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -638,7 +637,7 @@ def put_text_and_json_body(self, message: str, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_configuration.py index db44d85350c..c28320cf73b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class MergePatchJsonClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MergePatchJsonClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MergePatchJsonClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_vendor.py index bc7fd4a52a0..8295b4aa6c6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MergePatchJsonClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_configuration.py index cddacf90887..819f513226f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class MergePatchJsonClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MergePatchJsonClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MergePatchJsonClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_vendor.py index 0521b5d17da..ef83da259a4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MergePatchJsonClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/_merge_patch_json_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/_merge_patch_json_client_operations.py index 28138803a89..ab7b8ac82d9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/_merge_patch_json_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/_merge_patch_json_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -37,7 +36,7 @@ class MergePatchJsonClientOperationsMixin(MergePatchJsonClientMixinABC): @distributed_trace_async - async def patch_single(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def patch_single(self, body: JSON, **kwargs: Any) -> None: """Basic patch with an object. :param body: Pass in {'foo': 'bar'} for a 200, anything else for an object error. Required. @@ -46,7 +45,7 @@ async def patch_single(self, body: JSON, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/_merge_patch_json_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/_merge_patch_json_client_operations.py index 2c2a2818e90..d3c3635842b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/_merge_patch_json_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/_merge_patch_json_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ def patch_single(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_vendor.py index a9c5cb94413..1ad7d328b42 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_vendor.py @@ -11,13 +11,12 @@ from ._configuration import AutoRestResourceFlatteningTestServiceConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer -class AutoRestResourceFlatteningTestServiceMixinABC(ABC): # pylint: disable=name-too-long +class AutoRestResourceFlatteningTestServiceMixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" _client: "PipelineClient" diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/_vendor.py index a7599da945c..6f540954681 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/_vendor.py @@ -11,13 +11,12 @@ from ._configuration import AutoRestResourceFlatteningTestServiceConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer -class AutoRestResourceFlatteningTestServiceMixinABC(ABC): # pylint: disable=name-too-long +class AutoRestResourceFlatteningTestServiceMixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" _client: "AsyncPipelineClient" diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/_auto_rest_resource_flattening_test_service_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/_auto_rest_resource_flattening_test_service_operations.py index 78405b4c4e5..abba75f91df 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/_auto_rest_resource_flattening_test_service_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/_auto_rest_resource_flattening_test_service_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ class AutoRestResourceFlatteningTestServiceOperationsMixin( # pylint: disable=n ): @overload - async def put_array( # pylint: disable=inconsistent-return-statements + async def put_array( self, resource_array: Optional[List[_models.Resource]] = None, *, @@ -75,7 +74,7 @@ async def put_array( # pylint: disable=inconsistent-return-statements """ @overload - async def put_array( # pylint: disable=inconsistent-return-statements + async def put_array( self, resource_array: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as an Array. @@ -94,7 +93,7 @@ async def put_array( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_array( # pylint: disable=inconsistent-return-statements + async def put_array( self, resource_array: Optional[Union[List[_models.Resource], IO[bytes]]] = None, **kwargs: Any ) -> None: """Put External Resource as an Array. @@ -109,7 +108,7 @@ async def put_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -169,7 +168,7 @@ async def get_array(self, **kwargs: Any) -> List[_models.FlattenedProduct]: :rtype: list[~modelflattening.models.FlattenedProduct] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -208,7 +207,7 @@ async def get_array(self, **kwargs: Any) -> List[_models.FlattenedProduct]: return deserialized # type: ignore @overload - async def put_wrapped_array( # pylint: disable=inconsistent-return-statements + async def put_wrapped_array( self, resource_array: Optional[List[_models.WrappedProduct]] = None, *, @@ -232,7 +231,7 @@ async def put_wrapped_array( # pylint: disable=inconsistent-return-statements """ @overload - async def put_wrapped_array( # pylint: disable=inconsistent-return-statements + async def put_wrapped_array( self, resource_array: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """No need to have a route in Express server for this operation. Used to verify the type flattened @@ -252,7 +251,7 @@ async def put_wrapped_array( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_wrapped_array( # pylint: disable=inconsistent-return-statements + async def put_wrapped_array( self, resource_array: Optional[Union[List[_models.WrappedProduct], IO[bytes]]] = None, **kwargs: Any ) -> None: """No need to have a route in Express server for this operation. Used to verify the type flattened @@ -268,7 +267,7 @@ async def put_wrapped_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -329,7 +328,7 @@ async def get_wrapped_array(self, **kwargs: Any) -> List[_models.ProductWrapper] :rtype: list[~modelflattening.models.ProductWrapper] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -368,7 +367,7 @@ async def get_wrapped_array(self, **kwargs: Any) -> List[_models.ProductWrapper] return deserialized # type: ignore @overload - async def put_dictionary( # pylint: disable=inconsistent-return-statements + async def put_dictionary( self, resource_dictionary: Optional[Dict[str, _models.FlattenedProduct]] = None, *, @@ -391,7 +390,7 @@ async def put_dictionary( # pylint: disable=inconsistent-return-statements """ @overload - async def put_dictionary( # pylint: disable=inconsistent-return-statements + async def put_dictionary( self, resource_dictionary: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as a Dictionary. @@ -410,7 +409,7 @@ async def put_dictionary( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_dictionary( # pylint: disable=inconsistent-return-statements + async def put_dictionary( self, resource_dictionary: Optional[Union[Dict[str, _models.FlattenedProduct], IO[bytes]]] = None, **kwargs: Any ) -> None: """Put External Resource as a Dictionary. @@ -425,7 +424,7 @@ async def put_dictionary( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -485,7 +484,7 @@ async def get_dictionary(self, **kwargs: Any) -> Dict[str, _models.FlattenedProd :rtype: dict[str, ~modelflattening.models.FlattenedProduct] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -524,7 +523,7 @@ async def get_dictionary(self, **kwargs: Any) -> Dict[str, _models.FlattenedProd return deserialized # type: ignore @overload - async def put_resource_collection( # pylint: disable=inconsistent-return-statements + async def put_resource_collection( self, resource_complex_object: Optional[_models.ResourceCollection] = None, *, @@ -548,7 +547,7 @@ async def put_resource_collection( # pylint: disable=inconsistent-return-statem """ @overload - async def put_resource_collection( # pylint: disable=inconsistent-return-statements + async def put_resource_collection( self, resource_complex_object: Optional[IO[bytes]] = None, *, @@ -572,7 +571,7 @@ async def put_resource_collection( # pylint: disable=inconsistent-return-statem """ @distributed_trace_async - async def put_resource_collection( # pylint: disable=inconsistent-return-statements + async def put_resource_collection( self, resource_complex_object: Optional[Union[_models.ResourceCollection, IO[bytes]]] = None, **kwargs: Any ) -> None: """Put External Resource as a ResourceCollection. @@ -587,7 +586,7 @@ async def put_resource_collection( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -647,7 +646,7 @@ async def get_resource_collection(self, **kwargs: Any) -> _models.ResourceCollec :rtype: ~modelflattening.models.ResourceCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -743,7 +742,7 @@ async def put_simple_product( :rtype: ~modelflattening.models.SimpleProduct :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -831,7 +830,7 @@ async def post_flattened_simple_product( :rtype: ~modelflattening.models.SimpleProduct :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -900,7 +899,7 @@ async def put_simple_product_with_grouping( :rtype: ~modelflattening.models.SimpleProduct :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/models/_models_py3.py index 762260f2a3f..1473e8fb5fa 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/_auto_rest_resource_flattening_test_service_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/_auto_rest_resource_flattening_test_service_operations.py index 1788ee9d537..c97fbeb059d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/_auto_rest_resource_flattening_test_service_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/_auto_rest_resource_flattening_test_service_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -225,7 +225,7 @@ class AutoRestResourceFlatteningTestServiceOperationsMixin( # pylint: disable=n ): @overload - def put_array( # pylint: disable=inconsistent-return-statements + def put_array( self, resource_array: Optional[List[_models.Resource]] = None, *, @@ -248,7 +248,7 @@ def put_array( # pylint: disable=inconsistent-return-statements """ @overload - def put_array( # pylint: disable=inconsistent-return-statements + def put_array( self, resource_array: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as an Array. @@ -282,7 +282,7 @@ def put_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -342,7 +342,7 @@ def get_array(self, **kwargs: Any) -> List[_models.FlattenedProduct]: :rtype: list[~modelflattening.models.FlattenedProduct] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -381,7 +381,7 @@ def get_array(self, **kwargs: Any) -> List[_models.FlattenedProduct]: return deserialized # type: ignore @overload - def put_wrapped_array( # pylint: disable=inconsistent-return-statements + def put_wrapped_array( self, resource_array: Optional[List[_models.WrappedProduct]] = None, *, @@ -405,7 +405,7 @@ def put_wrapped_array( # pylint: disable=inconsistent-return-statements """ @overload - def put_wrapped_array( # pylint: disable=inconsistent-return-statements + def put_wrapped_array( self, resource_array: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """No need to have a route in Express server for this operation. Used to verify the type flattened @@ -441,7 +441,7 @@ def put_wrapped_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -502,7 +502,7 @@ def get_wrapped_array(self, **kwargs: Any) -> List[_models.ProductWrapper]: :rtype: list[~modelflattening.models.ProductWrapper] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -541,7 +541,7 @@ def get_wrapped_array(self, **kwargs: Any) -> List[_models.ProductWrapper]: return deserialized # type: ignore @overload - def put_dictionary( # pylint: disable=inconsistent-return-statements + def put_dictionary( self, resource_dictionary: Optional[Dict[str, _models.FlattenedProduct]] = None, *, @@ -564,7 +564,7 @@ def put_dictionary( # pylint: disable=inconsistent-return-statements """ @overload - def put_dictionary( # pylint: disable=inconsistent-return-statements + def put_dictionary( self, resource_dictionary: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as a Dictionary. @@ -598,7 +598,7 @@ def put_dictionary( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -658,7 +658,7 @@ def get_dictionary(self, **kwargs: Any) -> Dict[str, _models.FlattenedProduct]: :rtype: dict[str, ~modelflattening.models.FlattenedProduct] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -697,7 +697,7 @@ def get_dictionary(self, **kwargs: Any) -> Dict[str, _models.FlattenedProduct]: return deserialized # type: ignore @overload - def put_resource_collection( # pylint: disable=inconsistent-return-statements + def put_resource_collection( self, resource_complex_object: Optional[_models.ResourceCollection] = None, *, @@ -721,7 +721,7 @@ def put_resource_collection( # pylint: disable=inconsistent-return-statements """ @overload - def put_resource_collection( # pylint: disable=inconsistent-return-statements + def put_resource_collection( self, resource_complex_object: Optional[IO[bytes]] = None, *, @@ -760,7 +760,7 @@ def put_resource_collection( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -820,7 +820,7 @@ def get_resource_collection(self, **kwargs: Any) -> _models.ResourceCollection: :rtype: ~modelflattening.models.ResourceCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -916,7 +916,7 @@ def put_simple_product( :rtype: ~modelflattening.models.SimpleProduct :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1004,7 +1004,7 @@ def post_flattened_simple_product( :rtype: ~modelflattening.models.SimpleProduct :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1073,7 +1073,7 @@ def put_simple_product_with_grouping( :rtype: ~modelflattening.models.SimpleProduct :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_vendor.py index ab12708447c..8a74180edd6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultipleInheritanceServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/_vendor.py index 22e0b34b3f3..457fe8c5636 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultipleInheritanceServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/_multiple_inheritance_service_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/_multiple_inheritance_service_client_operations.py index 41d499ebed1..572022a0f9d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/_multiple_inheritance_service_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/_multiple_inheritance_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -41,7 +40,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,7 +57,7 @@ async def get_horse(self, **kwargs: Any) -> _models.Horse: :rtype: ~multipleinheritance.models.Horse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -135,7 +134,7 @@ async def put_horse(self, horse: Union[_models.Horse, IO[bytes]], **kwargs: Any) :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -192,7 +191,7 @@ async def get_pet(self, **kwargs: Any) -> _models.Pet: :rtype: ~multipleinheritance.models.Pet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -240,7 +239,7 @@ async def put_pet(self, name: str, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -291,7 +290,7 @@ async def get_feline(self, **kwargs: Any) -> _models.Feline: :rtype: ~multipleinheritance.models.Feline :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -368,7 +367,7 @@ async def put_feline(self, feline: Union[_models.Feline, IO[bytes]], **kwargs: A :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -425,7 +424,7 @@ async def get_cat(self, **kwargs: Any) -> _models.Cat: :rtype: ~multipleinheritance.models.Cat :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -504,7 +503,7 @@ async def put_cat(self, cat: Union[_models.Cat, IO[bytes]], **kwargs: Any) -> st :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -562,7 +561,7 @@ async def get_kitten(self, **kwargs: Any) -> _models.Kitten: :rtype: ~multipleinheritance.models.Kitten :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -644,7 +643,7 @@ async def put_kitten(self, kitten: Union[_models.Kitten, IO[bytes]], **kwargs: A :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/models/_models_py3.py index 20b76e3345b..163d41e5353 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/_multiple_inheritance_service_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/_multiple_inheritance_service_client_operations.py index 2e17a43e0d2..ad5d75ddcaf 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/_multiple_inheritance_service_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/_multiple_inheritance_service_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -205,7 +204,7 @@ def get_horse(self, **kwargs: Any) -> _models.Horse: :rtype: ~multipleinheritance.models.Horse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -282,7 +281,7 @@ def put_horse(self, horse: Union[_models.Horse, IO[bytes]], **kwargs: Any) -> st :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -339,7 +338,7 @@ def get_pet(self, **kwargs: Any) -> _models.Pet: :rtype: ~multipleinheritance.models.Pet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -387,7 +386,7 @@ def put_pet(self, name: str, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -438,7 +437,7 @@ def get_feline(self, **kwargs: Any) -> _models.Feline: :rtype: ~multipleinheritance.models.Feline :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -515,7 +514,7 @@ def put_feline(self, feline: Union[_models.Feline, IO[bytes]], **kwargs: Any) -> :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -572,7 +571,7 @@ def get_cat(self, **kwargs: Any) -> _models.Cat: :rtype: ~multipleinheritance.models.Cat :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -651,7 +650,7 @@ def put_cat(self, cat: Union[_models.Cat, IO[bytes]], **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -709,7 +708,7 @@ def get_kitten(self, **kwargs: Any) -> _models.Kitten: :rtype: ~multipleinheritance.models.Kitten :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -791,7 +790,7 @@ def put_kitten(self, kitten: Union[_models.Kitten, IO[bytes]], **kwargs: Any) -> :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/nooperations/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/nooperations/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/nooperations/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/nooperations/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/nooperations/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/nooperations/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/nooperations/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/nooperations/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/_configuration.py index fb3b4bb8129..9863b9fa552 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class NonStringEnumsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NonStringEnumsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NonStringEnumsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/_configuration.py index fc6756a1965..b5ad758d11d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class NonStringEnumsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NonStringEnumsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NonStringEnumsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/operations/_float_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/operations/_float_operations.py index 7737839968d..f280f32b5d3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/operations/_float_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/operations/_float_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def put(self, input: Optional[Union[float, _models.FloatEnum]] = None, **k :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -114,7 +113,7 @@ async def get(self, **kwargs: Any) -> Union[float, _models.FloatEnum]: :rtype: float or ~nonstringenums.models.FloatEnum :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/operations/_int_operations_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/operations/_int_operations_operations.py index 9a277e4b541..b46637f676a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/operations/_int_operations_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/aio/operations/_int_operations_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ async def put(self, input: Optional[Union[int, _models.IntEnum]] = None, **kwarg :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -114,7 +113,7 @@ async def get(self, **kwargs: Any) -> Union[int, _models.IntEnum]: :rtype: int or ~nonstringenums.models.IntEnum :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/operations/_float_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/operations/_float_operations.py index e62a22732f8..a4c76b17217 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/operations/_float_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/operations/_float_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -95,7 +94,7 @@ def put(self, input: Optional[Union[float, _models.FloatEnum]] = None, **kwargs: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -148,7 +147,7 @@ def get(self, **kwargs: Any) -> Union[float, _models.FloatEnum]: :rtype: float or ~nonstringenums.models.FloatEnum :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/operations/_int_operations_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/operations/_int_operations_operations.py index f779d05dade..fa1c331b5e5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/operations/_int_operations_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/nonstringenums/operations/_int_operations_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -95,7 +94,7 @@ def put(self, input: Optional[Union[int, _models.IntEnum]] = None, **kwargs: Any :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -148,7 +147,7 @@ def get(self, **kwargs: Any) -> Union[int, _models.IntEnum]: :rtype: int or ~nonstringenums.models.IntEnum :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_configuration.py index 80639e9d9ac..a5b3c890358 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ObjectTypeClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ObjectTypeClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ObjectTypeClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_vendor.py index 38f277f20f4..e42ff8bdaa8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ObjectTypeClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_configuration.py index 062d8c513cd..3a8de7e5e25 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ObjectTypeClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ObjectTypeClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ObjectTypeClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_vendor.py index 97ff8285a95..7773f545cb3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ObjectTypeClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/_object_type_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/_object_type_client_operations.py index 06ab2dd7d92..3a0674713a1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/_object_type_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/_object_type_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +44,7 @@ async def get(self, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84,7 +83,7 @@ async def get(self, **kwargs: Any) -> JSON: return deserialized # type: ignore @distributed_trace_async - async def put(self, put_object: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put(self, put_object: JSON, **kwargs: Any) -> None: """Basic put that puts an object. Pass in {'foo': 'bar'} to get a 200 and anything else to get an object error. @@ -95,7 +94,7 @@ async def put(self, put_object: JSON, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/_object_type_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/_object_type_client_operations.py index b81b03ad1ef..14647cf9cfc 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/_object_type_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/_object_type_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -79,7 +78,7 @@ def get(self, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -129,7 +128,7 @@ def put(self, put_object: JSON, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_vendor.py index dc910ddc7e5..db0a5a9a33b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AnythingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_vendor.py index 29d65bdd121..c99b54eef8d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AnythingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/_anything_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/_anything_client_operations.py index b47f932a3c0..e89cf0692d4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/_anything_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/_anything_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +50,7 @@ async def get_object(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89,7 +88,7 @@ async def get_object(self, **kwargs: Any) -> Any: return deserialized # type: ignore @distributed_trace_async - async def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_object(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an object as anything. Pass in {'foo': 'bar'} to get a 200 and anything else to get an object error. @@ -99,7 +98,7 @@ async def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -145,7 +144,7 @@ async def get_string(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -183,7 +182,7 @@ async def get_string(self, **kwargs: Any) -> Any: return deserialized # type: ignore @distributed_trace_async - async def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_string(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an string as anything. Pass in 'anything' to get a 200 and anything else to get an object error. @@ -193,7 +192,7 @@ async def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -239,7 +238,7 @@ async def get_array(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -277,7 +276,7 @@ async def get_array(self, **kwargs: Any) -> Any: return deserialized # type: ignore @distributed_trace_async - async def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_array(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an array as anything. Pass in ['foo', 'bar'] to get a 200 and anything else to get an object error. @@ -287,7 +286,7 @@ async def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/_anything_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/_anything_client_operations.py index c9599ef7847..22ea18d78b9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/_anything_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/_anything_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -131,7 +130,7 @@ def get_object(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -179,7 +178,7 @@ def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,7 +224,7 @@ def get_string(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -273,7 +272,7 @@ def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -319,7 +318,7 @@ def get_array(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -367,7 +366,7 @@ def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/_configuration.py index 22081aeecad..dfbfa3c510e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestParameterFlatteningConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestParameterFlatteningConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestParameterFlattening. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/aio/_configuration.py index 1cba0561eb3..a1f67d7f164 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestParameterFlatteningConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestParameterFlatteningConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestParameterFlattening. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/aio/operations/_availability_sets_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/aio/operations/_availability_sets_operations.py index 8521b6054d9..63f3efc1292 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/aio/operations/_availability_sets_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/aio/operations/_availability_sets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,9 +52,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def update( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, avset: str, tags: Dict[str, str], **kwargs: Any - ) -> None: + async def update(self, resource_group_name: str, avset: str, tags: Dict[str, str], **kwargs: Any) -> None: """Updates the tags for an availability set. :param resource_group_name: The name of the resource group. Required. @@ -68,7 +65,7 @@ async def update( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/models/_models_py3.py index 6cfa89a24be..a4b43946566 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/operations/_availability_sets_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/operations/_availability_sets_operations.py index 60d190b2750..3d2f0182653 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/operations/_availability_sets_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/parameterflattening/operations/_availability_sets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -91,7 +90,7 @@ def update( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_configuration.py index 229782ee04d..896c1ee8243 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ParmaterizedEndpointClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ParmaterizedEndpointClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ParmaterizedEndpointClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_vendor.py index 3aa95cca6e2..a9e7ad280de 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ParmaterizedEndpointClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_configuration.py index a38b3f9c39e..7188075d8cd 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ParmaterizedEndpointClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ParmaterizedEndpointClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ParmaterizedEndpointClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_vendor.py index c8495a15c6f..32921e9fc7d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ParmaterizedEndpointClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/operations/_parmaterized_endpoint_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/operations/_parmaterized_endpoint_client_operations.py index 6759c7c9f45..ca24058c44c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/operations/_parmaterized_endpoint_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/operations/_parmaterized_endpoint_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class ParmaterizedEndpointClientOperationsMixin(ParmaterizedEndpointClientMixinABC): # pylint: disable=name-too-long @distributed_trace_async - async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get(self, **kwargs: Any) -> None: """Basic get to make sure base url formatting of 'endpoint' works. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/operations/_parmaterized_endpoint_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/operations/_parmaterized_endpoint_client_operations.py index 13bf164fb7c..c0faae94812 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/operations/_parmaterized_endpoint_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/operations/_parmaterized_endpoint_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_configuration.py index 8a6f1d8a654..cb569882d29 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestReportServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestReportServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestReportService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_vendor.py index 3809d97ecea..823d06e3b42 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestReportServiceConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_configuration.py index 35535c4c606..0a1e1f75555 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestReportServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestReportServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestReportService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_vendor.py index ebe95d1ea53..4777573d29a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestReportServiceConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/_auto_rest_report_service_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/_auto_rest_report_service_operations.py index 368284bffdc..fff2cc1b39c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/_auto_rest_report_service_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/_auto_rest_report_service_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +49,7 @@ async def get_report(self, qualifier: Optional[str] = None, **kwargs: Any) -> Di :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -101,7 +100,7 @@ async def get_optional_report(self, qualifier: Optional[str] = None, **kwargs: A :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/_auto_rest_report_service_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/_auto_rest_report_service_operations.py index 77f20b1858f..12cbf1036fd 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/_auto_rest_report_service_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/_auto_rest_report_service_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -89,7 +88,7 @@ def get_report(self, qualifier: Optional[str] = None, **kwargs: Any) -> Dict[str :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -140,7 +139,7 @@ def get_optional_report(self, qualifier: Optional[str] = None, **kwargs: Any) -> :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_explicit_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_explicit_operations.py index 711b5374bf0..e0d0139029c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_explicit_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_explicit_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -54,7 +54,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -79,9 +79,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def put_optional_binary_body( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[IO[bytes]] = None, **kwargs: Any - ) -> None: + async def put_optional_binary_body(self, body_parameter: Optional[IO[bytes]] = None, **kwargs: Any) -> None: """Test explicitly optional body parameter. :param body_parameter: Default value is None. @@ -90,7 +88,7 @@ async def put_optional_binary_body( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -130,9 +128,7 @@ async def put_optional_binary_body( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_required_binary_body( # pylint: disable=inconsistent-return-statements - self, body_parameter: IO[bytes], **kwargs: Any - ) -> None: + async def put_required_binary_body(self, body_parameter: IO[bytes], **kwargs: Any) -> None: """Test explicitly required body parameter. :param body_parameter: Required. @@ -141,7 +137,7 @@ async def put_required_binary_body( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,9 +177,7 @@ async def put_required_binary_body( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_integer_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: int, **kwargs: Any - ) -> None: + async def post_required_integer_parameter(self, body_parameter: int, **kwargs: Any) -> None: """Test explicitly required integer. Please put null and the client library should throw before the request is sent. @@ -193,7 +187,7 @@ async def post_required_integer_parameter( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -233,9 +227,7 @@ async def post_required_integer_parameter( # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_integer_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[int] = None, **kwargs: Any - ) -> None: + async def post_optional_integer_parameter(self, body_parameter: Optional[int] = None, **kwargs: Any) -> None: """Test explicitly optional integer. Please put null. :param body_parameter: Default value is None. @@ -244,7 +236,7 @@ async def post_optional_integer_parameter( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -287,9 +279,7 @@ async def post_optional_integer_parameter( # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_integer_property( # pylint: disable=inconsistent-return-statements - self, value: int, **kwargs: Any - ) -> None: + async def post_required_integer_property(self, value: int, **kwargs: Any) -> None: """Test explicitly required integer. Please put a valid int-wrapper with 'value' = null and the client library should throw before the request is sent. @@ -299,7 +289,7 @@ async def post_required_integer_property( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -340,9 +330,7 @@ async def post_required_integer_property( # pylint: disable=inconsistent-return return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_integer_property( # pylint: disable=inconsistent-return-statements - self, value: Optional[int] = None, **kwargs: Any - ) -> None: + async def post_optional_integer_property(self, value: Optional[int] = None, **kwargs: Any) -> None: """Test explicitly optional integer. Please put a valid int-wrapper with 'value' = null. :param value: Default value is None. @@ -351,7 +339,7 @@ async def post_optional_integer_property( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -395,9 +383,7 @@ async def post_optional_integer_property( # pylint: disable=inconsistent-return return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_integer_header( # pylint: disable=inconsistent-return-statements - self, header_parameter: int, **kwargs: Any - ) -> None: + async def post_required_integer_header(self, header_parameter: int, **kwargs: Any) -> None: """Test explicitly required integer. Please put a header 'headerParameter' => null and the client library should throw before the request is sent. @@ -407,7 +393,7 @@ async def post_required_integer_header( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -443,9 +429,7 @@ async def post_required_integer_header( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_integer_header( # pylint: disable=inconsistent-return-statements - self, header_parameter: Optional[int] = None, **kwargs: Any - ) -> None: + async def post_optional_integer_header(self, header_parameter: Optional[int] = None, **kwargs: Any) -> None: """Test explicitly optional integer. Please put a header 'headerParameter' => null. :param header_parameter: Default value is None. @@ -454,7 +438,7 @@ async def post_optional_integer_header( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -490,9 +474,7 @@ async def post_optional_integer_header( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_string_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: str, **kwargs: Any - ) -> None: + async def post_required_string_parameter(self, body_parameter: str, **kwargs: Any) -> None: """Test explicitly required string. Please put null and the client library should throw before the request is sent. @@ -502,7 +484,7 @@ async def post_required_string_parameter( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -542,9 +524,7 @@ async def post_required_string_parameter( # pylint: disable=inconsistent-return return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_string_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def post_optional_string_parameter(self, body_parameter: Optional[str] = None, **kwargs: Any) -> None: """Test explicitly optional string. Please put null. :param body_parameter: Default value is None. @@ -553,7 +533,7 @@ async def post_optional_string_parameter( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -596,9 +576,7 @@ async def post_optional_string_parameter( # pylint: disable=inconsistent-return return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_string_property( # pylint: disable=inconsistent-return-statements - self, value: str, **kwargs: Any - ) -> None: + async def post_required_string_property(self, value: str, **kwargs: Any) -> None: """Test explicitly required string. Please put a valid string-wrapper with 'value' = null and the client library should throw before the request is sent. @@ -608,7 +586,7 @@ async def post_required_string_property( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -649,9 +627,7 @@ async def post_required_string_property( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_string_property( # pylint: disable=inconsistent-return-statements - self, value: Optional[str] = None, **kwargs: Any - ) -> None: + async def post_optional_string_property(self, value: Optional[str] = None, **kwargs: Any) -> None: """Test explicitly optional integer. Please put a valid string-wrapper with 'value' = null. :param value: Default value is None. @@ -660,7 +636,7 @@ async def post_optional_string_property( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -704,9 +680,7 @@ async def post_optional_string_property( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_string_header( # pylint: disable=inconsistent-return-statements - self, header_parameter: str, **kwargs: Any - ) -> None: + async def post_required_string_header(self, header_parameter: str, **kwargs: Any) -> None: """Test explicitly required string. Please put a header 'headerParameter' => null and the client library should throw before the request is sent. @@ -716,7 +690,7 @@ async def post_required_string_header( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -752,9 +726,7 @@ async def post_required_string_header( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_string_header( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def post_optional_string_header(self, body_parameter: Optional[str] = None, **kwargs: Any) -> None: """Test explicitly optional string. Please put a header 'headerParameter' => null. :param body_parameter: Default value is None. @@ -763,7 +735,7 @@ async def post_optional_string_header( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -799,7 +771,7 @@ async def post_optional_string_header( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_required_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_required_class_parameter( self, body_parameter: _models.Product, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put null and the client library should throw @@ -816,7 +788,7 @@ async def post_required_class_parameter( # pylint: disable=inconsistent-return- """ @overload - async def post_required_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_required_class_parameter( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put null and the client library should throw @@ -833,7 +805,7 @@ async def post_required_class_parameter( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def post_required_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_required_class_parameter( self, body_parameter: Union[_models.Product, IO[bytes]], **kwargs: Any ) -> None: """Test explicitly required complex object. Please put null and the client library should throw @@ -845,7 +817,7 @@ async def post_required_class_parameter( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -892,7 +864,7 @@ async def post_required_class_parameter( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_optional_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_class_parameter( self, body_parameter: Optional[_models.Product] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put null. @@ -908,7 +880,7 @@ async def post_optional_class_parameter( # pylint: disable=inconsistent-return- """ @overload - async def post_optional_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_class_parameter( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put null. @@ -924,7 +896,7 @@ async def post_optional_class_parameter( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def post_optional_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_class_parameter( self, body_parameter: Optional[Union[_models.Product, IO[bytes]]] = None, **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put null. @@ -935,7 +907,7 @@ async def post_optional_class_parameter( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -985,9 +957,7 @@ async def post_optional_class_parameter( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_class_property( # pylint: disable=inconsistent-return-statements - self, value: _models.Product, **kwargs: Any - ) -> None: + async def post_required_class_property(self, value: _models.Product, **kwargs: Any) -> None: """Test explicitly required complex object. Please put a valid class-wrapper with 'value' = null and the client library should throw before the request is sent. @@ -997,7 +967,7 @@ async def post_required_class_property( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1038,9 +1008,7 @@ async def post_required_class_property( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_class_property( # pylint: disable=inconsistent-return-statements - self, value: Optional[_models.Product] = None, **kwargs: Any - ) -> None: + async def post_optional_class_property(self, value: Optional[_models.Product] = None, **kwargs: Any) -> None: """Test explicitly optional complex object. Please put a valid class-wrapper with 'value' = null. :param value: Default value is None. @@ -1049,7 +1017,7 @@ async def post_optional_class_property( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1093,7 +1061,7 @@ async def post_optional_class_property( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_required_array_parameter( # pylint: disable=inconsistent-return-statements + async def post_required_array_parameter( self, body_parameter: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put null and the client library should throw before the @@ -1110,7 +1078,7 @@ async def post_required_array_parameter( # pylint: disable=inconsistent-return- """ @overload - async def post_required_array_parameter( # pylint: disable=inconsistent-return-statements + async def post_required_array_parameter( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put null and the client library should throw before the @@ -1127,9 +1095,7 @@ async def post_required_array_parameter( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def post_required_array_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def post_required_array_parameter(self, body_parameter: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Test explicitly required array. Please put null and the client library should throw before the request is sent. @@ -1139,7 +1105,7 @@ async def post_required_array_parameter( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1186,7 +1152,7 @@ async def post_required_array_parameter( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_optional_array_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_array_parameter( self, body_parameter: Optional[List[str]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put null. @@ -1202,7 +1168,7 @@ async def post_optional_array_parameter( # pylint: disable=inconsistent-return- """ @overload - async def post_optional_array_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_array_parameter( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put null. @@ -1218,7 +1184,7 @@ async def post_optional_array_parameter( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def post_optional_array_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_array_parameter( self, body_parameter: Optional[Union[List[str], IO[bytes]]] = None, **kwargs: Any ) -> None: """Test explicitly optional array. Please put null. @@ -1229,7 +1195,7 @@ async def post_optional_array_parameter( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1279,9 +1245,7 @@ async def post_optional_array_parameter( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_array_property( # pylint: disable=inconsistent-return-statements - self, value: List[str], **kwargs: Any - ) -> None: + async def post_required_array_property(self, value: List[str], **kwargs: Any) -> None: """Test explicitly required array. Please put a valid array-wrapper with 'value' = null and the client library should throw before the request is sent. @@ -1291,7 +1255,7 @@ async def post_required_array_property( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1332,9 +1296,7 @@ async def post_required_array_property( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_array_property( # pylint: disable=inconsistent-return-statements - self, value: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def post_optional_array_property(self, value: Optional[List[str]] = None, **kwargs: Any) -> None: """Test explicitly optional array. Please put a valid array-wrapper with 'value' = null. :param value: Default value is None. @@ -1343,7 +1305,7 @@ async def post_optional_array_property( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1387,9 +1349,7 @@ async def post_optional_array_property( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_array_header( # pylint: disable=inconsistent-return-statements - self, header_parameter: List[str], **kwargs: Any - ) -> None: + async def post_required_array_header(self, header_parameter: List[str], **kwargs: Any) -> None: """Test explicitly required array. Please put a header 'headerParameter' => null and the client library should throw before the request is sent. @@ -1399,7 +1359,7 @@ async def post_required_array_header( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1435,9 +1395,7 @@ async def post_required_array_header( # pylint: disable=inconsistent-return-sta return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_array_header( # pylint: disable=inconsistent-return-statements - self, header_parameter: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def post_optional_array_header(self, header_parameter: Optional[List[str]] = None, **kwargs: Any) -> None: """Test explicitly optional integer. Please put a header 'headerParameter' => null. :param header_parameter: Default value is None. @@ -1446,7 +1404,7 @@ async def post_optional_array_header( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_implicit_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_implicit_operations.py index 87d9f640895..bb74a6a697c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_implicit_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_implicit_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar +from typing import Any, Callable, Dict, IO, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,9 +61,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_required_path( # pylint: disable=inconsistent-return-statements - self, path_parameter: str, **kwargs: Any - ) -> None: + async def get_required_path(self, path_parameter: str, **kwargs: Any) -> None: """Test implicitly required path parameter. :param path_parameter: Required. @@ -73,7 +70,7 @@ async def get_required_path( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -109,9 +106,7 @@ async def get_required_path( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_optional_query( # pylint: disable=inconsistent-return-statements - self, query_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def put_optional_query(self, query_parameter: Optional[str] = None, **kwargs: Any) -> None: """Test implicitly optional query parameter. :param query_parameter: Default value is None. @@ -120,7 +115,7 @@ async def put_optional_query( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -156,9 +151,7 @@ async def put_optional_query( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_optional_header( # pylint: disable=inconsistent-return-statements - self, query_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def put_optional_header(self, query_parameter: Optional[str] = None, **kwargs: Any) -> None: """Test implicitly optional header parameter. :param query_parameter: Default value is None. @@ -167,7 +160,7 @@ async def put_optional_header( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -203,9 +196,7 @@ async def put_optional_header( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_optional_body( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def put_optional_body(self, body_parameter: Optional[str] = None, **kwargs: Any) -> None: """Test implicitly optional body parameter. :param body_parameter: Default value is None. @@ -214,7 +205,7 @@ async def put_optional_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -257,9 +248,7 @@ async def put_optional_body( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_optional_binary_body( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[IO[bytes]] = None, **kwargs: Any - ) -> None: + async def put_optional_binary_body(self, body_parameter: Optional[IO[bytes]] = None, **kwargs: Any) -> None: """Test implicitly optional body parameter. :param body_parameter: Default value is None. @@ -268,7 +257,7 @@ async def put_optional_binary_body( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -308,14 +297,14 @@ async def put_optional_binary_body( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_required_global_path(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_required_global_path(self, **kwargs: Any) -> None: """Test implicitly required path parameter. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -351,14 +340,14 @@ async def get_required_global_path(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_required_global_query(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_required_global_query(self, **kwargs: Any) -> None: """Test implicitly required query parameter. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -394,14 +383,14 @@ async def get_required_global_query(self, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_optional_global_query(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_optional_global_query(self, **kwargs: Any) -> None: """Test implicitly optional query parameter. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/models/_models_py3.py index 35dbc720997..b5ef0ed3e28 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ import msrest.serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_explicit_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_explicit_operations.py index 2135c729105..c6b9254f29f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_explicit_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_explicit_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from msrest import Serializer @@ -30,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -485,7 +485,7 @@ def put_optional_binary_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -536,7 +536,7 @@ def put_required_binary_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -588,7 +588,7 @@ def post_required_integer_parameter( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -639,7 +639,7 @@ def post_optional_integer_parameter( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -694,7 +694,7 @@ def post_required_integer_property( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -746,7 +746,7 @@ def post_optional_integer_property( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -802,7 +802,7 @@ def post_required_integer_header( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -849,7 +849,7 @@ def post_optional_integer_header( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -897,7 +897,7 @@ def post_required_string_parameter( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -948,7 +948,7 @@ def post_optional_string_parameter( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1003,7 +1003,7 @@ def post_required_string_property( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1055,7 +1055,7 @@ def post_optional_string_property( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1111,7 +1111,7 @@ def post_required_string_header( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1158,7 +1158,7 @@ def post_optional_string_header( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1194,7 +1194,7 @@ def post_optional_string_header( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @overload - def post_required_class_parameter( # pylint: disable=inconsistent-return-statements + def post_required_class_parameter( self, body_parameter: _models.Product, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put null and the client library should throw @@ -1211,7 +1211,7 @@ def post_required_class_parameter( # pylint: disable=inconsistent-return-statem """ @overload - def post_required_class_parameter( # pylint: disable=inconsistent-return-statements + def post_required_class_parameter( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put null and the client library should throw @@ -1240,7 +1240,7 @@ def post_required_class_parameter( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1287,7 +1287,7 @@ def post_required_class_parameter( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @overload - def post_optional_class_parameter( # pylint: disable=inconsistent-return-statements + def post_optional_class_parameter( self, body_parameter: Optional[_models.Product] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put null. @@ -1303,7 +1303,7 @@ def post_optional_class_parameter( # pylint: disable=inconsistent-return-statem """ @overload - def post_optional_class_parameter( # pylint: disable=inconsistent-return-statements + def post_optional_class_parameter( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put null. @@ -1330,7 +1330,7 @@ def post_optional_class_parameter( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1392,7 +1392,7 @@ def post_required_class_property( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1444,7 +1444,7 @@ def post_optional_class_property( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1488,7 +1488,7 @@ def post_optional_class_property( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @overload - def post_required_array_parameter( # pylint: disable=inconsistent-return-statements + def post_required_array_parameter( self, body_parameter: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put null and the client library should throw before the @@ -1505,7 +1505,7 @@ def post_required_array_parameter( # pylint: disable=inconsistent-return-statem """ @overload - def post_required_array_parameter( # pylint: disable=inconsistent-return-statements + def post_required_array_parameter( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put null and the client library should throw before the @@ -1534,7 +1534,7 @@ def post_required_array_parameter( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1581,7 +1581,7 @@ def post_required_array_parameter( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @overload - def post_optional_array_parameter( # pylint: disable=inconsistent-return-statements + def post_optional_array_parameter( self, body_parameter: Optional[List[str]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put null. @@ -1597,7 +1597,7 @@ def post_optional_array_parameter( # pylint: disable=inconsistent-return-statem """ @overload - def post_optional_array_parameter( # pylint: disable=inconsistent-return-statements + def post_optional_array_parameter( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put null. @@ -1624,7 +1624,7 @@ def post_optional_array_parameter( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1686,7 +1686,7 @@ def post_required_array_property( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1738,7 +1738,7 @@ def post_optional_array_property( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1794,7 +1794,7 @@ def post_required_array_header( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1841,7 +1841,7 @@ def post_optional_array_header( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_implicit_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_implicit_operations.py index b0e8e49de18..4eb5d6bd495 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_implicit_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_implicit_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar +from typing import Any, Callable, Dict, IO, Optional, TypeVar from msrest import Serializer @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -213,7 +212,7 @@ def get_required_path( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -260,7 +259,7 @@ def put_optional_query( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -307,7 +306,7 @@ def put_optional_header( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -354,7 +353,7 @@ def put_optional_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -408,7 +407,7 @@ def put_optional_binary_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -455,7 +454,7 @@ def get_required_global_path(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -498,7 +497,7 @@ def get_required_global_query(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -541,7 +540,7 @@ def get_optional_global_query(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_configuration.py index deb4c9d08ed..987ae38e00f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ReservedWordsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ReservedWordsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ReservedWordsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_vendor.py index d403fc63b46..7cd90c432bd 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ReservedWordsClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_configuration.py index 7b375283093..05a449a435c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ReservedWordsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ReservedWordsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ReservedWordsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_vendor.py index 2d710d6e319..8640c639b98 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ReservedWordsClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/_import_operations_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/_import_operations_operations.py index 1834cb080bb..23d092562cc 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/_import_operations_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/_import_operations_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,7 +61,7 @@ async def operation_one(self, parameter1: str, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/_reserved_words_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/_reserved_words_client_operations.py index 33d623bb81a..0f6b3a96582 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/_reserved_words_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/_reserved_words_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +53,7 @@ async def operation_with_content_param(self, content: IO[bytes], **kwargs: Any) :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,7 +105,7 @@ async def operation_with_json_param(self, json: Any, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,7 +159,7 @@ async def operation_with_data_param(self, data: str, world: str, **kwargs: Any) :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,7 +219,7 @@ async def operation_with_files_param(self, files: IO[bytes], file_name: str, **k :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -285,7 +284,7 @@ async def operation_with_url( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -336,7 +335,7 @@ async def reserved_enum(self, enum_parameter: Union[str, _models.MyEnum], **kwar :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/models/_models_py3.py index f5c7755167d..8c2865473be 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/_import_operations_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/_import_operations_operations.py index e614dc53d8d..948711a0343 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/_import_operations_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/_import_operations_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +83,7 @@ def operation_one(self, parameter1: str, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/_reserved_words_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/_reserved_words_client_operations.py index 5ae1e30763f..3517138277f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/_reserved_words_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/_reserved_words_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -160,7 +159,7 @@ def operation_with_content_param(self, content: IO[bytes], **kwargs: Any) -> JSO :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -212,7 +211,7 @@ def operation_with_json_param(self, json: Any, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +265,7 @@ def operation_with_data_param(self, data: str, world: str, **kwargs: Any) -> JSO :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -326,7 +325,7 @@ def operation_with_files_param(self, files: IO[bytes], file_name: str, **kwargs: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -391,7 +390,7 @@ def operation_with_url( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -442,7 +441,7 @@ def reserved_enum(self, enum_parameter: Union[str, _models.MyEnum], **kwargs: An :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py index 494379ea7a5..4166d74ab09 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py @@ -19,7 +19,6 @@ from .operations import AutorestSecurityAadOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_configuration.py index 4acd6b7cf60..4b4746f4a94 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_configuration.py @@ -13,11 +13,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityAad. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_vendor.py index 307a2440f73..4bac3abea25 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityAadConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py index dbb463788a1..5cbd65bb0cb 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py @@ -19,7 +19,6 @@ from .operations import AutorestSecurityAadOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_configuration.py index 854e5f77399..3e146cc669c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_configuration.py @@ -13,11 +13,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityAad. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_vendor.py index 8e6e310bac2..3b07efefdc0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityAadConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/_autorest_security_aad_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/_autorest_security_aad_operations.py index bde4d784398..bdfc0f31055 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/_autorest_security_aad_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/_autorest_security_aad_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class AutorestSecurityAadOperationsMixin(AutorestSecurityAadMixinABC): @distributed_trace_async - async def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head(self, **kwargs: Any) -> None: """Operation. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/_autorest_security_aad_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/_autorest_security_aad_operations.py index a1b8ce7016b..2f106f3a4cf 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/_autorest_security_aad_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/_autorest_security_aad_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_vendor.py index bc2ebad1a2d..02ca98dcd44 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SecurityAadSwaggerCredentialFlagConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/_vendor.py index f93d4cba9e3..8097e6e5627 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SecurityAadSwaggerCredentialFlagConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/operations/_security_aad_swagger_credential_flag_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/operations/_security_aad_swagger_credential_flag_operations.py index 2c976949c0b..c4377a7254b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/operations/_security_aad_swagger_credential_flag_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/operations/_security_aad_swagger_credential_flag_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -37,14 +36,14 @@ class SecurityAadSwaggerCredentialFlagOperationsMixin( # pylint: disable=name-t ): @distributed_trace_async - async def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head(self, **kwargs: Any) -> None: """Operation. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/operations/_security_aad_swagger_credential_flag_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/operations/_security_aad_swagger_credential_flag_operations.py index 0e0ace122f9..f0f45f6a8e5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/operations/_security_aad_swagger_credential_flag_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/operations/_security_aad_swagger_credential_flag_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +53,7 @@ def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_configuration.py index 7f96e9d6302..a0e36b755ff 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityKey. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_vendor.py index 9fb96a324c5..d615edd04da 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityKeyConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_configuration.py index e1106014afb..be30d74d10e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityKey. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_vendor.py index 7b331844629..cf209892619 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityKeyConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/_autorest_security_key_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/_autorest_security_key_operations.py index 3a2bfb09775..ea5e8f4efb9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/_autorest_security_key_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/_autorest_security_key_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class AutorestSecurityKeyOperationsMixin(AutorestSecurityKeyMixinABC): @distributed_trace_async - async def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head(self, **kwargs: Any) -> None: """Operation. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/_autorest_security_key_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/_autorest_security_key_operations.py index 7ccdbcabd07..1456357d618 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/_autorest_security_key_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/_autorest_security_key_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_configuration.py index ce86f241d3e..708c7be80b8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_configuration.py @@ -13,7 +13,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_security_key_swagger_credential_flag.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_security_key_swagger_credential_flag.py index e5c4a40e79f..2273d89c1c9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_security_key_swagger_credential_flag.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_security_key_swagger_credential_flag.py @@ -19,7 +19,6 @@ from .operations import SecurityKeySwaggerCredentialFlagOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_vendor.py index 4a233605917..aa041ecd52b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SecurityKeySwaggerCredentialFlagConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_configuration.py index aac50d01ff9..e3b1ac6cf4c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_configuration.py @@ -13,7 +13,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_security_key_swagger_credential_flag.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_security_key_swagger_credential_flag.py index 537dd527790..7e153112c8f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_security_key_swagger_credential_flag.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_security_key_swagger_credential_flag.py @@ -19,7 +19,6 @@ from .operations import SecurityKeySwaggerCredentialFlagOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_vendor.py index c9bea806ed6..db1ac1a406a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SecurityKeySwaggerCredentialFlagConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/operations/_security_key_swagger_credential_flag_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/operations/_security_key_swagger_credential_flag_operations.py index da3f02f4044..1509d33c767 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/operations/_security_key_swagger_credential_flag_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/operations/_security_key_swagger_credential_flag_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -37,14 +36,14 @@ class SecurityKeySwaggerCredentialFlagOperationsMixin( # pylint: disable=name-t ): @distributed_trace_async - async def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head(self, **kwargs: Any) -> None: """Operation. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/operations/_security_key_swagger_credential_flag_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/operations/_security_key_swagger_credential_flag_operations.py index cac6f22676a..a0bbf42dd20 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/operations/_security_key_swagger_credential_flag_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/operations/_security_key_swagger_credential_flag_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +53,7 @@ def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/_configuration.py index 5fe83d5fb83..851a054b79a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestUrlTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestUrlTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestUrlTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/_configuration.py index 330484d01ce..2aa7e05c074 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestUrlTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestUrlTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestUrlTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_path_items_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_path_items_operations.py index 6573354ab48..5d1ba997128 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_path_items_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_path_items_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_all_with_values( # pylint: disable=inconsistent-return-statements + async def get_all_with_values( self, path_item_string_path: str, local_string_path: str, @@ -83,7 +82,7 @@ async def get_all_with_values( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -124,7 +123,7 @@ async def get_all_with_values( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_global_query_null( # pylint: disable=inconsistent-return-statements + async def get_global_query_null( self, path_item_string_path: str, local_string_path: str, @@ -150,7 +149,7 @@ async def get_global_query_null( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -191,7 +190,7 @@ async def get_global_query_null( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_global_and_local_query_null( # pylint: disable=inconsistent-return-statements + async def get_global_and_local_query_null( self, path_item_string_path: str, local_string_path: str, @@ -217,7 +216,7 @@ async def get_global_and_local_query_null( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -258,7 +257,7 @@ async def get_global_and_local_query_null( # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_local_path_item_query_null( # pylint: disable=inconsistent-return-statements + async def get_local_path_item_query_null( self, path_item_string_path: str, local_string_path: str, @@ -283,7 +282,7 @@ async def get_local_path_item_query_null( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_paths_operations.py index bc4db542181..7c39c79ab81 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_paths_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -56,7 +56,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,14 +81,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_boolean_true(self, **kwargs: Any) -> None: """Get true Boolean value on path. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -125,14 +125,14 @@ async def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inco return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_boolean_false(self, **kwargs: Any) -> None: """Get false Boolean value on path. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -169,14 +169,14 @@ async def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inc return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_int_one_million(self, **kwargs: Any) -> None: """Get '1000000' integer value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -213,16 +213,14 @@ async def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=i return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_int_negative_one_million( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_int_negative_one_million(self, **kwargs: Any) -> None: """Get '-1000000' integer value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -259,14 +257,14 @@ async def get_int_negative_one_million( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_ten_billion(self, **kwargs: Any) -> None: """Get '10000000000' 64 bit integer value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,14 +301,14 @@ async def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=incon return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_negative_ten_billion(self, **kwargs: Any) -> None: """Get '-10000000000' 64 bit integer value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -347,14 +345,14 @@ async def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def float_scientific_positive(self, **kwargs: Any) -> None: """Get '1.034E+20' numeric value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -391,14 +389,14 @@ async def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def float_scientific_negative(self, **kwargs: Any) -> None: """Get '-1.034E-20' numeric value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -435,14 +433,14 @@ async def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def double_decimal_positive(self, **kwargs: Any) -> None: """Get '9999999.999' numeric value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -479,14 +477,14 @@ async def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def double_decimal_negative(self, **kwargs: Any) -> None: """Get '-9999999.999' numeric value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -523,14 +521,14 @@ async def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_unicode(self, **kwargs: Any) -> None: """Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -567,14 +565,14 @@ async def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=incons return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_url_encoded(self, **kwargs: Any) -> None: """Get 'begin!*'();:@ &=+$,/?#[]end. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -611,7 +609,7 @@ async def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=in return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_url_non_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_url_non_encoded(self, **kwargs: Any) -> None: """Get 'begin!*'();:@&=+$,end. https://tools.ietf.org/html/rfc3986#appendix-A 'path' accept any 'pchar' not encoded. @@ -620,7 +618,7 @@ async def string_url_non_encoded(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -657,14 +655,14 @@ async def string_url_non_encoded(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_empty(self, **kwargs: Any) -> None: """Get ''. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -701,9 +699,7 @@ async def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_null( # pylint: disable=inconsistent-return-statements - self, string_path: str, **kwargs: Any - ) -> None: + async def string_null(self, string_path: str, **kwargs: Any) -> None: """Get null (should throw). :param string_path: null string value. Required. @@ -712,7 +708,7 @@ async def string_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -748,9 +744,7 @@ async def string_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def enum_valid( # pylint: disable=inconsistent-return-statements - self, enum_path: Union[str, _models.UriColor], **kwargs: Any - ) -> None: + async def enum_valid(self, enum_path: Union[str, _models.UriColor], **kwargs: Any) -> None: """Get using uri with 'green color' in path parameter. :param enum_path: send the value green. Known values are: "red color", "green color", and "blue @@ -760,7 +754,7 @@ async def enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -796,9 +790,7 @@ async def enum_valid( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def enum_null( # pylint: disable=inconsistent-return-statements - self, enum_path: Union[str, _models.UriColor], **kwargs: Any - ) -> None: + async def enum_null(self, enum_path: Union[str, _models.UriColor], **kwargs: Any) -> None: """Get null (should throw on the client before the request is sent on wire). :param enum_path: send null should throw. Known values are: "red color", "green color", and @@ -808,7 +800,7 @@ async def enum_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -844,9 +836,7 @@ async def enum_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_multi_byte( # pylint: disable=inconsistent-return-statements - self, byte_path: bytes, **kwargs: Any - ) -> None: + async def byte_multi_byte(self, byte_path: bytes, **kwargs: Any) -> None: """Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array. :param byte_path: '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array. Required. @@ -855,7 +845,7 @@ async def byte_multi_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -891,14 +881,14 @@ async def byte_multi_byte( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def byte_empty(self, **kwargs: Any) -> None: """Get '' as byte array. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -935,9 +925,7 @@ async def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_null( # pylint: disable=inconsistent-return-statements - self, byte_path: bytes, **kwargs: Any - ) -> None: + async def byte_null(self, byte_path: bytes, **kwargs: Any) -> None: """Get null as byte array (should throw). :param byte_path: null as byte array (should throw). Required. @@ -946,7 +934,7 @@ async def byte_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -982,14 +970,14 @@ async def byte_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def date_valid(self, **kwargs: Any) -> None: """Get '2012-01-01' as date. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1026,9 +1014,7 @@ async def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_null( # pylint: disable=inconsistent-return-statements - self, date_path: datetime.date, **kwargs: Any - ) -> None: + async def date_null(self, date_path: datetime.date, **kwargs: Any) -> None: """Get null as date - this should throw or be unusable on the client side, depending on date representation. @@ -1038,7 +1024,7 @@ async def date_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1074,14 +1060,14 @@ async def date_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def date_time_valid(self, **kwargs: Any) -> None: """Get '2012-01-01T01:01:01Z' as date-time. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1118,9 +1104,7 @@ async def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=incon return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_time_null( # pylint: disable=inconsistent-return-statements - self, date_time_path: datetime.datetime, **kwargs: Any - ) -> None: + async def date_time_null(self, date_time_path: datetime.datetime, **kwargs: Any) -> None: """Get null as date-time, should be disallowed or throw depending on representation of date-time. :param date_time_path: null as date-time. Required. @@ -1129,7 +1113,7 @@ async def date_time_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1165,9 +1149,7 @@ async def date_time_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def base64_url( # pylint: disable=inconsistent-return-statements - self, base64_url_path: bytes, **kwargs: Any - ) -> None: + async def base64_url(self, base64_url_path: bytes, **kwargs: Any) -> None: """Get 'lorem' encoded value as 'bG9yZW0' (base64url). :param base64_url_path: base64url encoded value. Required. @@ -1176,7 +1158,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1212,9 +1194,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_csv_in_path( # pylint: disable=inconsistent-return-statements - self, array_path: List[str], **kwargs: Any - ) -> None: + async def array_csv_in_path(self, array_path: List[str], **kwargs: Any) -> None: """Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format. @@ -1225,7 +1205,7 @@ async def array_csv_in_path( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1261,9 +1241,7 @@ async def array_csv_in_path( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def unix_time_url( # pylint: disable=inconsistent-return-statements - self, unix_time_url_path: datetime.datetime, **kwargs: Any - ) -> None: + async def unix_time_url(self, unix_time_url_path: datetime.datetime, **kwargs: Any) -> None: """Get the date 2016-04-13 encoded value as '1460505600' (Unix time). :param unix_time_url_path: Unix time encoded value. Required. @@ -1272,7 +1250,7 @@ async def unix_time_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_queries_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_queries_operations.py index bb27af5bdba..d97eef14fe3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_queries_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_queries_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -65,7 +65,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -90,14 +90,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_boolean_true(self, **kwargs: Any) -> None: """Get true Boolean value on path. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,14 +134,14 @@ async def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inco return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_boolean_false(self, **kwargs: Any) -> None: """Get false Boolean value on path. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -178,9 +178,7 @@ async def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inc return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_boolean_null( # pylint: disable=inconsistent-return-statements - self, bool_query: Optional[bool] = None, **kwargs: Any - ) -> None: + async def get_boolean_null(self, bool_query: Optional[bool] = None, **kwargs: Any) -> None: """Get null Boolean value on query (query string should be absent). :param bool_query: null boolean value. Default value is None. @@ -189,7 +187,7 @@ async def get_boolean_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,14 +223,14 @@ async def get_boolean_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_int_one_million(self, **kwargs: Any) -> None: """Get '1000000' integer value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -269,16 +267,14 @@ async def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=i return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_int_negative_one_million( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_int_negative_one_million(self, **kwargs: Any) -> None: """Get '-1000000' integer value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -315,9 +311,7 @@ async def get_int_negative_one_million( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_int_null( # pylint: disable=inconsistent-return-statements - self, int_query: Optional[int] = None, **kwargs: Any - ) -> None: + async def get_int_null(self, int_query: Optional[int] = None, **kwargs: Any) -> None: """Get null integer value (no query parameter). :param int_query: null integer value. Default value is None. @@ -326,7 +320,7 @@ async def get_int_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -362,14 +356,14 @@ async def get_int_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_ten_billion(self, **kwargs: Any) -> None: """Get '10000000000' 64 bit integer value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -406,14 +400,14 @@ async def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=incon return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_negative_ten_billion(self, **kwargs: Any) -> None: """Get '-10000000000' 64 bit integer value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -450,9 +444,7 @@ async def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_long_null( # pylint: disable=inconsistent-return-statements - self, long_query: Optional[int] = None, **kwargs: Any - ) -> None: + async def get_long_null(self, long_query: Optional[int] = None, **kwargs: Any) -> None: """Get 'null 64 bit integer value (no query param in uri). :param long_query: null 64 bit integer value. Default value is None. @@ -461,7 +453,7 @@ async def get_long_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -497,14 +489,14 @@ async def get_long_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def float_scientific_positive(self, **kwargs: Any) -> None: """Get '1.034E+20' numeric value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -541,14 +533,14 @@ async def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def float_scientific_negative(self, **kwargs: Any) -> None: """Get '-1.034E-20' numeric value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -585,9 +577,7 @@ async def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_null( # pylint: disable=inconsistent-return-statements - self, float_query: Optional[float] = None, **kwargs: Any - ) -> None: + async def float_null(self, float_query: Optional[float] = None, **kwargs: Any) -> None: """Get null numeric value (no query parameter). :param float_query: null numeric value. Default value is None. @@ -596,7 +586,7 @@ async def float_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -632,14 +622,14 @@ async def float_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def double_decimal_positive(self, **kwargs: Any) -> None: """Get '9999999.999' numeric value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -676,14 +666,14 @@ async def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def double_decimal_negative(self, **kwargs: Any) -> None: """Get '-9999999.999' numeric value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -720,9 +710,7 @@ async def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def double_null( # pylint: disable=inconsistent-return-statements - self, double_query: Optional[float] = None, **kwargs: Any - ) -> None: + async def double_null(self, double_query: Optional[float] = None, **kwargs: Any) -> None: """Get null numeric value (no query parameter). :param double_query: null numeric value. Default value is None. @@ -731,7 +719,7 @@ async def double_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,14 +755,14 @@ async def double_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_unicode(self, **kwargs: Any) -> None: """Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -813,14 +801,14 @@ async def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=incons return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_url_encoded(self, **kwargs: Any) -> None: """Get 'begin!*'();:@ &=+$,/?#[]end. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -859,14 +847,14 @@ async def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=in return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_empty(self, **kwargs: Any) -> None: """Get ''. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -903,9 +891,7 @@ async def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_null( # pylint: disable=inconsistent-return-statements - self, string_query: Optional[str] = None, **kwargs: Any - ) -> None: + async def string_null(self, string_query: Optional[str] = None, **kwargs: Any) -> None: """Get null (no query parameter in url). :param string_query: null string value. Default value is None. @@ -914,7 +900,7 @@ async def string_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -950,9 +936,7 @@ async def string_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def enum_valid( # pylint: disable=inconsistent-return-statements - self, enum_query: Optional[Union[str, _models.UriColor]] = None, **kwargs: Any - ) -> None: + async def enum_valid(self, enum_query: Optional[Union[str, _models.UriColor]] = None, **kwargs: Any) -> None: """Get using uri with query parameter 'green color'. :param enum_query: 'green color' enum value. Known values are: "red color", "green color", and @@ -962,7 +946,7 @@ async def enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -998,9 +982,7 @@ async def enum_valid( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def enum_null( # pylint: disable=inconsistent-return-statements - self, enum_query: Optional[Union[str, _models.UriColor]] = None, **kwargs: Any - ) -> None: + async def enum_null(self, enum_query: Optional[Union[str, _models.UriColor]] = None, **kwargs: Any) -> None: """Get null (no query parameter in url). :param enum_query: null string value. Known values are: "red color", "green color", and "blue @@ -1010,7 +992,7 @@ async def enum_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1046,9 +1028,7 @@ async def enum_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_multi_byte( # pylint: disable=inconsistent-return-statements - self, byte_query: Optional[bytes] = None, **kwargs: Any - ) -> None: + async def byte_multi_byte(self, byte_query: Optional[bytes] = None, **kwargs: Any) -> None: """Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array. :param byte_query: '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array. Default value is @@ -1058,7 +1038,7 @@ async def byte_multi_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1094,14 +1074,14 @@ async def byte_multi_byte( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def byte_empty(self, **kwargs: Any) -> None: """Get '' as byte array. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1138,9 +1118,7 @@ async def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_null( # pylint: disable=inconsistent-return-statements - self, byte_query: Optional[bytes] = None, **kwargs: Any - ) -> None: + async def byte_null(self, byte_query: Optional[bytes] = None, **kwargs: Any) -> None: """Get null as byte array (no query parameters in uri). :param byte_query: null as byte array (no query parameters in uri). Default value is None. @@ -1149,7 +1127,7 @@ async def byte_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1185,14 +1163,14 @@ async def byte_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def date_valid(self, **kwargs: Any) -> None: """Get '2012-01-01' as date. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1229,9 +1207,7 @@ async def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_null( # pylint: disable=inconsistent-return-statements - self, date_query: Optional[datetime.date] = None, **kwargs: Any - ) -> None: + async def date_null(self, date_query: Optional[datetime.date] = None, **kwargs: Any) -> None: """Get null as date - this should result in no query parameters in uri. :param date_query: null as date (no query parameters in uri). Default value is None. @@ -1240,7 +1216,7 @@ async def date_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1276,14 +1252,14 @@ async def date_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def date_time_valid(self, **kwargs: Any) -> None: """Get '2012-01-01T01:01:01Z' as date-time. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1322,9 +1298,7 @@ async def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=incon return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_time_null( # pylint: disable=inconsistent-return-statements - self, date_time_query: Optional[datetime.datetime] = None, **kwargs: Any - ) -> None: + async def date_time_null(self, date_time_query: Optional[datetime.datetime] = None, **kwargs: Any) -> None: """Get null as date-time, should result in no query parameters in uri. :param date_time_query: null as date-time (no query parameters). Default value is None. @@ -1333,7 +1307,7 @@ async def date_time_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1369,9 +1343,7 @@ async def date_time_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_csv_valid( # pylint: disable=inconsistent-return-statements - self, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_csv_valid(self, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format. @@ -1382,7 +1354,7 @@ async def array_string_csv_valid( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1418,9 +1390,7 @@ async def array_string_csv_valid( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_csv_null( # pylint: disable=inconsistent-return-statements - self, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_csv_null(self, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get a null array of string using the csv-array format. :param array_query: a null array of string using the csv-array format. Default value is None. @@ -1429,7 +1399,7 @@ async def array_string_csv_null( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1465,9 +1435,7 @@ async def array_string_csv_null( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_csv_empty( # pylint: disable=inconsistent-return-statements - self, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_csv_empty(self, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an empty array [] of string using the csv-array format. :param array_query: an empty array [] of string using the csv-array format. Default value is @@ -1477,7 +1445,7 @@ async def array_string_csv_empty( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1513,7 +1481,7 @@ async def array_string_csv_empty( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_no_collection_format_empty( # pylint: disable=inconsistent-return-statements + async def array_string_no_collection_format_empty( self, array_query: Optional[List[str]] = None, **kwargs: Any ) -> None: """Array query has no defined collection format, should default to csv. Pass in ['hello', 'nihao', @@ -1526,7 +1494,7 @@ async def array_string_no_collection_format_empty( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1562,9 +1530,7 @@ async def array_string_no_collection_format_empty( # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_ssv_valid( # pylint: disable=inconsistent-return-statements - self, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_ssv_valid(self, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the ssv-array format. @@ -1575,7 +1541,7 @@ async def array_string_ssv_valid( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1611,9 +1577,7 @@ async def array_string_ssv_valid( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_tsv_valid( # pylint: disable=inconsistent-return-statements - self, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_tsv_valid(self, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the tsv-array format. @@ -1624,7 +1588,7 @@ async def array_string_tsv_valid( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1660,9 +1624,7 @@ async def array_string_tsv_valid( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_pipes_valid( # pylint: disable=inconsistent-return-statements - self, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_pipes_valid(self, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the pipes-array format. @@ -1673,7 +1635,7 @@ async def array_string_pipes_valid( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/models/_models_py3.py index dee497e2600..68d3f5cbdf3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_path_items_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_path_items_operations.py index 2d0d0669006..9fbc5bc4f04 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_path_items_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_path_items_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from msrest import Serializer @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -250,7 +249,7 @@ def get_all_with_values( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -317,7 +316,7 @@ def get_global_query_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -384,7 +383,7 @@ def get_global_and_local_query_null( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -450,7 +449,7 @@ def get_local_path_item_query_null( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_paths_operations.py index b7ac6d2c7b4..9b39ce3a9e4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_paths_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar, Union from msrest import Serializer @@ -30,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -599,7 +599,7 @@ def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +643,7 @@ def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -687,7 +687,7 @@ def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=inconsi :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -731,7 +731,7 @@ def get_int_negative_one_million(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -775,7 +775,7 @@ def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -819,7 +819,7 @@ def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -863,7 +863,7 @@ def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -907,7 +907,7 @@ def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -951,7 +951,7 @@ def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,7 +995,7 @@ def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1039,7 +1039,7 @@ def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1083,7 +1083,7 @@ def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1129,7 +1129,7 @@ def string_url_non_encoded(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1173,7 +1173,7 @@ def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1219,7 +1219,7 @@ def string_null(self, string_path: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1267,7 +1267,7 @@ def enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1315,7 +1315,7 @@ def enum_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1362,7 +1362,7 @@ def byte_multi_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1405,7 +1405,7 @@ def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1451,7 +1451,7 @@ def byte_null(self, byte_path: bytes, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1494,7 +1494,7 @@ def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1543,7 +1543,7 @@ def date_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1586,7 +1586,7 @@ def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1634,7 +1634,7 @@ def date_time_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1681,7 +1681,7 @@ def base64_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1730,7 +1730,7 @@ def array_csv_in_path( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1777,7 +1777,7 @@ def unix_time_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_queries_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_queries_operations.py index 039498c16ee..417fa5848d5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_queries_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_queries_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar, Union from msrest import Serializer @@ -30,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -741,7 +741,7 @@ def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -833,7 +833,7 @@ def get_boolean_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -876,7 +876,7 @@ def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=inconsi :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -920,7 +920,7 @@ def get_int_negative_one_million(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +968,7 @@ def get_int_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1011,7 +1011,7 @@ def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1055,7 +1055,7 @@ def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1103,7 +1103,7 @@ def get_long_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1146,7 +1146,7 @@ def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1190,7 +1190,7 @@ def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1238,7 +1238,7 @@ def float_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1281,7 +1281,7 @@ def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1325,7 +1325,7 @@ def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1373,7 +1373,7 @@ def double_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1416,7 +1416,7 @@ def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1462,7 +1462,7 @@ def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1508,7 +1508,7 @@ def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1556,7 +1556,7 @@ def string_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1604,7 +1604,7 @@ def enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1652,7 +1652,7 @@ def enum_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1700,7 +1700,7 @@ def byte_multi_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1743,7 +1743,7 @@ def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1791,7 +1791,7 @@ def byte_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1834,7 +1834,7 @@ def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1882,7 +1882,7 @@ def date_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1925,7 +1925,7 @@ def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1975,7 +1975,7 @@ def date_time_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2024,7 +2024,7 @@ def array_string_csv_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2071,7 +2071,7 @@ def array_string_csv_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2119,7 +2119,7 @@ def array_string_csv_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2168,7 +2168,7 @@ def array_string_no_collection_format_empty( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2217,7 +2217,7 @@ def array_string_ssv_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2266,7 +2266,7 @@ def array_string_tsv_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2315,7 +2315,7 @@ def array_string_pipes_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/_auto_rest_url_mutli_collection_format_test_service.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/_auto_rest_url_mutli_collection_format_test_service.py index 28447d8d0e9..3a9747fd300 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/_auto_rest_url_mutli_collection_format_test_service.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/_auto_rest_url_mutli_collection_format_test_service.py @@ -20,7 +20,7 @@ from .operations import QueriesOperations -class AutoRestUrlMutliCollectionFormatTestService: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestUrlMutliCollectionFormatTestService: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar queries: QueriesOperations operations diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/_auto_rest_url_mutli_collection_format_test_service.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/_auto_rest_url_mutli_collection_format_test_service.py index d1bd6bf0ffd..e38c86e2c54 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/_auto_rest_url_mutli_collection_format_test_service.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/_auto_rest_url_mutli_collection_format_test_service.py @@ -20,7 +20,7 @@ from .operations import QueriesOperations -class AutoRestUrlMutliCollectionFormatTestService: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestUrlMutliCollectionFormatTestService: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar queries: QueriesOperations operations diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/operations/_queries_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/operations/_queries_operations.py index 050dea5e5f1..07baaadf5d6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/operations/_queries_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/operations/_queries_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,9 +55,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def array_string_multi_null( # pylint: disable=inconsistent-return-statements - self, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_multi_null(self, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get a null array of string using the multi-array format. :param array_query: a null array of string using the multi-array format. Default value is None. @@ -67,7 +64,7 @@ async def array_string_multi_null( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -103,9 +100,7 @@ async def array_string_multi_null( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_multi_empty( # pylint: disable=inconsistent-return-statements - self, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_multi_empty(self, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an empty array [] of string using the multi-array format. :param array_query: an empty array [] of string using the multi-array format. Default value is @@ -115,7 +110,7 @@ async def array_string_multi_empty( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -151,9 +146,7 @@ async def array_string_multi_empty( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_multi_valid( # pylint: disable=inconsistent-return-statements - self, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_multi_valid(self, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the mult-array format. @@ -164,7 +157,7 @@ async def array_string_multi_valid( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/models/_models_py3.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/operations/_queries_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/operations/_queries_operations.py index cb1e6b6b0a0..b6fe3effb32 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/operations/_queries_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/operations/_queries_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -130,7 +129,7 @@ def array_string_multi_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -178,7 +177,7 @@ def array_string_multi_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -227,7 +226,7 @@ def array_string_multi_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_auto_rest_validation_test.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_auto_rest_validation_test.py index 89d656c6c6b..44966018569 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_auto_rest_validation_test.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_auto_rest_validation_test.py @@ -21,9 +21,7 @@ from .operations import AutoRestValidationTestOperationsMixin -class AutoRestValidationTest( - AutoRestValidationTestOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class AutoRestValidationTest(AutoRestValidationTestOperationsMixin): """Test Infrastructure for AutoRest. No server backend exists for these tests. :param subscription_id: Subscription ID. Required. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_configuration.py index 9aabe906e80..1add1aba060 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestValidationTestConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestValidationTestConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestValidationTest. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_vendor.py index 296ecb35e57..256be7d1e1c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestValidationTestConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from msrest import Deserializer, Serializer from azure.core import PipelineClient diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_auto_rest_validation_test.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_auto_rest_validation_test.py index 8c0393078c3..7736f8e6b55 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_auto_rest_validation_test.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_auto_rest_validation_test.py @@ -21,9 +21,7 @@ from .operations import AutoRestValidationTestOperationsMixin -class AutoRestValidationTest( - AutoRestValidationTestOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class AutoRestValidationTest(AutoRestValidationTestOperationsMixin): """Test Infrastructure for AutoRest. No server backend exists for these tests. :param subscription_id: Subscription ID. Required. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_configuration.py index 76419c45e03..6e21549ae9c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestValidationTestConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestValidationTestConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestValidationTest. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_vendor.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_vendor.py index 3d120f48d9e..5d41397de95 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestValidationTestConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from msrest import Deserializer, Serializer from azure.core import AsyncPipelineClient diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/_auto_rest_validation_test_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/_auto_rest_validation_test_operations.py index cde0ef1bf1f..6f2d968a256 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/_auto_rest_validation_test_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/_auto_rest_validation_test_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def validation_of_method_parameters( :rtype: ~validation.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -171,7 +170,7 @@ async def validation_of_body( :rtype: ~validation.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -230,14 +229,14 @@ async def validation_of_body( return deserialized # type: ignore @distributed_trace_async - async def get_with_constant_in_path(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_with_constant_in_path(self, **kwargs: Any) -> None: """get_with_constant_in_path. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -316,7 +315,7 @@ async def post_with_constant_in_body( :rtype: ~validation.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/models/_models_py3.py index b1864ae9dbd..9722f402934 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ import msrest.serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/_auto_rest_validation_test_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/_auto_rest_validation_test_operations.py index 83cacae0eea..e71f179061f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/_auto_rest_validation_test_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/_auto_rest_validation_test_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload from msrest import Serializer @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -152,7 +151,7 @@ def validation_of_method_parameters(self, resource_group_name: str, id: int, **k :rtype: ~validation.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +265,7 @@ def validation_of_body( :rtype: ~validation.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -332,7 +331,7 @@ def get_with_constant_in_path(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -411,7 +410,7 @@ def post_with_constant_in_body( :rtype: ~validation.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/aio/operations/_xml_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/aio/operations/_xml_operations.py index 7baeea22291..3309fb87a6c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/aio/operations/_xml_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/aio/operations/_xml_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -63,7 +63,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -95,7 +95,7 @@ async def get_complex_type_ref_no_meta(self, **kwargs: Any) -> _models.RootWithR :rtype: ~xmlservice.models.RootWithRefAndNoMeta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -133,9 +133,7 @@ async def get_complex_type_ref_no_meta(self, **kwargs: Any) -> _models.RootWithR return deserialized # type: ignore @distributed_trace_async - async def put_complex_type_ref_no_meta( # pylint: disable=inconsistent-return-statements - self, model: _models.RootWithRefAndNoMeta, **kwargs: Any - ) -> None: + async def put_complex_type_ref_no_meta(self, model: _models.RootWithRefAndNoMeta, **kwargs: Any) -> None: """Puts a complex type that has a ref to a complex type with no XML node. :param model: Required. @@ -144,7 +142,7 @@ async def put_complex_type_ref_no_meta( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -190,7 +188,7 @@ async def get_complex_type_ref_with_meta(self, **kwargs: Any) -> _models.RootWit :rtype: ~xmlservice.models.RootWithRefAndMeta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -228,9 +226,7 @@ async def get_complex_type_ref_with_meta(self, **kwargs: Any) -> _models.RootWit return deserialized # type: ignore @distributed_trace_async - async def put_complex_type_ref_with_meta( # pylint: disable=inconsistent-return-statements - self, model: _models.RootWithRefAndMeta, **kwargs: Any - ) -> None: + async def put_complex_type_ref_with_meta(self, model: _models.RootWithRefAndMeta, **kwargs: Any) -> None: """Puts a complex type that has a ref to a complex type with XML node. :param model: Required. @@ -239,7 +235,7 @@ async def put_complex_type_ref_with_meta( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -285,7 +281,7 @@ async def get_simple(self, **kwargs: Any) -> _models.Slideshow: :rtype: ~xmlservice.models.Slideshow :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -324,9 +320,7 @@ async def get_simple(self, **kwargs: Any) -> _models.Slideshow: return deserialized # type: ignore @distributed_trace_async - async def put_simple( # pylint: disable=inconsistent-return-statements - self, slideshow: _models.Slideshow, **kwargs: Any - ) -> None: + async def put_simple(self, slideshow: _models.Slideshow, **kwargs: Any) -> None: """Put a simple XML document. :param slideshow: Required. @@ -335,7 +329,7 @@ async def put_simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -382,7 +376,7 @@ async def get_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: :rtype: ~xmlservice.models.AppleBarrel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -420,9 +414,7 @@ async def get_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: return deserialized # type: ignore @distributed_trace_async - async def put_wrapped_lists( # pylint: disable=inconsistent-return-statements - self, wrapped_lists: _models.AppleBarrel, **kwargs: Any - ) -> None: + async def put_wrapped_lists(self, wrapped_lists: _models.AppleBarrel, **kwargs: Any) -> None: """Put an XML document with multiple wrapped lists. :param wrapped_lists: Required. @@ -431,7 +423,7 @@ async def put_wrapped_lists( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -471,14 +463,14 @@ async def put_wrapped_lists( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_headers(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_headers(self, **kwargs: Any) -> None: """Get strongly-typed response headers. :return: None or the result of cls(response) :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -522,7 +514,7 @@ async def get_empty_list(self, **kwargs: Any) -> _models.Slideshow: :rtype: ~xmlservice.models.Slideshow :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -560,9 +552,7 @@ async def get_empty_list(self, **kwargs: Any) -> _models.Slideshow: return deserialized # type: ignore @distributed_trace_async - async def put_empty_list( # pylint: disable=inconsistent-return-statements - self, slideshow: _models.Slideshow, **kwargs: Any - ) -> None: + async def put_empty_list(self, slideshow: _models.Slideshow, **kwargs: Any) -> None: """Puts an empty list. :param slideshow: Required. @@ -571,7 +561,7 @@ async def put_empty_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -617,7 +607,7 @@ async def get_empty_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: :rtype: ~xmlservice.models.AppleBarrel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -655,9 +645,7 @@ async def get_empty_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: return deserialized # type: ignore @distributed_trace_async - async def put_empty_wrapped_lists( # pylint: disable=inconsistent-return-statements - self, apple_barrel: _models.AppleBarrel, **kwargs: Any - ) -> None: + async def put_empty_wrapped_lists(self, apple_barrel: _models.AppleBarrel, **kwargs: Any) -> None: """Puts some empty wrapped lists. :param apple_barrel: Required. @@ -666,7 +654,7 @@ async def put_empty_wrapped_lists( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -712,7 +700,7 @@ async def get_root_list(self, **kwargs: Any) -> List[_models.Banana]: :rtype: list[~xmlservice.models.Banana] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -750,9 +738,7 @@ async def get_root_list(self, **kwargs: Any) -> List[_models.Banana]: return deserialized # type: ignore @distributed_trace_async - async def put_root_list( # pylint: disable=inconsistent-return-statements - self, bananas: List[_models.Banana], **kwargs: Any - ) -> None: + async def put_root_list(self, bananas: List[_models.Banana], **kwargs: Any) -> None: """Puts a list as the root element. :param bananas: Required. @@ -761,7 +747,7 @@ async def put_root_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -808,7 +794,7 @@ async def get_root_list_single_item(self, **kwargs: Any) -> List[_models.Banana] :rtype: list[~xmlservice.models.Banana] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -846,9 +832,7 @@ async def get_root_list_single_item(self, **kwargs: Any) -> List[_models.Banana] return deserialized # type: ignore @distributed_trace_async - async def put_root_list_single_item( # pylint: disable=inconsistent-return-statements - self, bananas: List[_models.Banana], **kwargs: Any - ) -> None: + async def put_root_list_single_item(self, bananas: List[_models.Banana], **kwargs: Any) -> None: """Puts a list with a single item. :param bananas: Required. @@ -857,7 +841,7 @@ async def put_root_list_single_item( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -904,7 +888,7 @@ async def get_empty_root_list(self, **kwargs: Any) -> List[_models.Banana]: :rtype: list[~xmlservice.models.Banana] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -942,9 +926,7 @@ async def get_empty_root_list(self, **kwargs: Any) -> List[_models.Banana]: return deserialized # type: ignore @distributed_trace_async - async def put_empty_root_list( # pylint: disable=inconsistent-return-statements - self, bananas: List[_models.Banana], **kwargs: Any - ) -> None: + async def put_empty_root_list(self, bananas: List[_models.Banana], **kwargs: Any) -> None: """Puts an empty list as the root element. :param bananas: Required. @@ -953,7 +935,7 @@ async def put_empty_root_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1000,7 +982,7 @@ async def get_empty_child_element(self, **kwargs: Any) -> _models.Banana: :rtype: ~xmlservice.models.Banana :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1038,9 +1020,7 @@ async def get_empty_child_element(self, **kwargs: Any) -> _models.Banana: return deserialized # type: ignore @distributed_trace_async - async def put_empty_child_element( # pylint: disable=inconsistent-return-statements - self, banana: _models.Banana, **kwargs: Any - ) -> None: + async def put_empty_child_element(self, banana: _models.Banana, **kwargs: Any) -> None: """Puts a value with an empty child element. :param banana: Required. @@ -1049,7 +1029,7 @@ async def put_empty_child_element( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1095,7 +1075,7 @@ async def list_containers(self, **kwargs: Any) -> _models.ListContainersResponse :rtype: ~xmlservice.models.ListContainersResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1142,7 +1122,7 @@ async def get_service_properties(self, **kwargs: Any) -> _models.StorageServiceP :rtype: ~xmlservice.models.StorageServiceProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1184,9 +1164,7 @@ async def get_service_properties(self, **kwargs: Any) -> _models.StorageServiceP return deserialized # type: ignore @distributed_trace_async - async def put_service_properties( # pylint: disable=inconsistent-return-statements - self, properties: _models.StorageServiceProperties, **kwargs: Any - ) -> None: + async def put_service_properties(self, properties: _models.StorageServiceProperties, **kwargs: Any) -> None: """Puts storage service properties. :param properties: Required. @@ -1195,7 +1173,7 @@ async def put_service_properties( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1245,7 +1223,7 @@ async def get_acls(self, **kwargs: Any) -> List[_models.SignedIdentifier]: :rtype: list[~xmlservice.models.SignedIdentifier] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1287,9 +1265,7 @@ async def get_acls(self, **kwargs: Any) -> List[_models.SignedIdentifier]: return deserialized # type: ignore @distributed_trace_async - async def put_acls( # pylint: disable=inconsistent-return-statements - self, properties: List[_models.SignedIdentifier], **kwargs: Any - ) -> None: + async def put_acls(self, properties: List[_models.SignedIdentifier], **kwargs: Any) -> None: """Puts storage ACLs for a container. :param properties: Required. @@ -1298,7 +1274,7 @@ async def put_acls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1351,7 +1327,7 @@ async def list_blobs(self, **kwargs: Any) -> _models.ListBlobsResponse: :rtype: ~xmlservice.models.ListBlobsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1393,9 +1369,7 @@ async def list_blobs(self, **kwargs: Any) -> _models.ListBlobsResponse: return deserialized # type: ignore @distributed_trace_async - async def json_input( # pylint: disable=inconsistent-return-statements - self, id: Optional[int] = None, **kwargs: Any - ) -> None: + async def json_input(self, id: Optional[int] = None, **kwargs: Any) -> None: """A Swagger with XML that has one operation that takes JSON as input. You need to send the ID number 42. @@ -1405,7 +1379,7 @@ async def json_input( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1452,7 +1426,7 @@ async def json_output(self, **kwargs: Any) -> _models.JSONOutput: :rtype: ~xmlservice.models.JSONOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1498,7 +1472,7 @@ async def get_xms_text(self, **kwargs: Any) -> _models.ObjectWithXMsTextProperty :rtype: ~xmlservice.models.ObjectWithXMsTextProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1543,7 +1517,7 @@ async def get_bytes(self, **kwargs: Any) -> _models.ModelWithByteProperty: :rtype: ~xmlservice.models.ModelWithByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1582,9 +1556,7 @@ async def get_bytes(self, **kwargs: Any) -> _models.ModelWithByteProperty: return deserialized # type: ignore @distributed_trace_async - async def put_binary( # pylint: disable=inconsistent-return-statements - self, bytes: Optional[bytes] = None, **kwargs: Any - ) -> None: + async def put_binary(self, bytes: Optional[bytes] = None, **kwargs: Any) -> None: """Put an XML document with binary property. :param bytes: Default value is None. @@ -1593,7 +1565,7 @@ async def put_binary( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1641,7 +1613,7 @@ async def get_uri(self, **kwargs: Any) -> _models.ModelWithUrlProperty: :rtype: ~xmlservice.models.ModelWithUrlProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1680,9 +1652,7 @@ async def get_uri(self, **kwargs: Any) -> _models.ModelWithUrlProperty: return deserialized # type: ignore @distributed_trace_async - async def put_uri( # pylint: disable=inconsistent-return-statements - self, url: Optional[str] = None, **kwargs: Any - ) -> None: + async def put_uri(self, url: Optional[str] = None, **kwargs: Any) -> None: """Put an XML document with uri property. :param url: Default value is None. @@ -1691,7 +1661,7 @@ async def put_uri( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/models/_models_py3.py index b2a670475b5..ccde1854e5f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/models/_models_py3.py @@ -1,5 +1,5 @@ -# coding=utf-8 # pylint: disable=too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +13,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/operations/_xml_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/operations/_xml_operations.py index 46dbbc50fea..2f214b196d2 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/operations/_xml_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/operations/_xml_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -588,7 +588,7 @@ def get_complex_type_ref_no_meta(self, **kwargs: Any) -> _models.RootWithRefAndN :rtype: ~xmlservice.models.RootWithRefAndNoMeta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -637,7 +637,7 @@ def put_complex_type_ref_no_meta( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -683,7 +683,7 @@ def get_complex_type_ref_with_meta(self, **kwargs: Any) -> _models.RootWithRefAn :rtype: ~xmlservice.models.RootWithRefAndMeta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -732,7 +732,7 @@ def put_complex_type_ref_with_meta( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -778,7 +778,7 @@ def get_simple(self, **kwargs: Any) -> _models.Slideshow: :rtype: ~xmlservice.models.Slideshow :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -828,7 +828,7 @@ def put_simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -875,7 +875,7 @@ def get_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: :rtype: ~xmlservice.models.AppleBarrel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -924,7 +924,7 @@ def put_wrapped_lists( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -971,7 +971,7 @@ def get_headers(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1015,7 +1015,7 @@ def get_empty_list(self, **kwargs: Any) -> _models.Slideshow: :rtype: ~xmlservice.models.Slideshow :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1064,7 +1064,7 @@ def put_empty_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1110,7 +1110,7 @@ def get_empty_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: :rtype: ~xmlservice.models.AppleBarrel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1159,7 +1159,7 @@ def put_empty_wrapped_lists( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1205,7 +1205,7 @@ def get_root_list(self, **kwargs: Any) -> List[_models.Banana]: :rtype: list[~xmlservice.models.Banana] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1254,7 +1254,7 @@ def put_root_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1301,7 +1301,7 @@ def get_root_list_single_item(self, **kwargs: Any) -> List[_models.Banana]: :rtype: list[~xmlservice.models.Banana] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1350,7 +1350,7 @@ def put_root_list_single_item( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1397,7 +1397,7 @@ def get_empty_root_list(self, **kwargs: Any) -> List[_models.Banana]: :rtype: list[~xmlservice.models.Banana] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1446,7 +1446,7 @@ def put_empty_root_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1493,7 +1493,7 @@ def get_empty_child_element(self, **kwargs: Any) -> _models.Banana: :rtype: ~xmlservice.models.Banana :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1542,7 +1542,7 @@ def put_empty_child_element( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1588,7 +1588,7 @@ def list_containers(self, **kwargs: Any) -> _models.ListContainersResponse: :rtype: ~xmlservice.models.ListContainersResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1635,7 +1635,7 @@ def get_service_properties(self, **kwargs: Any) -> _models.StorageServicePropert :rtype: ~xmlservice.models.StorageServiceProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1688,7 +1688,7 @@ def put_service_properties( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1738,7 +1738,7 @@ def get_acls(self, **kwargs: Any) -> List[_models.SignedIdentifier]: :rtype: list[~xmlservice.models.SignedIdentifier] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1791,7 +1791,7 @@ def put_acls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1844,7 +1844,7 @@ def list_blobs(self, **kwargs: Any) -> _models.ListBlobsResponse: :rtype: ~xmlservice.models.ListBlobsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1898,7 +1898,7 @@ def json_input( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1945,7 +1945,7 @@ def json_output(self, **kwargs: Any) -> _models.JSONOutput: :rtype: ~xmlservice.models.JSONOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1991,7 +1991,7 @@ def get_xms_text(self, **kwargs: Any) -> _models.ObjectWithXMsTextProperty: :rtype: ~xmlservice.models.ObjectWithXMsTextProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2036,7 +2036,7 @@ def get_bytes(self, **kwargs: Any) -> _models.ModelWithByteProperty: :rtype: ~xmlservice.models.ModelWithByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2086,7 +2086,7 @@ def put_binary( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2134,7 +2134,7 @@ def get_uri(self, **kwargs: Any) -> _models.ModelWithUrlProperty: :rtype: ~xmlservice.models.ModelWithUrlProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2184,7 +2184,7 @@ def put_uri( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/_configuration.py index d31a7f937b5..ca2eb8d20a9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class XMSErrorResponseExtensionsConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class XMSErrorResponseExtensionsConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for XMSErrorResponseExtensions. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/_serialization.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/_serialization.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/_configuration.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/_configuration.py index db7172a74a1..76e6f142c3f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class XMSErrorResponseExtensionsConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class XMSErrorResponseExtensionsConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for XMSErrorResponseExtensions. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/operations/_pet_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/operations/_pet_operations.py index 33dccf82a07..6398e7624ff 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/operations/_pet_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/operations/_pet_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -65,7 +64,7 @@ async def get_pet_by_id(self, pet_id: str, **kwargs: Any) -> Optional[_models.Pe :rtype: ~xmserrorresponse.models.Pet or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 409: ResourceExistsError, 304: ResourceNotModifiedError, @@ -122,7 +121,7 @@ async def do_something(self, what_action: str, **kwargs: Any) -> _models.PetActi :rtype: ~xmserrorresponse.models.PetAction :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -168,9 +167,7 @@ async def do_something(self, what_action: str, **kwargs: Any) -> _models.PetActi return deserialized # type: ignore @distributed_trace_async - async def has_models_param( # pylint: disable=inconsistent-return-statements - self, models: str = "value1", **kwargs: Any - ) -> None: + async def has_models_param(self, models: str = "value1", **kwargs: Any) -> None: """Ensure you can correctly deserialize the returned PetActionError and deserialization doesn't conflict with the input param name 'models'. @@ -181,7 +178,7 @@ async def has_models_param( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/models/_models_py3.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/models/_models_py3.py index 6543ff787f7..a13856aba89 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/models/_models_py3.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/operations/_pet_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/operations/_pet_operations.py index e82c661b8e5..1b50a5a433b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/operations/_pet_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/operations/_pet_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -122,7 +121,7 @@ def get_pet_by_id(self, pet_id: str, **kwargs: Any) -> Optional[_models.Pet]: :rtype: ~xmserrorresponse.models.Pet or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 409: ResourceExistsError, 304: ResourceNotModifiedError, @@ -179,7 +178,7 @@ def do_something(self, what_action: str, **kwargs: Any) -> _models.PetAction: :rtype: ~xmserrorresponse.models.PetAction :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -238,7 +237,7 @@ def has_models_param( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/_configuration.py index 487dd7fb058..983693b3bde 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AdditionalPropertiesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/aio/_configuration.py index 3f002c59bb5..b89dbc916f1 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AdditionalPropertiesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/aio/operations/_operations.py index 37c7937af3a..21cdaebb01e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -144,7 +143,7 @@ async def create_ap_true(self, create_parameters: Union[JSON, IO[bytes]], **kwar "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -287,7 +286,7 @@ async def create_cat_ap_true(self, create_parameters: Union[JSON, IO[bytes]], ** "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -425,7 +424,7 @@ async def create_ap_object(self, create_parameters: Union[JSON, IO[bytes]], **kw "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -563,7 +562,7 @@ async def create_ap_string(self, create_parameters: Union[JSON, IO[bytes]], **kw "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -701,7 +700,7 @@ async def create_ap_in_properties(self, create_parameters: Union[JSON, IO[bytes] "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -861,7 +860,7 @@ async def create_ap_in_properties_with_ap_string( "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/operations/_operations.py index 8a1a460f116..4dae0609e98 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/additionalpropertiesversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -242,7 +242,7 @@ def create_ap_true(self, create_parameters: Union[JSON, IO[bytes]], **kwargs: An "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -385,7 +385,7 @@ def create_cat_ap_true(self, create_parameters: Union[JSON, IO[bytes]], **kwargs "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -523,7 +523,7 @@ def create_ap_object(self, create_parameters: Union[JSON, IO[bytes]], **kwargs: "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -661,7 +661,7 @@ def create_ap_string(self, create_parameters: Union[JSON, IO[bytes]], **kwargs: "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -799,7 +799,7 @@ def create_ap_in_properties(self, create_parameters: Union[JSON, IO[bytes]], **k "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -957,7 +957,7 @@ def create_ap_in_properties_with_ap_string(self, create_parameters: Union[JSON, "status": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_operations/_operations.py index bac954e418d..d081855ed58 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -131,7 +130,7 @@ def get_object(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -228,7 +227,7 @@ def get_string(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -279,7 +278,7 @@ def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -325,7 +324,7 @@ def get_array(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -376,7 +375,7 @@ def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_vendor.py index dc910ddc7e5..db0a5a9a33b 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AnythingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_operations/_operations.py index 65265f50875..fcb94ed360f 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +50,7 @@ async def get_object(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92,7 +91,7 @@ async def get_object(self, **kwargs: Any) -> Any: return cast(Any, deserialized) # type: ignore @distributed_trace_async - async def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_object(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an object as anything. Pass in {'foo': 'bar'} to get a 200 and anything else to get an object error. @@ -102,7 +101,7 @@ async def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -148,7 +147,7 @@ async def get_string(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -189,7 +188,7 @@ async def get_string(self, **kwargs: Any) -> Any: return cast(Any, deserialized) # type: ignore @distributed_trace_async - async def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_string(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an string as anything. Pass in 'anything' to get a 200 and anything else to get an object error. @@ -199,7 +198,7 @@ async def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -245,7 +244,7 @@ async def get_array(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -286,7 +285,7 @@ async def get_array(self, **kwargs: Any) -> Any: return cast(Any, deserialized) # type: ignore @distributed_trace_async - async def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_array(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an array as anything. Pass in ['foo', 'bar'] to get a 200 and anything else to get an object error. @@ -296,7 +295,7 @@ async def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_vendor.py index 29d65bdd121..c99b54eef8d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AnythingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/aio/operations/_operations.py index ddec464b6cb..0d07e7f38af 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -99,7 +99,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -138,7 +138,7 @@ async def get_null(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -194,7 +194,7 @@ async def get_invalid(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -250,7 +250,7 @@ async def get_empty(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -291,9 +291,7 @@ async def get_empty(self, **kwargs: Any) -> List[int]: return cast(List[int], deserialized) # type: ignore @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -315,9 +313,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -331,9 +327,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_empty(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value empty []. :param array_body: Is either a [str] type or a IO[bytes] type. Required. @@ -342,7 +336,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -403,7 +397,7 @@ async def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: bool ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -444,7 +438,7 @@ async def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: return cast(List[bool], deserialized) # type: ignore @overload - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + async def put_boolean_tfft( self, array_body: List[bool], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [true, false, false, true]. @@ -468,7 +462,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @overload - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + async def put_boolean_tfft( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [true, false, false, true]. @@ -484,9 +478,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put_boolean_tfft(self, array_body: Union[List[bool], IO[bytes]], **kwargs: Any) -> None: """Set array value empty [true, false, false, true]. :param array_body: Is either a [bool] type or a IO[bytes] type. Required. @@ -495,7 +487,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -556,7 +548,7 @@ async def get_boolean_invalid_null(self, **kwargs: Any) -> List[bool]: bool ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -612,7 +604,7 @@ async def get_boolean_invalid_string(self, **kwargs: Any) -> List[bool]: bool ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -668,7 +660,7 @@ async def get_integer_valid(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -709,7 +701,7 @@ async def get_integer_valid(self, **kwargs: Any) -> List[int]: return cast(List[int], deserialized) # type: ignore @overload - async def put_integer_valid( # pylint: disable=inconsistent-return-statements + async def put_integer_valid( self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -733,7 +725,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_integer_valid( # pylint: disable=inconsistent-return-statements + async def put_integer_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -749,9 +741,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_integer_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put_integer_valid(self, array_body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Is either a [int] type or a IO[bytes] type. Required. @@ -760,7 +750,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -821,7 +811,7 @@ async def get_int_invalid_null(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -877,7 +867,7 @@ async def get_int_invalid_string(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -933,7 +923,7 @@ async def get_long_valid(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -974,7 +964,7 @@ async def get_long_valid(self, **kwargs: Any) -> List[int]: return cast(List[int], deserialized) # type: ignore @overload - async def put_long_valid( # pylint: disable=inconsistent-return-statements + async def put_long_valid( self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -998,7 +988,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_long_valid( # pylint: disable=inconsistent-return-statements + async def put_long_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -1014,9 +1004,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put_long_valid(self, array_body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Is either a [int] type or a IO[bytes] type. Required. @@ -1025,7 +1013,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1086,7 +1074,7 @@ async def get_long_invalid_null(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1142,7 +1130,7 @@ async def get_long_invalid_string(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1198,7 +1186,7 @@ async def get_float_valid(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1239,7 +1227,7 @@ async def get_float_valid(self, **kwargs: Any) -> List[float]: return cast(List[float], deserialized) # type: ignore @overload - async def put_float_valid( # pylint: disable=inconsistent-return-statements + async def put_float_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1263,7 +1251,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_float_valid( # pylint: disable=inconsistent-return-statements + async def put_float_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1279,9 +1267,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_float_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[float], IO[bytes]], **kwargs: Any - ) -> None: + async def put_float_valid(self, array_body: Union[List[float], IO[bytes]], **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Is either a [float] type or a IO[bytes] type. Required. @@ -1290,7 +1276,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1351,7 +1337,7 @@ async def get_float_invalid_null(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1407,7 +1393,7 @@ async def get_float_invalid_string(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1463,7 +1449,7 @@ async def get_double_valid(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1504,7 +1490,7 @@ async def get_double_valid(self, **kwargs: Any) -> List[float]: return cast(List[float], deserialized) # type: ignore @overload - async def put_double_valid( # pylint: disable=inconsistent-return-statements + async def put_double_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1528,7 +1514,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_double_valid( # pylint: disable=inconsistent-return-statements + async def put_double_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -1544,9 +1530,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_double_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[float], IO[bytes]], **kwargs: Any - ) -> None: + async def put_double_valid(self, array_body: Union[List[float], IO[bytes]], **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Is either a [float] type or a IO[bytes] type. Required. @@ -1555,7 +1539,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1616,7 +1600,7 @@ async def get_double_invalid_null(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1672,7 +1656,7 @@ async def get_double_invalid_string(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1728,7 +1712,7 @@ async def get_string_valid(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1769,7 +1753,7 @@ async def get_string_valid(self, **kwargs: Any) -> List[str]: return cast(List[str], deserialized) # type: ignore @overload - async def put_string_valid( # pylint: disable=inconsistent-return-statements + async def put_string_valid( self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1793,7 +1777,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_string_valid( # pylint: disable=inconsistent-return-statements + async def put_string_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1809,9 +1793,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_string_valid(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Is either a [str] type or a IO[bytes] type. Required. @@ -1820,7 +1802,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1863,7 @@ async def get_enum_valid(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1922,7 +1904,7 @@ async def get_enum_valid(self, **kwargs: Any) -> List[str]: return cast(List[str], deserialized) # type: ignore @overload - async def put_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_enum_valid( self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1946,7 +1928,7 @@ async def put_enum_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_enum_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -1962,9 +1944,7 @@ async def put_enum_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_enum_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_enum_valid(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Is either a [str] type or a IO[bytes] type. Required. @@ -1973,7 +1953,7 @@ async def put_enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2034,7 +2014,7 @@ async def get_string_enum_valid(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2075,7 +2055,7 @@ async def get_string_enum_valid(self, **kwargs: Any) -> List[str]: return cast(List[str], deserialized) # type: ignore @overload - async def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_string_enum_valid( self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -2099,7 +2079,7 @@ async def put_string_enum_valid( # pylint: disable=inconsistent-return-statemen """ @overload - async def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + async def put_string_enum_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -2115,9 +2095,7 @@ async def put_string_enum_valid( # pylint: disable=inconsistent-return-statemen """ @distributed_trace_async - async def put_string_enum_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_string_enum_valid(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Is either a [str] type or a IO[bytes] type. Required. @@ -2126,7 +2104,7 @@ async def put_string_enum_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2187,7 +2165,7 @@ async def get_string_with_null(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2243,7 +2221,7 @@ async def get_string_with_invalid(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2300,7 +2278,7 @@ async def get_uuid_valid(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2341,7 +2319,7 @@ async def get_uuid_valid(self, **kwargs: Any) -> List[str]: return cast(List[str], deserialized) # type: ignore @overload - async def put_uuid_valid( # pylint: disable=inconsistent-return-statements + async def put_uuid_valid( self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', @@ -2366,7 +2344,7 @@ async def put_uuid_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_uuid_valid( # pylint: disable=inconsistent-return-statements + async def put_uuid_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', @@ -2383,9 +2361,7 @@ async def put_uuid_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_uuid_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_uuid_valid(self, array_body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']. @@ -2395,7 +2371,7 @@ async def put_uuid_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2456,7 +2432,7 @@ async def get_uuid_invalid_chars(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2512,7 +2488,7 @@ async def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: "2020-02-20" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2553,7 +2529,7 @@ async def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: return cast(List[datetime.date], deserialized) # type: ignore @overload - async def put_date_valid( # pylint: disable=inconsistent-return-statements + async def put_date_valid( self, array_body: List[datetime.date], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. @@ -2577,7 +2553,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_valid( # pylint: disable=inconsistent-return-statements + async def put_date_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. @@ -2593,9 +2569,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[datetime.date], IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_valid(self, array_body: Union[List[datetime.date], IO[bytes]], **kwargs: Any) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. :param array_body: Is either a [datetime.date] type or a IO[bytes] type. Required. @@ -2604,7 +2578,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2665,7 +2639,7 @@ async def get_date_invalid_null(self, **kwargs: Any) -> List[datetime.date]: "2020-02-20" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2721,7 +2695,7 @@ async def get_date_invalid_chars(self, **kwargs: Any) -> List[datetime.date]: "2020-02-20" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2778,7 +2752,7 @@ async def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: "2020-02-20 00:00:00" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2819,7 +2793,7 @@ async def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: return cast(List[datetime.datetime], deserialized) # type: ignore @overload - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -2844,7 +2818,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -2861,9 +2835,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_time_valid(self, array_body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', '1492-10-12T10:15:01-08:00']. @@ -2873,7 +2845,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2934,7 +2906,7 @@ async def get_date_time_invalid_null(self, **kwargs: Any) -> List[datetime.datet "2020-02-20 00:00:00" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2990,7 +2962,7 @@ async def get_date_time_invalid_chars(self, **kwargs: Any) -> List[datetime.date "2020-02-20 00:00:00" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3047,7 +3019,7 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.date "2020-02-20 00:00:00" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3088,7 +3060,7 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.date return cast(List[datetime.datetime], deserialized) # type: ignore @overload - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -3113,7 +3085,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st """ @overload - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -3130,7 +3102,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st """ @distributed_trace_async - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -3142,7 +3114,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3203,7 +3175,7 @@ async def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: "1 day, 0:00:00" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3244,7 +3216,7 @@ async def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: return cast(List[datetime.timedelta], deserialized) # type: ignore @overload - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -3268,7 +3240,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -3284,9 +3256,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_duration_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[datetime.timedelta], IO[bytes]], **kwargs: Any - ) -> None: + async def put_duration_valid(self, array_body: Union[List[datetime.timedelta], IO[bytes]], **kwargs: Any) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. :param array_body: Is either a [datetime.timedelta] type or a IO[bytes] type. Required. @@ -3295,7 +3265,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3357,7 +3327,7 @@ async def get_byte_valid(self, **kwargs: Any) -> List[bytes]: bytes("bytes", encoding="utf-8") ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3398,7 +3368,7 @@ async def get_byte_valid(self, **kwargs: Any) -> List[bytes]: return cast(List[bytes], deserialized) # type: ignore @overload - async def put_byte_valid( # pylint: disable=inconsistent-return-statements + async def put_byte_valid( self, array_body: List[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each @@ -3423,7 +3393,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_byte_valid( # pylint: disable=inconsistent-return-statements + async def put_byte_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each @@ -3440,9 +3410,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[bytes], IO[bytes]], **kwargs: Any - ) -> None: + async def put_byte_valid(self, array_body: Union[List[bytes], IO[bytes]], **kwargs: Any) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each elementencoded in base 64. @@ -3452,7 +3420,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3513,7 +3481,7 @@ async def get_byte_invalid_null(self, **kwargs: Any) -> List[bytes]: bytes("bytes", encoding="utf-8") ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3570,7 +3538,7 @@ async def get_base64_url(self, **kwargs: Any) -> List[bytes]: bytes("bytes", encoding="utf-8") ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3629,7 +3597,7 @@ async def get_complex_null(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3688,7 +3656,7 @@ async def get_complex_empty(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3748,7 +3716,7 @@ async def get_complex_item_null(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3808,7 +3776,7 @@ async def get_complex_item_empty(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3868,7 +3836,7 @@ async def get_complex_valid(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3909,7 +3877,7 @@ async def get_complex_valid(self, **kwargs: Any) -> List[JSON]: return cast(List[JSON], deserialized) # type: ignore @overload - async def put_complex_valid( # pylint: disable=inconsistent-return-statements + async def put_complex_valid( self, array_body: List[JSON], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -3937,7 +3905,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_complex_valid( # pylint: disable=inconsistent-return-statements + async def put_complex_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -3954,9 +3922,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_complex_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[JSON], IO[bytes]], **kwargs: Any - ) -> None: + async def put_complex_valid(self, array_body: Union[List[JSON], IO[bytes]], **kwargs: Any) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, 'string': '4'}, {'integer': 5, 'string': '6'}]. @@ -3966,7 +3932,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4029,7 +3995,7 @@ async def get_array_null(self, **kwargs: Any) -> List[List[str]]: ] ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4087,7 +4053,7 @@ async def get_array_empty(self, **kwargs: Any) -> List[List[str]]: ] ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4145,7 +4111,7 @@ async def get_array_item_null(self, **kwargs: Any) -> List[List[str]]: ] ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4203,7 +4169,7 @@ async def get_array_item_empty(self, **kwargs: Any) -> List[List[str]]: ] ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4261,7 +4227,7 @@ async def get_array_valid(self, **kwargs: Any) -> List[List[str]]: ] ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4302,7 +4268,7 @@ async def get_array_valid(self, **kwargs: Any) -> List[List[str]]: return cast(List[List[str]], deserialized) # type: ignore @overload - async def put_array_valid( # pylint: disable=inconsistent-return-statements + async def put_array_valid( self, array_body: List[List[str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. @@ -4328,7 +4294,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_array_valid( # pylint: disable=inconsistent-return-statements + async def put_array_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. @@ -4344,9 +4310,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_array_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[List[str]], IO[bytes]], **kwargs: Any - ) -> None: + async def put_array_valid(self, array_body: Union[List[List[str]], IO[bytes]], **kwargs: Any) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. :param array_body: Is either a [[str]] type or a IO[bytes] type. Required. @@ -4355,7 +4319,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4418,7 +4382,7 @@ async def get_dictionary_null(self, **kwargs: Any) -> List[Dict[str, str]]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4476,7 +4440,7 @@ async def get_dictionary_empty(self, **kwargs: Any) -> List[Dict[str, str]]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4535,7 +4499,7 @@ async def get_dictionary_item_null(self, **kwargs: Any) -> List[Dict[str, str]]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4594,7 +4558,7 @@ async def get_dictionary_item_empty(self, **kwargs: Any) -> List[Dict[str, str]] } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4653,7 +4617,7 @@ async def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4694,7 +4658,7 @@ async def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: return cast(List[Dict[str, str]], deserialized) # type: ignore @overload - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: List[Dict[str, str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -4721,7 +4685,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement """ @overload - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -4738,9 +4702,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement """ @distributed_trace_async - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[List[Dict[str, str]], IO[bytes]], **kwargs: Any - ) -> None: + async def put_dictionary_valid(self, array_body: Union[List[Dict[str, str]], IO[bytes]], **kwargs: Any) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': 'three'}, {'4': 'four', '5': 'five', '6': 'six'}, {'7': 'seven', '8': 'eight', '9': 'nine'}]. @@ -4750,7 +4712,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/operations/_operations.py index b89a1637495..4859f131cc5 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/bodyarrayversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1091,7 +1091,7 @@ def get_null(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1147,7 +1147,7 @@ def get_invalid(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1203,7 +1203,7 @@ def get_empty(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1244,9 +1244,7 @@ def get_empty(self, **kwargs: Any) -> List[int]: return cast(List[int], deserialized) # type: ignore @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -1268,9 +1266,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty []. :param array_body: Required. @@ -1295,7 +1291,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1356,7 +1352,7 @@ def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: bool ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1397,7 +1393,7 @@ def get_boolean_tfft(self, **kwargs: Any) -> List[bool]: return cast(List[bool], deserialized) # type: ignore @overload - def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + def put_boolean_tfft( self, array_body: List[bool], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [true, false, false, true]. @@ -1421,9 +1417,7 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @overload - def put_boolean_tfft( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_boolean_tfft(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty [true, false, false, true]. :param array_body: Required. @@ -1448,7 +1442,7 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1509,7 +1503,7 @@ def get_boolean_invalid_null(self, **kwargs: Any) -> List[bool]: bool ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1565,7 +1559,7 @@ def get_boolean_invalid_string(self, **kwargs: Any) -> List[bool]: bool ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1621,7 +1615,7 @@ def get_integer_valid(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1662,7 +1656,7 @@ def get_integer_valid(self, **kwargs: Any) -> List[int]: return cast(List[int], deserialized) # type: ignore @overload - def put_integer_valid( # pylint: disable=inconsistent-return-statements + def put_integer_valid( self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -1686,7 +1680,7 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_integer_valid( # pylint: disable=inconsistent-return-statements + def put_integer_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value empty [1, -1, 3, 300]. @@ -1713,7 +1707,7 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1774,7 +1768,7 @@ def get_int_invalid_null(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1830,7 +1824,7 @@ def get_int_invalid_string(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1886,7 +1880,7 @@ def get_long_valid(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1927,9 +1921,7 @@ def get_long_valid(self, **kwargs: Any) -> List[int]: return cast(List[int], deserialized) # type: ignore @overload - def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long_valid(self, array_body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Required. @@ -1951,9 +1943,7 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value empty [1, -1, 3, 300]. :param array_body: Required. @@ -1978,7 +1968,7 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2039,7 +2029,7 @@ def get_long_invalid_null(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2095,7 +2085,7 @@ def get_long_invalid_string(self, **kwargs: Any) -> List[int]: 0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,7 +2141,7 @@ def get_float_valid(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2192,7 +2182,7 @@ def get_float_valid(self, **kwargs: Any) -> List[float]: return cast(List[float], deserialized) # type: ignore @overload - def put_float_valid( # pylint: disable=inconsistent-return-statements + def put_float_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -2216,9 +2206,7 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_float_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_float_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Required. @@ -2243,7 +2231,7 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2304,7 +2292,7 @@ def get_float_invalid_null(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2360,7 +2348,7 @@ def get_float_invalid_string(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2416,7 +2404,7 @@ def get_double_valid(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2457,7 +2445,7 @@ def get_double_valid(self, **kwargs: Any) -> List[float]: return cast(List[float], deserialized) # type: ignore @overload - def put_double_valid( # pylint: disable=inconsistent-return-statements + def put_double_valid( self, array_body: List[float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value [0, -0.01, 1.2e20]. @@ -2481,9 +2469,7 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_double_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_double_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value [0, -0.01, 1.2e20]. :param array_body: Required. @@ -2508,7 +2494,7 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2569,7 +2555,7 @@ def get_double_invalid_null(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2625,7 +2611,7 @@ def get_double_invalid_string(self, **kwargs: Any) -> List[float]: 0.0 ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2681,7 +2667,7 @@ def get_string_valid(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2722,9 +2708,7 @@ def get_string_valid(self, **kwargs: Any) -> List[str]: return cast(List[str], deserialized) # type: ignore @overload - def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string_valid(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Required. @@ -2746,9 +2730,7 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Required. @@ -2773,7 +2755,7 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2834,7 +2816,7 @@ def get_enum_valid(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2875,9 +2857,7 @@ def get_enum_valid(self, **kwargs: Any) -> List[str]: return cast(List[str], deserialized) # type: ignore @overload - def put_enum_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_enum_valid(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Required. @@ -2899,9 +2879,7 @@ def put_enum_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_enum_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_enum_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['foo1', 'foo2', 'foo3']. :param array_body: Required. @@ -2926,7 +2904,7 @@ def put_enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2987,7 +2965,7 @@ def get_string_enum_valid(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3028,7 +3006,7 @@ def get_string_enum_valid(self, **kwargs: Any) -> List[str]: return cast(List[str], deserialized) # type: ignore @overload - def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + def put_string_enum_valid( self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -3052,7 +3030,7 @@ def put_string_enum_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_string_enum_valid( # pylint: disable=inconsistent-return-statements + def put_string_enum_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['foo1', 'foo2', 'foo3']. @@ -3079,7 +3057,7 @@ def put_string_enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3140,7 +3118,7 @@ def get_string_with_null(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3196,7 +3174,7 @@ def get_string_with_invalid(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3253,7 +3231,7 @@ def get_uuid_valid(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3294,9 +3272,7 @@ def get_uuid_valid(self, **kwargs: Any) -> List[str]: return cast(List[str], deserialized) # type: ignore @overload - def put_uuid_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_uuid_valid(self, array_body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']. @@ -3319,9 +3295,7 @@ def put_uuid_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_uuid_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_uuid_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']. @@ -3348,7 +3322,7 @@ def put_uuid_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3409,7 +3383,7 @@ def get_uuid_invalid_chars(self, **kwargs: Any) -> List[str]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3465,7 +3439,7 @@ def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: "2020-02-20" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3506,7 +3480,7 @@ def get_date_valid(self, **kwargs: Any) -> List[datetime.date]: return cast(List[datetime.date], deserialized) # type: ignore @overload - def put_date_valid( # pylint: disable=inconsistent-return-statements + def put_date_valid( self, array_body: List[datetime.date], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. @@ -3530,9 +3504,7 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set array value ['2000-12-01', '1980-01-02', '1492-10-12']. :param array_body: Required. @@ -3557,7 +3529,7 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3618,7 +3590,7 @@ def get_date_invalid_null(self, **kwargs: Any) -> List[datetime.date]: "2020-02-20" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3674,7 +3646,7 @@ def get_date_invalid_chars(self, **kwargs: Any) -> List[datetime.date]: "2020-02-20" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3731,7 +3703,7 @@ def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: "2020-02-20 00:00:00" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3772,7 +3744,7 @@ def get_date_time_valid(self, **kwargs: Any) -> List[datetime.datetime]: return cast(List[datetime.datetime], deserialized) # type: ignore @overload - def put_date_time_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -3797,7 +3769,7 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_time_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', @@ -3826,7 +3798,7 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3887,7 +3859,7 @@ def get_date_time_invalid_null(self, **kwargs: Any) -> List[datetime.datetime]: "2020-02-20 00:00:00" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3943,7 +3915,7 @@ def get_date_time_invalid_chars(self, **kwargs: Any) -> List[datetime.datetime]: "2020-02-20 00:00:00" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4000,7 +3972,7 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.datetime]: "2020-02-20 00:00:00" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4041,7 +4013,7 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> List[datetime.datetime]: return cast(List[datetime.datetime], deserialized) # type: ignore @overload - def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123_valid( self, array_body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -4066,7 +4038,7 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen """ @overload - def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 @@ -4095,7 +4067,7 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4156,7 +4128,7 @@ def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: "1 day, 0:00:00" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4197,7 +4169,7 @@ def get_duration_valid(self, **kwargs: Any) -> List[datetime.timedelta]: return cast(List[datetime.timedelta], deserialized) # type: ignore @overload - def put_duration_valid( # pylint: disable=inconsistent-return-statements + def put_duration_valid( self, array_body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -4221,7 +4193,7 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_duration_valid( # pylint: disable=inconsistent-return-statements + def put_duration_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S']. @@ -4248,7 +4220,7 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4310,7 +4282,7 @@ def get_byte_valid(self, **kwargs: Any) -> List[bytes]: bytes("bytes", encoding="utf-8") ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4351,9 +4323,7 @@ def get_byte_valid(self, **kwargs: Any) -> List[bytes]: return cast(List[bytes], deserialized) # type: ignore @overload - def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: List[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_byte_valid(self, array_body: List[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each elementencoded in base 64. @@ -4376,9 +4346,7 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_byte_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each elementencoded in base 64. @@ -4405,7 +4373,7 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4466,7 +4434,7 @@ def get_byte_invalid_null(self, **kwargs: Any) -> List[bytes]: bytes("bytes", encoding="utf-8") ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4523,7 +4491,7 @@ def get_base64_url(self, **kwargs: Any) -> List[bytes]: bytes("bytes", encoding="utf-8") ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4582,7 +4550,7 @@ def get_complex_null(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4641,7 +4609,7 @@ def get_complex_empty(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4701,7 +4669,7 @@ def get_complex_item_null(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4761,7 +4729,7 @@ def get_complex_item_empty(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4821,7 +4789,7 @@ def get_complex_valid(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4862,7 +4830,7 @@ def get_complex_valid(self, **kwargs: Any) -> List[JSON]: return cast(List[JSON], deserialized) # type: ignore @overload - def put_complex_valid( # pylint: disable=inconsistent-return-statements + def put_complex_valid( self, array_body: List[JSON], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -4890,7 +4858,7 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_complex_valid( # pylint: disable=inconsistent-return-statements + def put_complex_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, @@ -4919,7 +4887,7 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4982,7 +4950,7 @@ def get_array_null(self, **kwargs: Any) -> List[List[str]]: ] ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5040,7 +5008,7 @@ def get_array_empty(self, **kwargs: Any) -> List[List[str]]: ] ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5098,7 +5066,7 @@ def get_array_item_null(self, **kwargs: Any) -> List[List[str]]: ] ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5156,7 +5124,7 @@ def get_array_item_empty(self, **kwargs: Any) -> List[List[str]]: ] ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5214,7 +5182,7 @@ def get_array_valid(self, **kwargs: Any) -> List[List[str]]: ] ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5255,7 +5223,7 @@ def get_array_valid(self, **kwargs: Any) -> List[List[str]]: return cast(List[List[str]], deserialized) # type: ignore @overload - def put_array_valid( # pylint: disable=inconsistent-return-statements + def put_array_valid( self, array_body: List[List[str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. @@ -5281,9 +5249,7 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_array_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_array_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]. :param array_body: Required. @@ -5308,7 +5274,7 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5371,7 +5337,7 @@ def get_dictionary_null(self, **kwargs: Any) -> List[Dict[str, str]]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5429,7 +5395,7 @@ def get_dictionary_empty(self, **kwargs: Any) -> List[Dict[str, str]]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5488,7 +5454,7 @@ def get_dictionary_item_null(self, **kwargs: Any) -> List[Dict[str, str]]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5547,7 +5513,7 @@ def get_dictionary_item_empty(self, **kwargs: Any) -> List[Dict[str, str]]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5606,7 +5572,7 @@ def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5647,7 +5613,7 @@ def get_dictionary_valid(self, **kwargs: Any) -> List[Dict[str, str]]: return cast(List[Dict[str, str]], deserialized) # type: ignore @overload - def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + def put_dictionary_valid( self, array_body: List[Dict[str, str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -5674,7 +5640,7 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + def put_dictionary_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': @@ -5703,7 +5669,7 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/aio/operations/_operations.py index 4356c63b88f..a6d610794be 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, cast +from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,9 +55,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def file( # pylint: disable=inconsistent-return-statements - self, file_param: IO[bytes], **kwargs: Any - ) -> None: + async def file(self, file_param: IO[bytes], **kwargs: Any) -> None: """Uploading json file. :param file_param: JSON file with payload { "more": "cowbell" }. Required. @@ -67,7 +64,7 @@ async def file( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,9 +103,7 @@ async def file( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def binary( # pylint: disable=inconsistent-return-statements - self, file_param: IO[bytes], **kwargs: Any - ) -> None: + async def binary(self, file_param: IO[bytes], **kwargs: Any) -> None: """Uploading binary file. :param file_param: Non-empty binary file. Required. @@ -117,7 +112,7 @@ async def binary( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +176,7 @@ async def error_stream(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/operations/_operations.py index f92eb1ab6e2..05f745e35fe 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/bodybinaryversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -106,7 +105,7 @@ def file(self, file_param: IO[bytes], **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -154,7 +153,7 @@ def binary(self, file_param: IO[bytes], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -218,7 +217,7 @@ def error_stream(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/_configuration.py index e795e2a2819..9d55b61840c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestBoolTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestBoolTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestBoolTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/aio/_configuration.py index 25dae13cb76..c95abc76f30 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestBoolTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestBoolTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestBoolTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/aio/operations/_operations.py index c58569efc0f..d07511d0152 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Literal, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -64,7 +63,7 @@ async def get_true(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -105,14 +104,14 @@ async def get_true(self, **kwargs: Any) -> bool: return cast(bool, deserialized) # type: ignore @distributed_trace_async - async def put_true(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_true(self, **kwargs: Any) -> None: """Set Boolean value true. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -159,7 +158,7 @@ async def get_false(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -200,14 +199,14 @@ async def get_false(self, **kwargs: Any) -> bool: return cast(bool, deserialized) # type: ignore @distributed_trace_async - async def put_false(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_false(self, **kwargs: Any) -> None: """Set Boolean value false. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -254,7 +253,7 @@ async def get_null(self, **kwargs: Any) -> Optional[bool]: :rtype: bool or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -302,7 +301,7 @@ async def get_invalid(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/operations/_operations.py index 91a874f61ec..f2ea194a306 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/bodybooleanversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Literal, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -152,7 +151,7 @@ def get_true(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -200,7 +199,7 @@ def put_true(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -247,7 +246,7 @@ def get_false(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -295,7 +294,7 @@ def put_false(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -342,7 +341,7 @@ def get_null(self, **kwargs: Any) -> Optional[bool]: :rtype: bool or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -390,7 +389,7 @@ def get_invalid(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/aio/operations/_operations.py index 6d507cc0b30..d30266535d7 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,7 +62,7 @@ async def get_null(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -111,7 +110,7 @@ async def get_empty(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -159,7 +158,7 @@ async def get_non_ascii(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -200,9 +199,7 @@ async def get_non_ascii(self, **kwargs: Any) -> bytes: return cast(bytes, deserialized) # type: ignore @distributed_trace_async - async def put_non_ascii( # pylint: disable=inconsistent-return-statements - self, byte_body: bytes, **kwargs: Any - ) -> None: + async def put_non_ascii(self, byte_body: bytes, **kwargs: Any) -> None: """Put non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6). :param byte_body: Base64-encoded non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6). @@ -212,7 +209,7 @@ async def put_non_ascii( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -258,7 +255,7 @@ async def get_invalid(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/operations/_operations.py index 27efb757dbf..831fcf5d527 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/bodybyteversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -133,7 +132,7 @@ def get_null(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +180,7 @@ def get_empty(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -229,7 +228,7 @@ def get_non_ascii(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -280,7 +279,7 @@ def put_non_ascii(self, byte_body: bytes, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -326,7 +325,7 @@ def get_invalid(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_client.py index 698584364ac..93a8e538b71 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_client.py @@ -29,7 +29,7 @@ ) -class AutoRestComplexTestService: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class AutoRestComplexTestService: # pylint: disable=too-many-instance-attributes """Test Infrastructure for AutoRest. :ivar basic: BasicOperations operations diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_configuration.py index bf63735dd9e..6f524f6076f 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestComplexTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestComplexTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestComplexTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/_client.py index 42cb628184f..a16a3801937 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/_client.py @@ -29,7 +29,7 @@ ) -class AutoRestComplexTestService: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class AutoRestComplexTestService: # pylint: disable=too-many-instance-attributes """Test Infrastructure for AutoRest. :ivar basic: BasicOperations operations diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/_configuration.py index df93040976a..8924f21ccda 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestComplexTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestComplexTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestComplexTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/operations/_operations.py index c2eb3f9dad5..cb76d46910f 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -84,7 +84,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -125,7 +125,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -166,9 +166,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Please put {id: 2, name: 'abc', color: 'Magenta'}. :param complex_body: Please put {id: 2, name: 'abc', color: 'Magenta'}. Required. @@ -192,7 +190,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Please put {id: 2, name: 'abc', color: 'Magenta'}. @@ -208,9 +206,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Please put {id: 2, name: 'abc', color: 'Magenta'}. :param complex_body: Please put {id: 2, name: 'abc', color: 'Magenta'}. Is either a JSON type @@ -230,7 +226,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -294,7 +290,7 @@ async def get_invalid(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,7 +348,7 @@ async def get_empty(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -410,7 +406,7 @@ async def get_null(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,7 +464,7 @@ async def get_not_provided(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -543,7 +539,7 @@ async def get_int(self, **kwargs: Any) -> JSON: "field2": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -584,9 +580,7 @@ async def get_int(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_int( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_int(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with integer properties. :param complex_body: Please put -1 and 2. Required. @@ -609,9 +603,7 @@ async def put_int( # pylint: disable=inconsistent-return-statements """ @overload - async def put_int( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_int(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with integer properties. :param complex_body: Please put -1 and 2. Required. @@ -625,9 +617,7 @@ async def put_int( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_int( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_int(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with integer properties. :param complex_body: Please put -1 and 2. Is either a JSON type or a IO[bytes] type. Required. @@ -645,7 +635,7 @@ async def put_int( # pylint: disable=inconsistent-return-statements "field2": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -707,7 +697,7 @@ async def get_long(self, **kwargs: Any) -> JSON: "field2": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -748,9 +738,7 @@ async def get_long(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_long( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_long(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with long properties. :param complex_body: Please put 1099511627775 and -999511627788. Required. @@ -773,9 +761,7 @@ async def put_long( # pylint: disable=inconsistent-return-statements """ @overload - async def put_long( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_long(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with long properties. :param complex_body: Please put 1099511627775 and -999511627788. Required. @@ -789,9 +775,7 @@ async def put_long( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_long( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_long(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with long properties. :param complex_body: Please put 1099511627775 and -999511627788. Is either a JSON type or a @@ -810,7 +794,7 @@ async def put_long( # pylint: disable=inconsistent-return-statements "field2": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -872,7 +856,7 @@ async def get_float(self, **kwargs: Any) -> JSON: "field2": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -913,9 +897,7 @@ async def get_float(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_float( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_float(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with float properties. :param complex_body: Please put 1.05 and -0.003. Required. @@ -938,7 +920,7 @@ async def put_float( # pylint: disable=inconsistent-return-statements """ @overload - async def put_float( # pylint: disable=inconsistent-return-statements + async def put_float( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with float properties. @@ -954,9 +936,7 @@ async def put_float( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_float( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_float(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with float properties. :param complex_body: Please put 1.05 and -0.003. Is either a JSON type or a IO[bytes] type. @@ -975,7 +955,7 @@ async def put_float( # pylint: disable=inconsistent-return-statements "field2": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1038,7 +1018,7 @@ async def get_double(self, **kwargs: Any) -> JSON: 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1079,9 +1059,7 @@ async def get_double(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_double( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_double(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with double properties. :param complex_body: Please put 3e-100 and @@ -1106,7 +1084,7 @@ async def put_double( # pylint: disable=inconsistent-return-statements """ @overload - async def put_double( # pylint: disable=inconsistent-return-statements + async def put_double( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with double properties. @@ -1123,9 +1101,7 @@ async def put_double( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_double( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_double(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with double properties. :param complex_body: Please put 3e-100 and @@ -1146,7 +1122,7 @@ async def put_double( # pylint: disable=inconsistent-return-statements 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1208,7 +1184,7 @@ async def get_bool(self, **kwargs: Any) -> JSON: "field_true": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1249,9 +1225,7 @@ async def get_bool(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_bool( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_bool(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with bool properties. :param complex_body: Please put true and false. Required. @@ -1274,9 +1248,7 @@ async def put_bool( # pylint: disable=inconsistent-return-statements """ @overload - async def put_bool( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_bool(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with bool properties. :param complex_body: Please put true and false. Required. @@ -1290,9 +1262,7 @@ async def put_bool( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_bool( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_bool(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with bool properties. :param complex_body: Please put true and false. Is either a JSON type or a IO[bytes] type. @@ -1311,7 +1281,7 @@ async def put_bool( # pylint: disable=inconsistent-return-statements "field_true": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1374,7 +1344,7 @@ async def get_string(self, **kwargs: Any) -> JSON: "null": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1415,9 +1385,7 @@ async def get_string(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_string( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_string(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with string properties. :param complex_body: Please put 'goodrequest', '', and null. Required. @@ -1441,7 +1409,7 @@ async def put_string( # pylint: disable=inconsistent-return-statements """ @overload - async def put_string( # pylint: disable=inconsistent-return-statements + async def put_string( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with string properties. @@ -1457,9 +1425,7 @@ async def put_string( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_string( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_string(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with string properties. :param complex_body: Please put 'goodrequest', '', and null. Is either a JSON type or a @@ -1479,7 +1445,7 @@ async def put_string( # pylint: disable=inconsistent-return-statements "null": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1541,7 +1507,7 @@ async def get_date(self, **kwargs: Any) -> JSON: "leap": "2020-02-20" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1582,9 +1548,7 @@ async def get_date(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_date( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_date(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with date properties. :param complex_body: Please put '0001-01-01' and '2016-02-29'. Required. @@ -1607,9 +1571,7 @@ async def put_date( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_date(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with date properties. :param complex_body: Please put '0001-01-01' and '2016-02-29'. Required. @@ -1623,9 +1585,7 @@ async def put_date( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_date(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with date properties. :param complex_body: Please put '0001-01-01' and '2016-02-29'. Is either a JSON type or a @@ -1644,7 +1604,7 @@ async def put_date( # pylint: disable=inconsistent-return-statements "leap": "2020-02-20" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1706,7 +1666,7 @@ async def get_date_time(self, **kwargs: Any) -> JSON: "now": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1747,9 +1707,7 @@ async def get_date_time(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_date_time( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_date_time(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with datetime properties. :param complex_body: Please put '0001-01-01T12:00:00-04:00' and '2015-05-18T11:38:00-08:00'. @@ -1773,7 +1731,7 @@ async def put_date_time( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_time( # pylint: disable=inconsistent-return-statements + async def put_date_time( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetime properties. @@ -1790,9 +1748,7 @@ async def put_date_time( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_time( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_time(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with datetime properties. :param complex_body: Please put '0001-01-01T12:00:00-04:00' and '2015-05-18T11:38:00-08:00'. Is @@ -1811,7 +1767,7 @@ async def put_date_time( # pylint: disable=inconsistent-return-statements "now": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1873,7 +1829,7 @@ async def get_date_time_rfc1123(self, **kwargs: Any) -> JSON: "now": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1914,7 +1870,7 @@ async def get_date_time_rfc1123(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123( self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetimeRfc1123 properties. @@ -1940,7 +1896,7 @@ async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statemen """ @overload - async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetimeRfc1123 properties. @@ -1957,9 +1913,7 @@ async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statemen """ @distributed_trace_async - async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_time_rfc1123(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with datetimeRfc1123 properties. :param complex_body: Please put 'Mon, 01 Jan 0001 12:00:00 GMT' and 'Mon, 18 May 2015 11:38:00 @@ -1978,7 +1932,7 @@ async def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statemen "now": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2039,7 +1993,7 @@ async def get_duration(self, **kwargs: Any) -> JSON: "field": "1 day, 0:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2080,9 +2034,7 @@ async def get_duration(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_duration( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_duration(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with duration properties. :param complex_body: Please put 'P123DT22H14M12.011S'. Required. @@ -2104,7 +2056,7 @@ async def put_duration( # pylint: disable=inconsistent-return-statements """ @overload - async def put_duration( # pylint: disable=inconsistent-return-statements + async def put_duration( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with duration properties. @@ -2120,9 +2072,7 @@ async def put_duration( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_duration( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_duration(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with duration properties. :param complex_body: Please put 'P123DT22H14M12.011S'. Is either a JSON type or a IO[bytes] @@ -2140,7 +2090,7 @@ async def put_duration( # pylint: disable=inconsistent-return-statements "field": "1 day, 0:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2201,7 +2151,7 @@ async def get_byte(self, **kwargs: Any) -> JSON: "field": bytes("bytes", encoding="utf-8") } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2242,9 +2192,7 @@ async def get_byte(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_byte( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_byte(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with byte properties. :param complex_body: Please put non-ascii byte string hex(FF FE FD FC 00 FA F9 F8 F7 F6). @@ -2267,9 +2215,7 @@ async def put_byte( # pylint: disable=inconsistent-return-statements """ @overload - async def put_byte( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_byte(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with byte properties. :param complex_body: Please put non-ascii byte string hex(FF FE FD FC 00 FA F9 F8 F7 F6). @@ -2284,9 +2230,7 @@ async def put_byte( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_byte( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_byte(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with byte properties. :param complex_body: Please put non-ascii byte string hex(FF FE FD FC 00 FA F9 F8 F7 F6). Is @@ -2304,7 +2248,7 @@ async def put_byte( # pylint: disable=inconsistent-return-statements "field": bytes("bytes", encoding="utf-8") } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2385,7 +2329,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2426,9 +2370,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with array property. :param complex_body: Please put an array with 4 items: "1, 2, 3, 4", "", null, "&S#$(*Y", "The @@ -2453,7 +2395,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with array property. @@ -2470,9 +2412,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with array property. :param complex_body: Please put an array with 4 items: "1, 2, 3, 4", "", null, "&S#$(*Y", "The @@ -2492,7 +2432,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2555,7 +2495,7 @@ async def get_empty(self, **kwargs: Any) -> JSON: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2596,9 +2536,7 @@ async def get_empty(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with array property which is empty. :param complex_body: Please put an empty array. Required. @@ -2622,7 +2560,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements + async def put_empty( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with array property which is empty. @@ -2638,9 +2576,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_empty( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_empty(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with array property which is empty. :param complex_body: Please put an empty array. Is either a JSON type or a IO[bytes] type. @@ -2660,7 +2596,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2723,7 +2659,7 @@ async def get_not_provided(self, **kwargs: Any) -> JSON: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2799,7 +2735,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2840,9 +2776,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with dictionary property. :param complex_body: Please put a dictionary with 5 key-value pairs: "txt":"notepad", @@ -2867,7 +2801,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with dictionary property. @@ -2884,9 +2818,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with dictionary property. :param complex_body: Please put a dictionary with 5 key-value pairs: "txt":"notepad", @@ -2907,7 +2839,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2970,7 +2902,7 @@ async def get_empty(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3011,9 +2943,7 @@ async def get_empty(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with dictionary property which is empty. :param complex_body: Please put an empty dictionary. Required. @@ -3037,7 +2967,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements + async def put_empty( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with dictionary property which is empty. @@ -3053,9 +2983,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_empty( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_empty(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types with dictionary property which is empty. :param complex_body: Please put an empty dictionary. Is either a JSON type or a IO[bytes] type. @@ -3075,7 +3003,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3138,7 +3066,7 @@ async def get_null(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3196,7 +3124,7 @@ async def get_not_provided(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3280,7 +3208,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3321,9 +3249,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that extend others. :param complex_body: Please put a siamese with id=2, name="Siameee", color=green, @@ -3357,7 +3283,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that extend others. @@ -3375,9 +3301,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types that extend others. :param complex_body: Please put a siamese with id=2, name="Siameee", color=green, @@ -3407,7 +3331,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3539,7 +3463,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: # response body for status code(s): 200 response == fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3580,9 +3504,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic. :param complex_body: Please put a salmon that looks like this: @@ -3689,7 +3611,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic. @@ -3737,9 +3659,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types that are polymorphic. :param complex_body: Please put a salmon that looks like this: @@ -3841,7 +3761,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements # JSON input template you can fill out and use as your body input. complex_body = fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3911,7 +3831,7 @@ async def get_dot_syntax(self, **kwargs: Any) -> JSON: # response body for status code(s): 200 response == dot_fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3997,7 +3917,7 @@ async def get_composed_with_discriminator(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4083,7 +4003,7 @@ async def get_composed_without_discriminator(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4154,7 +4074,7 @@ async def get_complicated(self, **kwargs: Any) -> JSON: # response body for status code(s): 200 response == salmon """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4195,7 +4115,7 @@ async def get_complicated(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_complicated( # pylint: disable=inconsistent-return-statements + async def put_complicated( self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, but not at the root of the hierarchy; also have @@ -4234,7 +4154,7 @@ async def put_complicated( # pylint: disable=inconsistent-return-statements """ @overload - async def put_complicated( # pylint: disable=inconsistent-return-statements + async def put_complicated( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, but not at the root of the hierarchy; also have @@ -4251,9 +4171,7 @@ async def put_complicated( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_complicated( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_complicated(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types that are polymorphic, but not at the root of the hierarchy; also have additional properties. @@ -4285,7 +4203,7 @@ async def put_complicated( # pylint: disable=inconsistent-return-statements # JSON input template you can fill out and use as your body input. complex_body = salmon """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4476,7 +4394,7 @@ async def put_missing_discriminator(self, complex_body: Union[JSON, IO[bytes]], # response body for status code(s): 200 response == salmon """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4529,7 +4447,7 @@ async def put_missing_discriminator(self, complex_body: Union[JSON, IO[bytes]], return cast(JSON, deserialized) # type: ignore @overload - async def put_valid_missing_required( # pylint: disable=inconsistent-return-statements + async def put_valid_missing_required( self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, attempting to omit required 'birthday' field - the @@ -4633,7 +4551,7 @@ async def put_valid_missing_required( # pylint: disable=inconsistent-return-sta """ @overload - async def put_valid_missing_required( # pylint: disable=inconsistent-return-statements + async def put_valid_missing_required( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, attempting to omit required 'birthday' field - the @@ -4676,9 +4594,7 @@ async def put_valid_missing_required( # pylint: disable=inconsistent-return-sta """ @distributed_trace_async - async def put_valid_missing_required( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid_missing_required(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types that are polymorphic, attempting to omit required 'birthday' field - the request should not be allowed from the client. @@ -4775,7 +4691,7 @@ async def put_valid_missing_required( # pylint: disable=inconsistent-return-sta # JSON input template you can fill out and use as your body input. complex_body = fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4907,7 +4823,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: # response body for status code(s): 200 response == fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4948,9 +4864,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic and have recursive references. :param complex_body: Please put a salmon that looks like this: @@ -5077,7 +4991,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic and have recursive references. @@ -5145,9 +5059,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types that are polymorphic and have recursive references. :param complex_body: Please put a salmon that looks like this: @@ -5269,7 +5181,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements # JSON input template you can fill out and use as your body input. complex_body = fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5349,7 +5261,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: "size": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5390,9 +5302,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that have readonly properties. :param complex_body: Required. @@ -5415,7 +5325,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_valid( # pylint: disable=inconsistent-return-statements + async def put_valid( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that have readonly properties. @@ -5431,9 +5341,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_valid(self, complex_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Put complex types that have readonly properties. :param complex_body: Is either a JSON type or a IO[bytes] type. Required. @@ -5451,7 +5359,7 @@ async def put_valid( # pylint: disable=inconsistent-return-statements "size": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5541,7 +5449,7 @@ async def get_valid(self, **kwargs: Any) -> JSON: # response body for status code(s): 200 response == my_base_type """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/operations/_operations.py index 8cab379b985..d1225426a9c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/bodycomplexversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -922,7 +922,7 @@ def get_valid(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -963,9 +963,7 @@ def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Please put {id: 2, name: 'abc', color: 'Magenta'}. :param complex_body: Please put {id: 2, name: 'abc', color: 'Magenta'}. Required. @@ -989,9 +987,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Please put {id: 2, name: 'abc', color: 'Magenta'}. :param complex_body: Please put {id: 2, name: 'abc', color: 'Magenta'}. Required. @@ -1027,7 +1023,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1091,7 +1087,7 @@ def get_invalid(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1149,7 +1145,7 @@ def get_empty(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1207,7 +1203,7 @@ def get_null(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1265,7 +1261,7 @@ def get_not_provided(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1340,7 +1336,7 @@ def get_int(self, **kwargs: Any) -> JSON: "field2": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1381,9 +1377,7 @@ def get_int(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_int( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_int(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with integer properties. :param complex_body: Please put -1 and 2. Required. @@ -1406,9 +1400,7 @@ def put_int( # pylint: disable=inconsistent-return-statements """ @overload - def put_int( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_int(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with integer properties. :param complex_body: Please put -1 and 2. Required. @@ -1442,7 +1434,7 @@ def put_int( # pylint: disable=inconsistent-return-statements "field2": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1504,7 +1496,7 @@ def get_long(self, **kwargs: Any) -> JSON: "field2": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1545,9 +1537,7 @@ def get_long(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_long( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with long properties. :param complex_body: Please put 1099511627775 and -999511627788. Required. @@ -1570,9 +1560,7 @@ def put_long( # pylint: disable=inconsistent-return-statements """ @overload - def put_long( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with long properties. :param complex_body: Please put 1099511627775 and -999511627788. Required. @@ -1607,7 +1595,7 @@ def put_long( # pylint: disable=inconsistent-return-statements "field2": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1669,7 +1657,7 @@ def get_float(self, **kwargs: Any) -> JSON: "field2": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1710,9 +1698,7 @@ def get_float(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_float( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_float(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with float properties. :param complex_body: Please put 1.05 and -0.003. Required. @@ -1735,9 +1721,7 @@ def put_float( # pylint: disable=inconsistent-return-statements """ @overload - def put_float( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_float(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with float properties. :param complex_body: Please put 1.05 and -0.003. Required. @@ -1772,7 +1756,7 @@ def put_float( # pylint: disable=inconsistent-return-statements "field2": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1835,7 +1819,7 @@ def get_double(self, **kwargs: Any) -> JSON: 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1876,9 +1860,7 @@ def get_double(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_double( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_double(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with double properties. :param complex_body: Please put 3e-100 and @@ -1903,9 +1885,7 @@ def put_double( # pylint: disable=inconsistent-return-statements """ @overload - def put_double( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_double(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with double properties. :param complex_body: Please put 3e-100 and @@ -1943,7 +1923,7 @@ def put_double( # pylint: disable=inconsistent-return-statements 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2005,7 +1985,7 @@ def get_bool(self, **kwargs: Any) -> JSON: "field_true": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2046,9 +2026,7 @@ def get_bool(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_bool( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_bool(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with bool properties. :param complex_body: Please put true and false. Required. @@ -2071,9 +2049,7 @@ def put_bool( # pylint: disable=inconsistent-return-statements """ @overload - def put_bool( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_bool(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with bool properties. :param complex_body: Please put true and false. Required. @@ -2108,7 +2084,7 @@ def put_bool( # pylint: disable=inconsistent-return-statements "field_true": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2171,7 +2147,7 @@ def get_string(self, **kwargs: Any) -> JSON: "null": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2212,9 +2188,7 @@ def get_string(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_string( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with string properties. :param complex_body: Please put 'goodrequest', '', and null. Required. @@ -2238,9 +2212,7 @@ def put_string( # pylint: disable=inconsistent-return-statements """ @overload - def put_string( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with string properties. :param complex_body: Please put 'goodrequest', '', and null. Required. @@ -2276,7 +2248,7 @@ def put_string( # pylint: disable=inconsistent-return-statements "null": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2338,7 +2310,7 @@ def get_date(self, **kwargs: Any) -> JSON: "leap": "2020-02-20" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2379,9 +2351,7 @@ def get_date(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_date( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with date properties. :param complex_body: Please put '0001-01-01' and '2016-02-29'. Required. @@ -2404,9 +2374,7 @@ def put_date( # pylint: disable=inconsistent-return-statements """ @overload - def put_date( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with date properties. :param complex_body: Please put '0001-01-01' and '2016-02-29'. Required. @@ -2441,7 +2409,7 @@ def put_date( # pylint: disable=inconsistent-return-statements "leap": "2020-02-20" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2503,7 +2471,7 @@ def get_date_time(self, **kwargs: Any) -> JSON: "now": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2544,9 +2512,7 @@ def get_date_time(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_date_time( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date_time(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with datetime properties. :param complex_body: Please put '0001-01-01T12:00:00-04:00' and '2015-05-18T11:38:00-08:00'. @@ -2570,9 +2536,7 @@ def put_date_time( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_time( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date_time(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with datetime properties. :param complex_body: Please put '0001-01-01T12:00:00-04:00' and '2015-05-18T11:38:00-08:00'. @@ -2608,7 +2572,7 @@ def put_date_time( # pylint: disable=inconsistent-return-statements "now": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2670,7 +2634,7 @@ def get_date_time_rfc1123(self, **kwargs: Any) -> JSON: "now": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2711,7 +2675,7 @@ def get_date_time_rfc1123(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123( self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetimeRfc1123 properties. @@ -2737,7 +2701,7 @@ def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types with datetimeRfc1123 properties. @@ -2775,7 +2739,7 @@ def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements "now": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2836,7 +2800,7 @@ def get_duration(self, **kwargs: Any) -> JSON: "field": "1 day, 0:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2877,9 +2841,7 @@ def get_duration(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_duration( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_duration(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with duration properties. :param complex_body: Please put 'P123DT22H14M12.011S'. Required. @@ -2901,9 +2863,7 @@ def put_duration( # pylint: disable=inconsistent-return-statements """ @overload - def put_duration( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_duration(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with duration properties. :param complex_body: Please put 'P123DT22H14M12.011S'. Required. @@ -2937,7 +2897,7 @@ def put_duration( # pylint: disable=inconsistent-return-statements "field": "1 day, 0:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2998,7 +2958,7 @@ def get_byte(self, **kwargs: Any) -> JSON: "field": bytes("bytes", encoding="utf-8") } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3039,9 +2999,7 @@ def get_byte(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_byte( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_byte(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with byte properties. :param complex_body: Please put non-ascii byte string hex(FF FE FD FC 00 FA F9 F8 F7 F6). @@ -3064,9 +3022,7 @@ def put_byte( # pylint: disable=inconsistent-return-statements """ @overload - def put_byte( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_byte(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with byte properties. :param complex_body: Please put non-ascii byte string hex(FF FE FD FC 00 FA F9 F8 F7 F6). @@ -3101,7 +3057,7 @@ def put_byte( # pylint: disable=inconsistent-return-statements "field": bytes("bytes", encoding="utf-8") } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3182,7 +3138,7 @@ def get_valid(self, **kwargs: Any) -> JSON: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3223,9 +3179,7 @@ def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with array property. :param complex_body: Please put an array with 4 items: "1, 2, 3, 4", "", null, "&S#$(*Y", "The @@ -3250,9 +3204,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with array property. :param complex_body: Please put an array with 4 items: "1, 2, 3, 4", "", null, "&S#$(*Y", "The @@ -3289,7 +3241,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3352,7 +3304,7 @@ def get_empty(self, **kwargs: Any) -> JSON: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3393,9 +3345,7 @@ def get_empty(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with array property which is empty. :param complex_body: Please put an empty array. Required. @@ -3419,9 +3369,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with array property which is empty. :param complex_body: Please put an empty array. Required. @@ -3457,7 +3405,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3520,7 +3468,7 @@ def get_not_provided(self, **kwargs: Any) -> JSON: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3596,7 +3544,7 @@ def get_valid(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3637,9 +3585,7 @@ def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with dictionary property. :param complex_body: Please put a dictionary with 5 key-value pairs: "txt":"notepad", @@ -3664,9 +3610,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with dictionary property. :param complex_body: Please put a dictionary with 5 key-value pairs: "txt":"notepad", @@ -3704,7 +3648,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3767,7 +3711,7 @@ def get_empty(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3808,9 +3752,7 @@ def get_empty(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with dictionary property which is empty. :param complex_body: Please put an empty dictionary. Required. @@ -3834,9 +3776,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types with dictionary property which is empty. :param complex_body: Please put an empty dictionary. Required. @@ -3872,7 +3812,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3935,7 +3875,7 @@ def get_null(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3993,7 +3933,7 @@ def get_not_provided(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4077,7 +4017,7 @@ def get_valid(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4118,9 +4058,7 @@ def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that extend others. :param complex_body: Please put a siamese with id=2, name="Siameee", color=green, @@ -4154,9 +4092,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that extend others. :param complex_body: Please put a siamese with id=2, name="Siameee", color=green, @@ -4204,7 +4140,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4336,7 +4272,7 @@ def get_valid(self, **kwargs: Any) -> JSON: # response body for status code(s): 200 response == fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4377,9 +4313,7 @@ def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic. :param complex_body: Please put a salmon that looks like this: @@ -4486,9 +4420,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic. :param complex_body: Please put a salmon that looks like this: @@ -4638,7 +4570,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements # JSON input template you can fill out and use as your body input. complex_body = fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4708,7 +4640,7 @@ def get_dot_syntax(self, **kwargs: Any) -> JSON: # response body for status code(s): 200 response == dot_fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4794,7 +4726,7 @@ def get_composed_with_discriminator(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4880,7 +4812,7 @@ def get_composed_without_discriminator(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4951,7 +4883,7 @@ def get_complicated(self, **kwargs: Any) -> JSON: # response body for status code(s): 200 response == salmon """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4992,9 +4924,7 @@ def get_complicated(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_complicated( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_complicated(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic, but not at the root of the hierarchy; also have additional properties. @@ -5031,7 +4961,7 @@ def put_complicated( # pylint: disable=inconsistent-return-statements """ @overload - def put_complicated( # pylint: disable=inconsistent-return-statements + def put_complicated( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, but not at the root of the hierarchy; also have @@ -5082,7 +5012,7 @@ def put_complicated( # pylint: disable=inconsistent-return-statements # JSON input template you can fill out and use as your body input. complex_body = salmon """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5273,7 +5203,7 @@ def put_missing_discriminator(self, complex_body: Union[JSON, IO[bytes]], **kwar # response body for status code(s): 200 response == salmon """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5326,7 +5256,7 @@ def put_missing_discriminator(self, complex_body: Union[JSON, IO[bytes]], **kwar return cast(JSON, deserialized) # type: ignore @overload - def put_valid_missing_required( # pylint: disable=inconsistent-return-statements + def put_valid_missing_required( self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, attempting to omit required 'birthday' field - the @@ -5430,7 +5360,7 @@ def put_valid_missing_required( # pylint: disable=inconsistent-return-statement """ @overload - def put_valid_missing_required( # pylint: disable=inconsistent-return-statements + def put_valid_missing_required( self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put complex types that are polymorphic, attempting to omit required 'birthday' field - the @@ -5572,7 +5502,7 @@ def put_valid_missing_required( # pylint: disable=inconsistent-return-statement # JSON input template you can fill out and use as your body input. complex_body = fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5704,7 +5634,7 @@ def get_valid(self, **kwargs: Any) -> JSON: # response body for status code(s): 200 response == fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5745,9 +5675,7 @@ def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic and have recursive references. :param complex_body: Please put a salmon that looks like this: @@ -5874,9 +5802,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that are polymorphic and have recursive references. :param complex_body: Please put a salmon that looks like this: @@ -6066,7 +5992,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements # JSON input template you can fill out and use as your body input. complex_body = fish """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6146,7 +6072,7 @@ def get_valid(self, **kwargs: Any) -> JSON: "size": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6187,9 +6113,7 @@ def get_valid(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that have readonly properties. :param complex_body: Required. @@ -6212,9 +6136,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_valid( # pylint: disable=inconsistent-return-statements - self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_valid(self, complex_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put complex types that have readonly properties. :param complex_body: Required. @@ -6248,7 +6170,7 @@ def put_valid( # pylint: disable=inconsistent-return-statements "size": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6338,7 +6260,7 @@ def get_valid(self, **kwargs: Any) -> JSON: # response body for status code(s): 200 response == my_base_type """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/aio/operations/_operations.py index cadb66828b3..6bf785bccdc 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -68,7 +67,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -116,7 +115,7 @@ async def get_invalid(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -164,7 +163,7 @@ async def get_overflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -212,7 +211,7 @@ async def get_underflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,9 +252,7 @@ async def get_underflow(self, **kwargs: Any) -> datetime.datetime: return cast(datetime.datetime, deserialized) # type: ignore @distributed_trace_async - async def put_utc_max_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_utc_max_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put max datetime value Fri, 31 Dec 9999 23:59:59 GMT. :param datetime_body: datetime body. Required. @@ -264,7 +261,7 @@ async def put_utc_max_date_time( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -310,7 +307,7 @@ async def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datet :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -358,7 +355,7 @@ async def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datet :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -399,9 +396,7 @@ async def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datet return cast(datetime.datetime, deserialized) # type: ignore @distributed_trace_async - async def put_utc_min_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_utc_min_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put min datetime value Mon, 1 Jan 0001 00:00:00 GMT. :param datetime_body: datetime body. Required. @@ -410,7 +405,7 @@ async def put_utc_min_date_time( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -456,7 +451,7 @@ async def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/operations/_operations.py index 37c20312fc7..15b605f3f7d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/bodydatetimerfc1123versiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -201,7 +200,7 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -249,7 +248,7 @@ def get_invalid(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -297,7 +296,7 @@ def get_overflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -345,7 +344,7 @@ def get_underflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -397,7 +396,7 @@ def put_utc_max_date_time( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -443,7 +442,7 @@ def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -491,7 +490,7 @@ def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -543,7 +542,7 @@ def put_utc_min_date_time( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -589,7 +588,7 @@ def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/_configuration.py index 518c2823f7c..219f45e5cb1 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestDateTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDateTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDateTimeTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/aio/_configuration.py index c9dd8c3d20c..456ca558015 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestDateTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDateTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDateTimeTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/aio/operations/_operations.py index 9c458d2ccb9..8c557e40439 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -51,7 +51,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +81,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -129,7 +129,7 @@ async def get_invalid(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -177,7 +177,7 @@ async def get_overflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,7 +225,7 @@ async def get_underflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,9 +266,7 @@ async def get_underflow(self, **kwargs: Any) -> datetime.datetime: return cast(datetime.datetime, deserialized) # type: ignore @distributed_trace_async - async def put_utc_max_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_utc_max_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put max datetime value 9999-12-31T23:59:59.999Z. :param datetime_body: datetime body. Required. @@ -277,7 +275,7 @@ async def put_utc_max_date_time( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -316,9 +314,7 @@ async def put_utc_max_date_time( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_utc_max_date_time7_digits( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_utc_max_date_time7_digits(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put max datetime value 9999-12-31T23:59:59.9999999Z. This is against the recommendation that asks for 3 digits, but allow to test what happens in @@ -330,7 +326,7 @@ async def put_utc_max_date_time7_digits( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -376,7 +372,7 @@ async def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datet :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -424,7 +420,7 @@ async def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datet :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -475,7 +471,7 @@ async def get_utc_uppercase_max_date_time7_digits(self, **kwargs: Any) -> dateti :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -516,9 +512,7 @@ async def get_utc_uppercase_max_date_time7_digits(self, **kwargs: Any) -> dateti return cast(datetime.datetime, deserialized) # type: ignore @distributed_trace_async - async def put_local_positive_offset_max_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_local_positive_offset_max_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put max datetime value with positive numoffset 9999-12-31t23:59:59.999+14:00. :param datetime_body: datetime body. Required. @@ -527,7 +521,7 @@ async def put_local_positive_offset_max_date_time( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -575,7 +569,7 @@ async def get_local_positive_offset_lowercase_max_date_time( # pylint: disable= :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -625,7 +619,7 @@ async def get_local_positive_offset_uppercase_max_date_time( # pylint: disable= :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -666,9 +660,7 @@ async def get_local_positive_offset_uppercase_max_date_time( # pylint: disable= return cast(datetime.datetime, deserialized) # type: ignore @distributed_trace_async - async def put_local_negative_offset_max_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_local_negative_offset_max_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put max datetime value with positive numoffset 9999-12-31t23:59:59.999-14:00. :param datetime_body: datetime body. Required. @@ -677,7 +669,7 @@ async def put_local_negative_offset_max_date_time( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -725,7 +717,7 @@ async def get_local_negative_offset_uppercase_max_date_time( # pylint: disable= :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -775,7 +767,7 @@ async def get_local_negative_offset_lowercase_max_date_time( # pylint: disable= :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -816,9 +808,7 @@ async def get_local_negative_offset_lowercase_max_date_time( # pylint: disable= return cast(datetime.datetime, deserialized) # type: ignore @distributed_trace_async - async def put_utc_min_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_utc_min_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put min datetime value 0001-01-01T00:00:00Z. :param datetime_body: datetime body. Required. @@ -827,7 +817,7 @@ async def put_utc_min_date_time( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -873,7 +863,7 @@ async def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -914,9 +904,7 @@ async def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: return cast(datetime.datetime, deserialized) # type: ignore @distributed_trace_async - async def put_local_positive_offset_min_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_local_positive_offset_min_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put min datetime value 0001-01-01T00:00:00+14:00. :param datetime_body: datetime body. Required. @@ -925,7 +913,7 @@ async def put_local_positive_offset_min_date_time( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -971,7 +959,7 @@ async def get_local_positive_offset_min_date_time(self, **kwargs: Any) -> dateti :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1012,9 +1000,7 @@ async def get_local_positive_offset_min_date_time(self, **kwargs: Any) -> dateti return cast(datetime.datetime, deserialized) # type: ignore @distributed_trace_async - async def put_local_negative_offset_min_date_time( # pylint: disable=inconsistent-return-statements - self, datetime_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_local_negative_offset_min_date_time(self, datetime_body: datetime.datetime, **kwargs: Any) -> None: """Put min datetime value 0001-01-01T00:00:00-14:00. :param datetime_body: datetime body. Required. @@ -1023,7 +1009,7 @@ async def put_local_negative_offset_min_date_time( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1069,7 +1055,7 @@ async def get_local_negative_offset_min_date_time(self, **kwargs: Any) -> dateti :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1117,7 +1103,7 @@ async def get_local_no_offset_min_date_time(self, **kwargs: Any) -> datetime.dat :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/operations/_operations.py index ab031414f1b..f75c44f5a0c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/bodydatetimeversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -424,7 +424,7 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -472,7 +472,7 @@ def get_invalid(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -520,7 +520,7 @@ def get_overflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -568,7 +568,7 @@ def get_underflow(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -620,7 +620,7 @@ def put_utc_max_date_time( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -673,7 +673,7 @@ def put_utc_max_date_time7_digits( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -719,7 +719,7 @@ def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,7 +767,7 @@ def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -818,7 +818,7 @@ def get_utc_uppercase_max_date_time7_digits(self, **kwargs: Any) -> datetime.dat :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -870,7 +870,7 @@ def put_local_positive_offset_max_date_time( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -918,7 +918,7 @@ def get_local_positive_offset_lowercase_max_date_time( # pylint: disable=name-t :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +968,7 @@ def get_local_positive_offset_uppercase_max_date_time( # pylint: disable=name-t :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1020,7 +1020,7 @@ def put_local_negative_offset_max_date_time( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1068,7 +1068,7 @@ def get_local_negative_offset_uppercase_max_date_time( # pylint: disable=name-t :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1118,7 +1118,7 @@ def get_local_negative_offset_lowercase_max_date_time( # pylint: disable=name-t :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1170,7 +1170,7 @@ def put_utc_min_date_time( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1216,7 +1216,7 @@ def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1268,7 +1268,7 @@ def put_local_positive_offset_min_date_time( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1314,7 +1314,7 @@ def get_local_positive_offset_min_date_time(self, **kwargs: Any) -> datetime.dat :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1366,7 +1366,7 @@ def put_local_negative_offset_min_date_time( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1412,7 +1412,7 @@ def get_local_negative_offset_min_date_time(self, **kwargs: Any) -> datetime.dat :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1460,7 +1460,7 @@ def get_local_no_offset_min_date_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/_configuration.py index e9e1250ddc2..02320ab2fa0 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestDateTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDateTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDateTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/aio/_configuration.py index 819bf167db8..5396196f09d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestDateTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDateTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDateTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/aio/operations/_operations.py index 8c3b9b901c1..c1575621087 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +66,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.date]: :rtype: ~datetime.date or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -115,7 +114,7 @@ async def get_invalid_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -163,7 +162,7 @@ async def get_overflow_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -211,7 +210,7 @@ async def get_underflow_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -252,9 +251,7 @@ async def get_underflow_date(self, **kwargs: Any) -> datetime.date: return cast(datetime.date, deserialized) # type: ignore @distributed_trace_async - async def put_max_date( # pylint: disable=inconsistent-return-statements - self, date_body: datetime.date, **kwargs: Any - ) -> None: + async def put_max_date(self, date_body: datetime.date, **kwargs: Any) -> None: """Put max date value 9999-12-31. :param date_body: date body. Required. @@ -263,7 +260,7 @@ async def put_max_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,7 +306,7 @@ async def get_max_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -350,9 +347,7 @@ async def get_max_date(self, **kwargs: Any) -> datetime.date: return cast(datetime.date, deserialized) # type: ignore @distributed_trace_async - async def put_min_date( # pylint: disable=inconsistent-return-statements - self, date_body: datetime.date, **kwargs: Any - ) -> None: + async def put_min_date(self, date_body: datetime.date, **kwargs: Any) -> None: """Put min date value 0000-01-01. :param date_body: date body. Required. @@ -361,7 +356,7 @@ async def put_min_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -407,7 +402,7 @@ async def get_min_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/operations/_operations.py index 9d964f776b7..96f0e1adc22 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/bodydateversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -179,7 +178,7 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.date]: :rtype: ~datetime.date or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -227,7 +226,7 @@ def get_invalid_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -275,7 +274,7 @@ def get_overflow_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -323,7 +322,7 @@ def get_underflow_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -375,7 +374,7 @@ def put_max_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -421,7 +420,7 @@ def get_max_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -473,7 +472,7 @@ def put_min_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -519,7 +518,7 @@ def get_min_date(self, **kwargs: Any) -> datetime.date: :rtype: ~datetime.date :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/aio/operations/_operations.py index 09f2bf57273..d286ba0a094 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -95,7 +95,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -134,7 +134,7 @@ async def get_null(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -190,7 +190,7 @@ async def get_empty(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -231,7 +231,7 @@ async def get_empty(self, **kwargs: Any) -> Dict[str, int]: return cast(Dict[str, int], deserialized) # type: ignore @overload - async def put_empty( # pylint: disable=inconsistent-return-statements + async def put_empty( self, array_body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {}. @@ -255,9 +255,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value empty {}. :param array_body: Required. @@ -271,9 +269,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_empty(self, array_body: Union[Dict[str, str], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value empty {}. :param array_body: Is either a {str: str} type or a IO[bytes] type. Required. @@ -282,7 +278,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -343,7 +339,7 @@ async def get_null_value(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -399,7 +395,7 @@ async def get_null_key(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -455,7 +451,7 @@ async def get_empty_string_key(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -511,7 +507,7 @@ async def get_invalid(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -567,7 +563,7 @@ async def get_boolean_tfft(self, **kwargs: Any) -> Dict[str, bool]: "str": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -608,7 +604,7 @@ async def get_boolean_tfft(self, **kwargs: Any) -> Dict[str, bool]: return cast(Dict[str, bool], deserialized) # type: ignore @overload - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + async def put_boolean_tfft( self, array_body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. @@ -632,7 +628,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @overload - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + async def put_boolean_tfft( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. @@ -648,9 +644,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put_boolean_tfft(self, array_body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. :param array_body: Is either a {str: bool} type or a IO[bytes] type. Required. @@ -659,7 +653,7 @@ async def put_boolean_tfft( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -720,7 +714,7 @@ async def get_boolean_invalid_null(self, **kwargs: Any) -> Dict[str, bool]: "str": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +770,7 @@ async def get_boolean_invalid_string(self, **kwargs: Any) -> Dict[str, bool]: "str": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -832,7 +826,7 @@ async def get_integer_valid(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -873,7 +867,7 @@ async def get_integer_valid(self, **kwargs: Any) -> Dict[str, int]: return cast(Dict[str, int], deserialized) # type: ignore @overload - async def put_integer_valid( # pylint: disable=inconsistent-return-statements + async def put_integer_valid( self, array_body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -897,7 +891,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_integer_valid( # pylint: disable=inconsistent-return-statements + async def put_integer_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -913,9 +907,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_integer_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, int], IO[bytes]], **kwargs: Any - ) -> None: + async def put_integer_valid(self, array_body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. :param array_body: Is either a {str: int} type or a IO[bytes] type. Required. @@ -924,7 +916,7 @@ async def put_integer_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -985,7 +977,7 @@ async def get_int_invalid_null(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1041,7 +1033,7 @@ async def get_int_invalid_string(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1097,7 +1089,7 @@ async def get_long_valid(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1138,7 +1130,7 @@ async def get_long_valid(self, **kwargs: Any) -> Dict[str, int]: return cast(Dict[str, int], deserialized) # type: ignore @overload - async def put_long_valid( # pylint: disable=inconsistent-return-statements + async def put_long_valid( self, array_body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -1162,7 +1154,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_long_valid( # pylint: disable=inconsistent-return-statements + async def put_long_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -1178,9 +1170,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, int], IO[bytes]], **kwargs: Any - ) -> None: + async def put_long_valid(self, array_body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. :param array_body: Is either a {str: int} type or a IO[bytes] type. Required. @@ -1189,7 +1179,7 @@ async def put_long_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1250,7 +1240,7 @@ async def get_long_invalid_null(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1306,7 +1296,7 @@ async def get_long_invalid_string(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1362,7 +1352,7 @@ async def get_float_valid(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1403,7 +1393,7 @@ async def get_float_valid(self, **kwargs: Any) -> Dict[str, float]: return cast(Dict[str, float], deserialized) # type: ignore @overload - async def put_float_valid( # pylint: disable=inconsistent-return-statements + async def put_float_valid( self, array_body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -1427,7 +1417,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_float_valid( # pylint: disable=inconsistent-return-statements + async def put_float_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -1443,9 +1433,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_float_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, float], IO[bytes]], **kwargs: Any - ) -> None: + async def put_float_valid(self, array_body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. :param array_body: Is either a {str: float} type or a IO[bytes] type. Required. @@ -1454,7 +1442,7 @@ async def put_float_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1515,7 +1503,7 @@ async def get_float_invalid_null(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1571,7 +1559,7 @@ async def get_float_invalid_string(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1627,7 +1615,7 @@ async def get_double_valid(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1668,7 +1656,7 @@ async def get_double_valid(self, **kwargs: Any) -> Dict[str, float]: return cast(Dict[str, float], deserialized) # type: ignore @overload - async def put_double_valid( # pylint: disable=inconsistent-return-statements + async def put_double_valid( self, array_body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -1692,7 +1680,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_double_valid( # pylint: disable=inconsistent-return-statements + async def put_double_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -1708,9 +1696,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_double_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, float], IO[bytes]], **kwargs: Any - ) -> None: + async def put_double_valid(self, array_body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. :param array_body: Is either a {str: float} type or a IO[bytes] type. Required. @@ -1719,7 +1705,7 @@ async def put_double_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1780,7 +1766,7 @@ async def get_double_invalid_null(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1836,7 +1822,7 @@ async def get_double_invalid_string(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1892,7 +1878,7 @@ async def get_string_valid(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1933,7 +1919,7 @@ async def get_string_valid(self, **kwargs: Any) -> Dict[str, str]: return cast(Dict[str, str], deserialized) # type: ignore @overload - async def put_string_valid( # pylint: disable=inconsistent-return-statements + async def put_string_valid( self, array_body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. @@ -1957,7 +1943,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_string_valid( # pylint: disable=inconsistent-return-statements + async def put_string_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. @@ -1973,9 +1959,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, str], IO[bytes]], **kwargs: Any - ) -> None: + async def put_string_valid(self, array_body: Union[Dict[str, str], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. :param array_body: Is either a {str: str} type or a IO[bytes] type. Required. @@ -1984,7 +1968,7 @@ async def put_string_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2045,7 +2029,7 @@ async def get_string_with_null(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2101,7 +2085,7 @@ async def get_string_with_invalid(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2157,7 +2141,7 @@ async def get_date_valid(self, **kwargs: Any) -> Dict[str, datetime.date]: "str": "2020-02-20" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2198,7 +2182,7 @@ async def get_date_valid(self, **kwargs: Any) -> Dict[str, datetime.date]: return cast(Dict[str, datetime.date], deserialized) # type: ignore @overload - async def put_date_valid( # pylint: disable=inconsistent-return-statements + async def put_date_valid( self, array_body: Dict[str, datetime.date], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}. @@ -2222,7 +2206,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_valid( # pylint: disable=inconsistent-return-statements + async def put_date_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}. @@ -2238,9 +2222,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, datetime.date], IO[bytes]], **kwargs: Any - ) -> None: + async def put_date_valid(self, array_body: Union[Dict[str, datetime.date], IO[bytes]], **kwargs: Any) -> None: """Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}. :param array_body: Is either a {str: datetime.date} type or a IO[bytes] type. Required. @@ -2249,7 +2231,7 @@ async def put_date_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2310,7 +2292,7 @@ async def get_date_invalid_null(self, **kwargs: Any) -> Dict[str, datetime.date] "str": "2020-02-20" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2366,7 +2348,7 @@ async def get_date_invalid_chars(self, **kwargs: Any) -> Dict[str, datetime.date "str": "2020-02-20" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2423,7 +2405,7 @@ async def get_date_time_valid(self, **kwargs: Any) -> Dict[str, datetime.datetim "str": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2464,7 +2446,7 @@ async def get_date_time_valid(self, **kwargs: Any) -> Dict[str, datetime.datetim return cast(Dict[str, datetime.datetime], deserialized) # type: ignore @overload - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": @@ -2489,7 +2471,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": @@ -2506,7 +2488,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_date_time_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_valid( self, array_body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": @@ -2518,7 +2500,7 @@ async def put_date_time_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2579,7 +2561,7 @@ async def get_date_time_invalid_null(self, **kwargs: Any) -> Dict[str, datetime. "str": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2635,7 +2617,7 @@ async def get_date_time_invalid_chars(self, **kwargs: Any) -> Dict[str, datetime "str": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2692,7 +2674,7 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> Dict[str, datetime "str": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2733,7 +2715,7 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> Dict[str, datetime return cast(Dict[str, datetime.datetime], deserialized) # type: ignore @overload - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 @@ -2758,7 +2740,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st """ @overload - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 @@ -2775,7 +2757,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st """ @distributed_trace_async - async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + async def put_date_time_rfc1123_valid( self, array_body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any ) -> None: """Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 @@ -2787,7 +2769,7 @@ async def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2848,7 +2830,7 @@ async def get_duration_valid(self, **kwargs: Any) -> Dict[str, datetime.timedelt "str": "1 day, 0:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2889,7 +2871,7 @@ async def get_duration_valid(self, **kwargs: Any) -> Dict[str, datetime.timedelt return cast(Dict[str, datetime.timedelta], deserialized) # type: ignore @overload - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. @@ -2913,7 +2895,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. @@ -2929,7 +2911,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_duration_valid( # pylint: disable=inconsistent-return-statements + async def put_duration_valid( self, array_body: Union[Dict[str, datetime.timedelta], IO[bytes]], **kwargs: Any ) -> None: """Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. @@ -2940,7 +2922,7 @@ async def put_duration_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3002,7 +2984,7 @@ async def get_byte_valid(self, **kwargs: Any) -> Dict[str, bytes]: "str": bytes("bytes", encoding="utf-8") } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3043,7 +3025,7 @@ async def get_byte_valid(self, **kwargs: Any) -> Dict[str, bytes]: return cast(Dict[str, bytes], deserialized) # type: ignore @overload - async def put_byte_valid( # pylint: disable=inconsistent-return-statements + async def put_byte_valid( self, array_body: Dict[str, bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} @@ -3068,7 +3050,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_byte_valid( # pylint: disable=inconsistent-return-statements + async def put_byte_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} @@ -3085,9 +3067,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, bytes], IO[bytes]], **kwargs: Any - ) -> None: + async def put_byte_valid(self, array_body: Union[Dict[str, bytes], IO[bytes]], **kwargs: Any) -> None: """Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} with each elementencoded in base 64. @@ -3097,7 +3077,7 @@ async def put_byte_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3159,7 +3139,7 @@ async def get_byte_invalid_null(self, **kwargs: Any) -> Dict[str, bytes]: "str": bytes("bytes", encoding="utf-8") } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3216,7 +3196,7 @@ async def get_base64_url(self, **kwargs: Any) -> Dict[str, bytes]: "str": bytes("bytes", encoding="utf-8") } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3275,7 +3255,7 @@ async def get_complex_null(self, **kwargs: Any) -> Optional[Dict[str, JSON]]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3334,7 +3314,7 @@ async def get_complex_empty(self, **kwargs: Any) -> Dict[str, JSON]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3394,7 +3374,7 @@ async def get_complex_item_null(self, **kwargs: Any) -> Dict[str, JSON]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3454,7 +3434,7 @@ async def get_complex_item_empty(self, **kwargs: Any) -> Dict[str, JSON]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3514,7 +3494,7 @@ async def get_complex_valid(self, **kwargs: Any) -> Dict[str, JSON]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3555,7 +3535,7 @@ async def get_complex_valid(self, **kwargs: Any) -> Dict[str, JSON]: return cast(Dict[str, JSON], deserialized) # type: ignore @overload - async def put_complex_valid( # pylint: disable=inconsistent-return-statements + async def put_complex_valid( self, array_body: Dict[str, JSON], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": @@ -3583,7 +3563,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_complex_valid( # pylint: disable=inconsistent-return-statements + async def put_complex_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": @@ -3600,9 +3580,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_complex_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, JSON], IO[bytes]], **kwargs: Any - ) -> None: + async def put_complex_valid(self, array_body: Union[Dict[str, JSON], IO[bytes]], **kwargs: Any) -> None: """Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": {"integer": 3, "string": "4"}, "2": {"integer": 5, "string": "6"}}. @@ -3612,7 +3590,7 @@ async def put_complex_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3675,7 +3653,7 @@ async def get_array_null(self, **kwargs: Any) -> Optional[Dict[str, List[str]]]: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3733,7 +3711,7 @@ async def get_array_empty(self, **kwargs: Any) -> Dict[str, List[str]]: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3791,7 +3769,7 @@ async def get_array_item_null(self, **kwargs: Any) -> Dict[str, List[str]]: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3849,7 +3827,7 @@ async def get_array_item_empty(self, **kwargs: Any) -> Dict[str, List[str]]: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3908,7 +3886,7 @@ async def get_array_valid(self, **kwargs: Any) -> Dict[str, List[str]]: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3949,7 +3927,7 @@ async def get_array_valid(self, **kwargs: Any) -> Dict[str, List[str]]: return cast(Dict[str, List[str]], deserialized) # type: ignore @overload - async def put_array_valid( # pylint: disable=inconsistent-return-statements + async def put_array_valid( self, array_body: Dict[str, List[str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", @@ -3976,7 +3954,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def put_array_valid( # pylint: disable=inconsistent-return-statements + async def put_array_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", @@ -3993,9 +3971,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_array_valid( # pylint: disable=inconsistent-return-statements - self, array_body: Union[Dict[str, List[str]], IO[bytes]], **kwargs: Any - ) -> None: + async def put_array_valid(self, array_body: Union[Dict[str, List[str]], IO[bytes]], **kwargs: Any) -> None: """Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", "9"]}. @@ -4005,7 +3981,7 @@ async def put_array_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4068,7 +4044,7 @@ async def get_dictionary_null(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4126,7 +4102,7 @@ async def get_dictionary_empty(self, **kwargs: Any) -> Dict[str, Dict[str, str]] } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4185,7 +4161,7 @@ async def get_dictionary_item_null(self, **kwargs: Any) -> Dict[str, Dict[str, s } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4244,7 +4220,7 @@ async def get_dictionary_item_empty(self, **kwargs: Any) -> Dict[str, Dict[str, } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4304,7 +4280,7 @@ async def get_dictionary_valid(self, **kwargs: Any) -> Dict[str, Dict[str, str]] } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4345,7 +4321,7 @@ async def get_dictionary_valid(self, **kwargs: Any) -> Dict[str, Dict[str, str]] return cast(Dict[str, Dict[str, str]], deserialized) # type: ignore @overload - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: Dict[str, Dict[str, str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": @@ -4373,7 +4349,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement """ @overload - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": @@ -4391,7 +4367,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement """ @distributed_trace_async - async def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + async def put_dictionary_valid( self, array_body: Union[Dict[str, Dict[str, str]], IO[bytes]], **kwargs: Any ) -> None: """Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": @@ -4404,7 +4380,7 @@ async def put_dictionary_valid( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/operations/_operations.py index 882f706b286..718fa97146b 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/bodydictionaryversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import datetime from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1026,7 +1026,7 @@ def get_null(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1082,7 +1082,7 @@ def get_empty(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1123,9 +1123,7 @@ def get_empty(self, **kwargs: Any) -> Dict[str, int]: return cast(Dict[str, int], deserialized) # type: ignore @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, array_body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value empty {}. :param array_body: Required. @@ -1147,9 +1145,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value empty {}. :param array_body: Required. @@ -1174,7 +1170,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1235,7 +1231,7 @@ def get_null_value(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1291,7 +1287,7 @@ def get_null_key(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1347,7 +1343,7 @@ def get_empty_string_key(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1403,7 +1399,7 @@ def get_invalid(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1459,7 +1455,7 @@ def get_boolean_tfft(self, **kwargs: Any) -> Dict[str, bool]: "str": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1500,7 +1496,7 @@ def get_boolean_tfft(self, **kwargs: Any) -> Dict[str, bool]: return cast(Dict[str, bool], deserialized) # type: ignore @overload - def put_boolean_tfft( # pylint: disable=inconsistent-return-statements + def put_boolean_tfft( self, array_body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. @@ -1524,9 +1520,7 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements """ @overload - def put_boolean_tfft( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_boolean_tfft(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. :param array_body: Required. @@ -1551,7 +1545,7 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1612,7 +1606,7 @@ def get_boolean_invalid_null(self, **kwargs: Any) -> Dict[str, bool]: "str": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1668,7 +1662,7 @@ def get_boolean_invalid_string(self, **kwargs: Any) -> Dict[str, bool]: "str": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1724,7 +1718,7 @@ def get_integer_valid(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1765,7 +1759,7 @@ def get_integer_valid(self, **kwargs: Any) -> Dict[str, int]: return cast(Dict[str, int], deserialized) # type: ignore @overload - def put_integer_valid( # pylint: disable=inconsistent-return-statements + def put_integer_valid( self, array_body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -1789,7 +1783,7 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_integer_valid( # pylint: disable=inconsistent-return-statements + def put_integer_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -1816,7 +1810,7 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1877,7 +1871,7 @@ def get_int_invalid_null(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1933,7 +1927,7 @@ def get_int_invalid_string(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1989,7 +1983,7 @@ def get_long_valid(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2030,7 +2024,7 @@ def get_long_valid(self, **kwargs: Any) -> Dict[str, int]: return cast(Dict[str, int], deserialized) # type: ignore @overload - def put_long_valid( # pylint: disable=inconsistent-return-statements + def put_long_valid( self, array_body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. @@ -2054,9 +2048,7 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_long_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_long_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300}. :param array_body: Required. @@ -2081,7 +2073,7 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2142,7 +2134,7 @@ def get_long_invalid_null(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2198,7 +2190,7 @@ def get_long_invalid_string(self, **kwargs: Any) -> Dict[str, int]: "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2254,7 +2246,7 @@ def get_float_valid(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2295,7 +2287,7 @@ def get_float_valid(self, **kwargs: Any) -> Dict[str, float]: return cast(Dict[str, float], deserialized) # type: ignore @overload - def put_float_valid( # pylint: disable=inconsistent-return-statements + def put_float_valid( self, array_body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -2319,9 +2311,7 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_float_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_float_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. :param array_body: Required. @@ -2346,7 +2336,7 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2407,7 +2397,7 @@ def get_float_invalid_null(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2463,7 +2453,7 @@ def get_float_invalid_string(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2519,7 +2509,7 @@ def get_double_valid(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2560,7 +2550,7 @@ def get_double_valid(self, **kwargs: Any) -> Dict[str, float]: return cast(Dict[str, float], deserialized) # type: ignore @overload - def put_double_valid( # pylint: disable=inconsistent-return-statements + def put_double_valid( self, array_body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. @@ -2584,9 +2574,7 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_double_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_double_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. :param array_body: Required. @@ -2611,7 +2599,7 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2672,7 +2660,7 @@ def get_double_invalid_null(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2728,7 +2716,7 @@ def get_double_invalid_string(self, **kwargs: Any) -> Dict[str, float]: "str": 0.0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2784,7 +2772,7 @@ def get_string_valid(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2825,7 +2813,7 @@ def get_string_valid(self, **kwargs: Any) -> Dict[str, str]: return cast(Dict[str, str], deserialized) # type: ignore @overload - def put_string_valid( # pylint: disable=inconsistent-return-statements + def put_string_valid( self, array_body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. @@ -2849,9 +2837,7 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_string_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_string_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. :param array_body: Required. @@ -2876,7 +2862,7 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2937,7 +2923,7 @@ def get_string_with_null(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2993,7 +2979,7 @@ def get_string_with_invalid(self, **kwargs: Any) -> Dict[str, str]: "str": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3049,7 +3035,7 @@ def get_date_valid(self, **kwargs: Any) -> Dict[str, datetime.date]: "str": "2020-02-20" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3090,7 +3076,7 @@ def get_date_valid(self, **kwargs: Any) -> Dict[str, datetime.date]: return cast(Dict[str, datetime.date], deserialized) # type: ignore @overload - def put_date_valid( # pylint: disable=inconsistent-return-statements + def put_date_valid( self, array_body: Dict[str, datetime.date], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}. @@ -3114,9 +3100,7 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_date_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}. :param array_body: Required. @@ -3141,7 +3125,7 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3202,7 +3186,7 @@ def get_date_invalid_null(self, **kwargs: Any) -> Dict[str, datetime.date]: "str": "2020-02-20" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3258,7 +3242,7 @@ def get_date_invalid_chars(self, **kwargs: Any) -> Dict[str, datetime.date]: "str": "2020-02-20" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3315,7 +3299,7 @@ def get_date_time_valid(self, **kwargs: Any) -> Dict[str, datetime.datetime]: "str": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3356,7 +3340,7 @@ def get_date_time_valid(self, **kwargs: Any) -> Dict[str, datetime.datetime]: return cast(Dict[str, datetime.datetime], deserialized) # type: ignore @overload - def put_date_time_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_valid( self, array_body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": @@ -3381,7 +3365,7 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_date_time_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": @@ -3410,7 +3394,7 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3471,7 +3455,7 @@ def get_date_time_invalid_null(self, **kwargs: Any) -> Dict[str, datetime.dateti "str": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3527,7 +3511,7 @@ def get_date_time_invalid_chars(self, **kwargs: Any) -> Dict[str, datetime.datet "str": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3584,7 +3568,7 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> Dict[str, datetime.datet "str": "2020-02-20 00:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3625,7 +3609,7 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> Dict[str, datetime.datet return cast(Dict[str, datetime.datetime], deserialized) # type: ignore @overload - def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123_valid( self, array_body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 @@ -3650,7 +3634,7 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen """ @overload - def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statements + def put_date_time_rfc1123_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 @@ -3679,7 +3663,7 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3740,7 +3724,7 @@ def get_duration_valid(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: "str": "1 day, 0:00:00" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3781,7 +3765,7 @@ def get_duration_valid(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: return cast(Dict[str, datetime.timedelta], deserialized) # type: ignore @overload - def put_duration_valid( # pylint: disable=inconsistent-return-statements + def put_duration_valid( self, array_body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. @@ -3805,7 +3789,7 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_duration_valid( # pylint: disable=inconsistent-return-statements + def put_duration_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. @@ -3832,7 +3816,7 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3894,7 +3878,7 @@ def get_byte_valid(self, **kwargs: Any) -> Dict[str, bytes]: "str": bytes("bytes", encoding="utf-8") } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3935,7 +3919,7 @@ def get_byte_valid(self, **kwargs: Any) -> Dict[str, bytes]: return cast(Dict[str, bytes], deserialized) # type: ignore @overload - def put_byte_valid( # pylint: disable=inconsistent-return-statements + def put_byte_valid( self, array_body: Dict[str, bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} @@ -3960,9 +3944,7 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_byte_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_byte_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} with each elementencoded in base 64. @@ -3989,7 +3971,7 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4051,7 +4033,7 @@ def get_byte_invalid_null(self, **kwargs: Any) -> Dict[str, bytes]: "str": bytes("bytes", encoding="utf-8") } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4108,7 +4090,7 @@ def get_base64_url(self, **kwargs: Any) -> Dict[str, bytes]: "str": bytes("bytes", encoding="utf-8") } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4167,7 +4149,7 @@ def get_complex_null(self, **kwargs: Any) -> Optional[Dict[str, JSON]]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4226,7 +4208,7 @@ def get_complex_empty(self, **kwargs: Any) -> Dict[str, JSON]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4286,7 +4268,7 @@ def get_complex_item_null(self, **kwargs: Any) -> Dict[str, JSON]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4346,7 +4328,7 @@ def get_complex_item_empty(self, **kwargs: Any) -> Dict[str, JSON]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4406,7 +4388,7 @@ def get_complex_valid(self, **kwargs: Any) -> Dict[str, JSON]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4447,7 +4429,7 @@ def get_complex_valid(self, **kwargs: Any) -> Dict[str, JSON]: return cast(Dict[str, JSON], deserialized) # type: ignore @overload - def put_complex_valid( # pylint: disable=inconsistent-return-statements + def put_complex_valid( self, array_body: Dict[str, JSON], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": @@ -4475,7 +4457,7 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_complex_valid( # pylint: disable=inconsistent-return-statements + def put_complex_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": @@ -4504,7 +4486,7 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4567,7 +4549,7 @@ def get_array_null(self, **kwargs: Any) -> Optional[Dict[str, List[str]]]: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4625,7 +4607,7 @@ def get_array_empty(self, **kwargs: Any) -> Dict[str, List[str]]: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4683,7 +4665,7 @@ def get_array_item_null(self, **kwargs: Any) -> Dict[str, List[str]]: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4741,7 +4723,7 @@ def get_array_item_empty(self, **kwargs: Any) -> Dict[str, List[str]]: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4800,7 +4782,7 @@ def get_array_valid(self, **kwargs: Any) -> Dict[str, List[str]]: ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4841,7 +4823,7 @@ def get_array_valid(self, **kwargs: Any) -> Dict[str, List[str]]: return cast(Dict[str, List[str]], deserialized) # type: ignore @overload - def put_array_valid( # pylint: disable=inconsistent-return-statements + def put_array_valid( self, array_body: Dict[str, List[str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", @@ -4868,9 +4850,7 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_array_valid( # pylint: disable=inconsistent-return-statements - self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_array_valid(self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", "9"]}. @@ -4897,7 +4877,7 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4960,7 +4940,7 @@ def get_dictionary_null(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5018,7 +4998,7 @@ def get_dictionary_empty(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5077,7 +5057,7 @@ def get_dictionary_item_null(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5136,7 +5116,7 @@ def get_dictionary_item_empty(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5196,7 +5176,7 @@ def get_dictionary_valid(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5237,7 +5217,7 @@ def get_dictionary_valid(self, **kwargs: Any) -> Dict[str, Dict[str, str]]: return cast(Dict[str, Dict[str, str]], deserialized) # type: ignore @overload - def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + def put_dictionary_valid( self, array_body: Dict[str, Dict[str, str]], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": @@ -5265,7 +5245,7 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements """ @overload - def put_dictionary_valid( # pylint: disable=inconsistent-return-statements + def put_dictionary_valid( self, array_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": @@ -5296,7 +5276,7 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/_configuration.py index e4448ee79b4..4c8dabf1a84 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDurationTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/aio/_configuration.py index 131a151c25e..2720ec54e59 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestDurationTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestDurationTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/aio/operations/_operations.py index 8dfb2ecba7a..379bb1772b9 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,7 +62,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: :rtype: ~datetime.timedelta or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -104,9 +103,7 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: return cast(Optional[datetime.timedelta], deserialized) # type: ignore @distributed_trace_async - async def put_positive_duration( # pylint: disable=inconsistent-return-statements - self, duration_body: datetime.timedelta, **kwargs: Any - ) -> None: + async def put_positive_duration(self, duration_body: datetime.timedelta, **kwargs: Any) -> None: """Put a positive duration value. :param duration_body: duration body. Required. @@ -115,7 +112,7 @@ async def put_positive_duration( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,7 +158,7 @@ async def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -209,7 +206,7 @@ async def get_invalid(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/operations/_operations.py index c20b83b87d6..bcede623ea1 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/bodydurationversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -122,7 +121,7 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: :rtype: ~datetime.timedelta or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -174,7 +173,7 @@ def put_positive_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,7 +219,7 @@ def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +267,7 @@ def get_invalid(self, **kwargs: Any) -> datetime.timedelta: :rtype: ~datetime.timedelta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/aio/operations/_operations.py index c4a0a058e8c..2b756cc46f2 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterator, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, AsyncIterator, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,7 +61,7 @@ async def get_file(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -111,7 +110,7 @@ async def get_file_large(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,7 +159,7 @@ async def get_empty_file(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/operations/_operations.py index 4f8ea3cfa35..e074d65fde3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/bodyfileversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterator, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Iterator, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -104,7 +103,7 @@ def get_file(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -153,7 +152,7 @@ def get_file_large(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -202,7 +201,7 @@ def get_empty_file(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/aio/operations/_operations.py index 1d5ec667415..7fbf76c9ec5 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, cast +from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -70,7 +69,7 @@ async def upload_file_via_body(self, file_content: IO[bytes], **kwargs: Any) -> :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/operations/_operations.py index d691bd72bac..92b8dd77d82 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/bodyformdataversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -92,7 +91,7 @@ def upload_file_via_body(self, file_content: IO[bytes], **kwargs: Any) -> Iterat :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/_configuration.py index 729c77b83ba..4e9f75919bc 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class BodyFormsDataURLEncodedConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class BodyFormsDataURLEncodedConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for BodyFormsDataURLEncoded. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/aio/_configuration.py index 1c25f7867d1..88785f26831 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class BodyFormsDataURLEncodedConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class BodyFormsDataURLEncodedConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for BodyFormsDataURLEncoded. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/aio/operations/_operations.py index 606dd97a350..ebdb6efae6f 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/operations/_operations.py index 3be34a5b17e..b5c2d8f290d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/bodyformurlencodeddataversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/_configuration.py index 564d09352e7..24bab0f210e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestIntegerTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestIntegerTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestIntegerTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/aio/_configuration.py index a42ef16e73c..c03e7bf6d08 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestIntegerTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestIntegerTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestIntegerTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/aio/operations/_operations.py index a8e694cfd00..8ae67831839 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -43,7 +42,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -73,7 +72,7 @@ async def get_null(self, **kwargs: Any) -> Optional[int]: :rtype: int or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -121,7 +120,7 @@ async def get_invalid(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -169,7 +168,7 @@ async def get_overflow_int32(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -217,7 +216,7 @@ async def get_underflow_int32(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -265,7 +264,7 @@ async def get_overflow_int64(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -313,7 +312,7 @@ async def get_underflow_int64(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -354,7 +353,7 @@ async def get_underflow_int64(self, **kwargs: Any) -> int: return cast(int, deserialized) # type: ignore @distributed_trace_async - async def put_max32(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_max32(self, int_body: int, **kwargs: Any) -> None: """Put max int32 value. :param int_body: int body. Required. @@ -363,7 +362,7 @@ async def put_max32(self, int_body: int, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -402,7 +401,7 @@ async def put_max32(self, int_body: int, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_max64(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_max64(self, int_body: int, **kwargs: Any) -> None: """Put max int64 value. :param int_body: int body. Required. @@ -411,7 +410,7 @@ async def put_max64(self, int_body: int, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -450,7 +449,7 @@ async def put_max64(self, int_body: int, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_min32(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_min32(self, int_body: int, **kwargs: Any) -> None: """Put min int32 value. :param int_body: int body. Required. @@ -459,7 +458,7 @@ async def put_min32(self, int_body: int, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -498,7 +497,7 @@ async def put_min32(self, int_body: int, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_min64(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_min64(self, int_body: int, **kwargs: Any) -> None: """Put min int64 value. :param int_body: int body. Required. @@ -507,7 +506,7 @@ async def put_min64(self, int_body: int, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -553,7 +552,7 @@ async def get_unix_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -594,9 +593,7 @@ async def get_unix_time(self, **kwargs: Any) -> datetime.datetime: return cast(datetime.datetime, deserialized) # type: ignore @distributed_trace_async - async def put_unix_time_date( # pylint: disable=inconsistent-return-statements - self, int_body: datetime.datetime, **kwargs: Any - ) -> None: + async def put_unix_time_date(self, int_body: datetime.datetime, **kwargs: Any) -> None: """Put datetime encoded as Unix time. :param int_body: int body. Required. @@ -605,7 +602,7 @@ async def put_unix_time_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -651,7 +648,7 @@ async def get_invalid_unix_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -699,7 +696,7 @@ async def get_null_unix_time(self, **kwargs: Any) -> Optional[datetime.datetime] :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/operations/_operations.py index c6922910f65..439c270ce07 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/bodyintegerversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -274,7 +273,7 @@ def get_null(self, **kwargs: Any) -> Optional[int]: :rtype: int or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -322,7 +321,7 @@ def get_invalid(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -370,7 +369,7 @@ def get_overflow_int32(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -418,7 +417,7 @@ def get_underflow_int32(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -466,7 +465,7 @@ def get_overflow_int64(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -514,7 +513,7 @@ def get_underflow_int64(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -564,7 +563,7 @@ def put_max32(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -612,7 +611,7 @@ def put_max64(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -660,7 +659,7 @@ def put_min32(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -708,7 +707,7 @@ def put_min64(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -754,7 +753,7 @@ def get_unix_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -806,7 +805,7 @@ def put_unix_time_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,7 +851,7 @@ def get_invalid_unix_time(self, **kwargs: Any) -> datetime.datetime: :rtype: ~datetime.datetime :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -900,7 +899,7 @@ def get_null_unix_time(self, **kwargs: Any) -> Optional[datetime.datetime]: :rtype: ~datetime.datetime or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/_configuration.py index ece6b6ff624..db942dffcdd 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestNumberTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestNumberTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestNumberTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/aio/_configuration.py index 9dab82ed033..9e6932db3e4 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestNumberTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestNumberTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestNumberTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/aio/operations/_operations.py index 21c2a59bf5b..95f600724d4 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -52,7 +52,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -82,7 +82,7 @@ async def get_null(self, **kwargs: Any) -> Optional[float]: :rtype: float or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -130,7 +130,7 @@ async def get_invalid_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -178,7 +178,7 @@ async def get_invalid_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -226,7 +226,7 @@ async def get_invalid_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,9 +267,7 @@ async def get_invalid_decimal(self, **kwargs: Any) -> float: return cast(float, deserialized) # type: ignore @distributed_trace_async - async def put_big_float( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_big_float(self, number_body: float, **kwargs: Any) -> None: """Put big float value 3.402823e+20. :param number_body: number body. Required. @@ -278,7 +276,7 @@ async def put_big_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -324,7 +322,7 @@ async def get_big_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -365,9 +363,7 @@ async def get_big_float(self, **kwargs: Any) -> float: return cast(float, deserialized) # type: ignore @distributed_trace_async - async def put_big_double( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_big_double(self, number_body: float, **kwargs: Any) -> None: """Put big double value 2.5976931e+101. :param number_body: number body. Required. @@ -376,7 +372,7 @@ async def put_big_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -422,7 +418,7 @@ async def get_big_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -463,16 +459,14 @@ async def get_big_double(self, **kwargs: Any) -> float: return cast(float, deserialized) # type: ignore @distributed_trace_async - async def put_big_double_positive_decimal( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def put_big_double_positive_decimal(self, **kwargs: Any) -> None: """Put big double value 99999999.99. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -519,7 +513,7 @@ async def get_big_double_positive_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -560,16 +554,14 @@ async def get_big_double_positive_decimal(self, **kwargs: Any) -> float: return cast(float, deserialized) # type: ignore @distributed_trace_async - async def put_big_double_negative_decimal( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def put_big_double_negative_decimal(self, **kwargs: Any) -> None: """Put big double value -99999999.99. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -616,7 +608,7 @@ async def get_big_double_negative_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -657,9 +649,7 @@ async def get_big_double_negative_decimal(self, **kwargs: Any) -> float: return cast(float, deserialized) # type: ignore @distributed_trace_async - async def put_big_decimal( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_big_decimal(self, number_body: float, **kwargs: Any) -> None: """Put big decimal value 2.5976931e+101. :param number_body: number body. Required. @@ -668,7 +658,7 @@ async def put_big_decimal( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -714,7 +704,7 @@ async def get_big_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -755,16 +745,14 @@ async def get_big_decimal(self, **kwargs: Any) -> float: return cast(float, deserialized) # type: ignore @distributed_trace_async - async def put_big_decimal_positive_decimal( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def put_big_decimal_positive_decimal(self, **kwargs: Any) -> None: """Put big decimal value 99999999.99. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -811,7 +799,7 @@ async def get_big_decimal_positive_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,16 +840,14 @@ async def get_big_decimal_positive_decimal(self, **kwargs: Any) -> float: return cast(float, deserialized) # type: ignore @distributed_trace_async - async def put_big_decimal_negative_decimal( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def put_big_decimal_negative_decimal(self, **kwargs: Any) -> None: """Put big decimal value -99999999.99. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -908,7 +894,7 @@ async def get_big_decimal_negative_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -949,9 +935,7 @@ async def get_big_decimal_negative_decimal(self, **kwargs: Any) -> float: return cast(float, deserialized) # type: ignore @distributed_trace_async - async def put_small_float( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_small_float(self, number_body: float, **kwargs: Any) -> None: """Put small float value 3.402823e-20. :param number_body: number body. Required. @@ -960,7 +944,7 @@ async def put_small_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1006,7 +990,7 @@ async def get_small_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1047,9 +1031,7 @@ async def get_small_float(self, **kwargs: Any) -> float: return cast(float, deserialized) # type: ignore @distributed_trace_async - async def put_small_double( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_small_double(self, number_body: float, **kwargs: Any) -> None: """Put small double value 2.5976931e-101. :param number_body: number body. Required. @@ -1058,7 +1040,7 @@ async def put_small_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1104,7 +1086,7 @@ async def get_small_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1145,9 +1127,7 @@ async def get_small_double(self, **kwargs: Any) -> float: return cast(float, deserialized) # type: ignore @distributed_trace_async - async def put_small_decimal( # pylint: disable=inconsistent-return-statements - self, number_body: float, **kwargs: Any - ) -> None: + async def put_small_decimal(self, number_body: float, **kwargs: Any) -> None: """Put small decimal value 2.5976931e-101. :param number_body: number body. Required. @@ -1156,7 +1136,7 @@ async def put_small_decimal( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1202,7 +1182,7 @@ async def get_small_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/operations/_operations.py index 6705b3a92ff..e47dcd540dd 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/bodynumberversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -438,7 +438,7 @@ def get_null(self, **kwargs: Any) -> Optional[float]: :rtype: float or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -486,7 +486,7 @@ def get_invalid_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -534,7 +534,7 @@ def get_invalid_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -582,7 +582,7 @@ def get_invalid_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -634,7 +634,7 @@ def put_big_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -680,7 +680,7 @@ def get_big_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -732,7 +732,7 @@ def put_big_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -778,7 +778,7 @@ def get_big_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -826,7 +826,7 @@ def put_big_double_positive_decimal(self, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -873,7 +873,7 @@ def get_big_double_positive_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -921,7 +921,7 @@ def put_big_double_negative_decimal(self, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +968,7 @@ def get_big_double_negative_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1020,7 +1020,7 @@ def put_big_decimal( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1066,7 +1066,7 @@ def get_big_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1114,7 +1114,7 @@ def put_big_decimal_positive_decimal(self, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1161,7 +1161,7 @@ def get_big_decimal_positive_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1209,7 +1209,7 @@ def put_big_decimal_negative_decimal(self, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1256,7 +1256,7 @@ def get_big_decimal_negative_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1308,7 +1308,7 @@ def put_small_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1354,7 +1354,7 @@ def get_small_float(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1406,7 +1406,7 @@ def put_small_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1452,7 +1452,7 @@ def get_small_double(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1504,7 +1504,7 @@ def put_small_decimal( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1550,7 +1550,7 @@ def get_small_decimal(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_configuration.py index 2c6dff094a4..dc516a65c50 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestSwaggerBATServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestSwaggerBATServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestSwaggerBATService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/aio/_configuration.py index 47a3fd0eef2..3be2d984cff 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestSwaggerBATServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestSwaggerBATServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestSwaggerBATService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/aio/operations/_operations.py index 58d48af5ee3..1ae9a843943 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -48,7 +48,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -79,7 +79,7 @@ async def get_null(self, **kwargs: Any) -> Optional[str]: :rtype: str or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -120,9 +120,7 @@ async def get_null(self, **kwargs: Any) -> Optional[str]: return cast(Optional[str], deserialized) # type: ignore @distributed_trace_async - async def put_null( # pylint: disable=inconsistent-return-statements - self, string_body: Optional[str] = None, **kwargs: Any - ) -> None: + async def put_null(self, string_body: Optional[str] = None, **kwargs: Any) -> None: """Set string value null. :param string_body: string body. Default value is None. @@ -131,7 +129,7 @@ async def put_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -180,7 +178,7 @@ async def get_empty(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -221,14 +219,14 @@ async def get_empty(self, **kwargs: Any) -> str: return cast(str, deserialized) # type: ignore @distributed_trace_async - async def put_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_empty(self, **kwargs: Any) -> None: """Set string value empty ''. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -275,7 +273,7 @@ async def get_mbcs(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -316,14 +314,14 @@ async def get_mbcs(self, **kwargs: Any) -> str: return cast(str, deserialized) # type: ignore @distributed_trace_async - async def put_mbcs(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_mbcs(self, **kwargs: Any) -> None: """Set string value mbcs '啊齄丂狛狜隣郎隣兀﨩ˊ〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€'. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -377,7 +375,7 @@ async def get_whitespace(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -418,7 +416,7 @@ async def get_whitespace(self, **kwargs: Any) -> str: return cast(str, deserialized) # type: ignore @distributed_trace_async - async def put_whitespace(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_whitespace(self, **kwargs: Any) -> None: """Set String value with leading and trailing whitespace ':code:``:code:``:code:``Now is the time for all good men to come to the aid of their country:code:``:code:``:code:``'. @@ -427,7 +425,7 @@ async def put_whitespace(self, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +474,7 @@ async def get_not_provided(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -524,7 +522,7 @@ async def get_base64_encoded(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -572,7 +570,7 @@ async def get_base64_url_encoded(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -613,9 +611,7 @@ async def get_base64_url_encoded(self, **kwargs: Any) -> bytes: return cast(bytes, deserialized) # type: ignore @distributed_trace_async - async def put_base64_url_encoded( # pylint: disable=inconsistent-return-statements - self, string_body: bytes, **kwargs: Any - ) -> None: + async def put_base64_url_encoded(self, string_body: bytes, **kwargs: Any) -> None: """Put value that is base64url encoded. :param string_body: string body. Required. @@ -624,7 +620,7 @@ async def put_base64_url_encoded( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -670,7 +666,7 @@ async def get_null_base64_url_encoded(self, **kwargs: Any) -> Optional[bytes]: :rtype: bytes or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -736,7 +732,7 @@ async def get_not_expandable(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -777,9 +773,7 @@ async def get_not_expandable(self, **kwargs: Any) -> str: return cast(str, deserialized) # type: ignore @distributed_trace_async - async def put_not_expandable( # pylint: disable=inconsistent-return-statements - self, string_body: str, **kwargs: Any - ) -> None: + async def put_not_expandable(self, string_body: str, **kwargs: Any) -> None: """Sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'. :param string_body: string body. Known values are: "red color", "green-color", and @@ -789,7 +783,7 @@ async def put_not_expandable( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -835,7 +829,7 @@ async def get_referenced(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -876,9 +870,7 @@ async def get_referenced(self, **kwargs: Any) -> str: return cast(str, deserialized) # type: ignore @distributed_trace_async - async def put_referenced( # pylint: disable=inconsistent-return-statements - self, enum_string_body: str, **kwargs: Any - ) -> None: + async def put_referenced(self, enum_string_body: str, **kwargs: Any) -> None: """Sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'. :param enum_string_body: enum string body. Known values are: "red color", "green-color", and @@ -888,7 +880,7 @@ async def put_referenced( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -943,7 +935,7 @@ async def get_referenced_constant(self, **kwargs: Any) -> JSON: "field1": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -984,7 +976,7 @@ async def get_referenced_constant(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - async def put_referenced_constant( # pylint: disable=inconsistent-return-statements + async def put_referenced_constant( self, enum_string_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Sends value 'green-color' from a constant. @@ -1009,7 +1001,7 @@ async def put_referenced_constant( # pylint: disable=inconsistent-return-statem """ @overload - async def put_referenced_constant( # pylint: disable=inconsistent-return-statements + async def put_referenced_constant( self, enum_string_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Sends value 'green-color' from a constant. @@ -1025,9 +1017,7 @@ async def put_referenced_constant( # pylint: disable=inconsistent-return-statem """ @distributed_trace_async - async def put_referenced_constant( # pylint: disable=inconsistent-return-statements - self, enum_string_body: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_referenced_constant(self, enum_string_body: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Sends value 'green-color' from a constant. :param enum_string_body: enum string body. Is either a JSON type or a IO[bytes] type. Required. @@ -1045,7 +1035,7 @@ async def put_referenced_constant( # pylint: disable=inconsistent-return-statem "field1": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/operations/_operations.py index 1f0d564e679..6ccaba03267 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -364,7 +364,7 @@ def get_null(self, **kwargs: Any) -> Optional[str]: :rtype: str or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -416,7 +416,7 @@ def put_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -465,7 +465,7 @@ def get_empty(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -513,7 +513,7 @@ def put_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -560,7 +560,7 @@ def get_mbcs(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -608,7 +608,7 @@ def put_mbcs(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -662,7 +662,7 @@ def get_whitespace(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -712,7 +712,7 @@ def put_whitespace(self, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -761,7 +761,7 @@ def get_not_provided(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -809,7 +809,7 @@ def get_base64_encoded(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -857,7 +857,7 @@ def get_base64_url_encoded(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -909,7 +909,7 @@ def put_base64_url_encoded( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -955,7 +955,7 @@ def get_null_base64_url_encoded(self, **kwargs: Any) -> Optional[bytes]: :rtype: bytes or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1021,7 +1021,7 @@ def get_not_expandable(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1074,7 +1074,7 @@ def put_not_expandable( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1120,7 +1120,7 @@ def get_referenced(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1173,7 +1173,7 @@ def put_referenced( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1228,7 +1228,7 @@ def get_referenced_constant(self, **kwargs: Any) -> JSON: "field1": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1269,7 +1269,7 @@ def get_referenced_constant(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @overload - def put_referenced_constant( # pylint: disable=inconsistent-return-statements + def put_referenced_constant( self, enum_string_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Sends value 'green-color' from a constant. @@ -1294,7 +1294,7 @@ def put_referenced_constant( # pylint: disable=inconsistent-return-statements """ @overload - def put_referenced_constant( # pylint: disable=inconsistent-return-statements + def put_referenced_constant( self, enum_string_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Sends value 'green-color' from a constant. @@ -1330,7 +1330,7 @@ def put_referenced_constant( # pylint: disable=inconsistent-return-statements "field1": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/_configuration.py index d2c1b19a1f8..2d0332c2bc5 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestTimeTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/aio/_configuration.py index 3c48c0776f1..5f76f91e64e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestTimeTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestTimeTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/aio/operations/_operations.py index 57ca9428968..2f2c7517473 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,7 +57,7 @@ async def get(self, **kwargs: Any) -> datetime.time: :rtype: ~datetime.time :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -108,7 +107,7 @@ async def put(self, time_body: datetime.time, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/operations/_operations.py index 811c166c196..45819eea345 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/bodytimeversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -92,7 +91,7 @@ def get(self, **kwargs: Any) -> datetime.time: :rtype: ~datetime.time :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -142,7 +141,7 @@ def put(self, time_body: datetime.time, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_operations/_operations.py index b53cd71c900..1c08f24b2c9 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -59,7 +58,7 @@ def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_vendor.py index 3f1c320adb9..f74d78ebfa4 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ClientWithEnumConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_operations/_operations.py index 5707901e727..6f0db41f68d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class ClientWithEnumOperationsMixin(ClientWithEnumMixinABC): @distributed_trace_async - async def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head(self, **kwargs: Any) -> None: """Send a head request to the service. Should have header ``x-ms-enum`` with value ``single``. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_vendor.py index 031c576fdb5..121f3fa2125 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ClientWithEnumConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/models/_models.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/models/_models.py index 5b3fbd6f429..1d1b7707def 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/models/_models.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/aio/operations/_operations.py index 58e693ac574..fc2ebf2b163 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -45,7 +44,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -68,7 +67,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def put_no_model_as_string_no_required_two_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_no_required_two_value_no_default( # pylint: disable=name-too-long self, *, input: Optional[str] = None, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -81,7 +80,7 @@ async def put_no_model_as_string_no_required_two_value_no_default( # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -116,7 +115,7 @@ async def put_no_model_as_string_no_required_two_value_no_default( # pylint: di return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_no_required_two_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_no_required_two_value_default( # pylint: disable=name-too-long self, *, input: str = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -129,7 +128,7 @@ async def put_no_model_as_string_no_required_two_value_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -164,7 +163,7 @@ async def put_no_model_as_string_no_required_two_value_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_no_required_one_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_no_required_one_value_no_default( # pylint: disable=name-too-long self, *, input: Optional[Literal["value1"]] = None, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -177,7 +176,7 @@ async def put_no_model_as_string_no_required_one_value_no_default( # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -212,7 +211,7 @@ async def put_no_model_as_string_no_required_one_value_no_default( # pylint: di return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_no_required_one_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_no_required_one_value_default( # pylint: disable=name-too-long self, *, input: Literal["value1"] = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -225,7 +224,7 @@ async def put_no_model_as_string_no_required_one_value_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -260,7 +259,7 @@ async def put_no_model_as_string_no_required_one_value_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_required_two_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_required_two_value_no_default( # pylint: disable=name-too-long self, *, input: str, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -273,7 +272,7 @@ async def put_no_model_as_string_required_two_value_no_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -308,7 +307,7 @@ async def put_no_model_as_string_required_two_value_no_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_required_two_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_required_two_value_default( # pylint: disable=name-too-long self, *, input: str = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -321,7 +320,7 @@ async def put_no_model_as_string_required_two_value_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -356,7 +355,7 @@ async def put_no_model_as_string_required_two_value_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_required_one_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_required_one_value_no_default( # pylint: disable=name-too-long self, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -367,7 +366,7 @@ async def put_no_model_as_string_required_one_value_no_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -403,7 +402,7 @@ async def put_no_model_as_string_required_one_value_no_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_no_model_as_string_required_one_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_no_model_as_string_required_one_value_default( # pylint: disable=name-too-long self, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -414,7 +413,7 @@ async def put_no_model_as_string_required_one_value_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -450,7 +449,7 @@ async def put_no_model_as_string_required_one_value_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_no_required_two_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_no_required_two_value_no_default( # pylint: disable=name-too-long self, *, input: Optional[str] = None, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -463,7 +462,7 @@ async def put_model_as_string_no_required_two_value_no_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -498,7 +497,7 @@ async def put_model_as_string_no_required_two_value_no_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_no_required_two_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_no_required_two_value_default( # pylint: disable=name-too-long self, *, input: str = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -511,7 +510,7 @@ async def put_model_as_string_no_required_two_value_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -546,7 +545,7 @@ async def put_model_as_string_no_required_two_value_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_no_required_one_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_no_required_one_value_no_default( # pylint: disable=name-too-long self, *, input: Optional[str] = None, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -559,7 +558,7 @@ async def put_model_as_string_no_required_one_value_no_default( # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -594,7 +593,7 @@ async def put_model_as_string_no_required_one_value_no_default( # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_no_required_one_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_no_required_one_value_default( # pylint: disable=name-too-long self, *, input: str = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -607,7 +606,7 @@ async def put_model_as_string_no_required_one_value_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -642,7 +641,7 @@ async def put_model_as_string_no_required_one_value_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_required_two_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_required_two_value_no_default( # pylint: disable=name-too-long self, *, input: str, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -655,7 +654,7 @@ async def put_model_as_string_required_two_value_no_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -690,7 +689,7 @@ async def put_model_as_string_required_two_value_no_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_required_two_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_required_two_value_default( # pylint: disable=name-too-long self, *, input: str = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -703,7 +702,7 @@ async def put_model_as_string_required_two_value_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -738,7 +737,7 @@ async def put_model_as_string_required_two_value_default( # pylint: disable=inc return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_required_one_value_no_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_required_one_value_no_default( # pylint: disable=name-too-long self, *, input: str, **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -751,7 +750,7 @@ async def put_model_as_string_required_one_value_no_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -786,7 +785,7 @@ async def put_model_as_string_required_one_value_no_default( # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_model_as_string_required_one_value_default( # pylint: disable=inconsistent-return-statements,name-too-long + async def put_model_as_string_required_one_value_default( # pylint: disable=name-too-long self, *, input: str = "value1", **kwargs: Any ) -> None: """Puts constants to the testserver. @@ -799,7 +798,7 @@ async def put_model_as_string_required_one_value_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -834,7 +833,7 @@ async def put_model_as_string_required_one_value_default( # pylint: disable=inc return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_client_constants(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_client_constants(self, **kwargs: Any) -> None: """Pass constants from the client to this function. Will pass in constant path, query, and header parameters. @@ -842,7 +841,7 @@ async def put_client_constants(self, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/operations/_operations.py index 874d3f9e19e..a34a08550ac 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/constantsversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -324,7 +324,7 @@ def put_no_model_as_string_no_required_two_value_no_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -372,7 +372,7 @@ def put_no_model_as_string_no_required_two_value_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -420,7 +420,7 @@ def put_no_model_as_string_no_required_one_value_no_default( # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,7 +468,7 @@ def put_no_model_as_string_no_required_one_value_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -516,7 +516,7 @@ def put_no_model_as_string_required_two_value_no_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -564,7 +564,7 @@ def put_no_model_as_string_required_two_value_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -610,7 +610,7 @@ def put_no_model_as_string_required_one_value_no_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -657,7 +657,7 @@ def put_no_model_as_string_required_one_value_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -706,7 +706,7 @@ def put_model_as_string_no_required_two_value_no_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -754,7 +754,7 @@ def put_model_as_string_no_required_two_value_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -802,7 +802,7 @@ def put_model_as_string_no_required_one_value_no_default( # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -850,7 +850,7 @@ def put_model_as_string_no_required_one_value_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -898,7 +898,7 @@ def put_model_as_string_required_two_value_no_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -946,7 +946,7 @@ def put_model_as_string_required_two_value_default( # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -994,7 +994,7 @@ def put_model_as_string_required_one_value_no_default( # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1042,7 +1042,7 @@ def put_model_as_string_required_one_value_default( # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1085,7 +1085,7 @@ def put_client_constants(self, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/_client.py index 9fa1bd55a32..e5d20eef952 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/_client.py @@ -19,7 +19,7 @@ from .operations import PathsOperations -class AutoRestParameterizedCustomHostTestClient: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestParameterizedCustomHostTestClient: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar paths: PathsOperations operations diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/aio/_client.py index 39b45447a24..15ab5722923 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/aio/_client.py @@ -19,7 +19,7 @@ from .operations import PathsOperations -class AutoRestParameterizedCustomHostTestClient: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestParameterizedCustomHostTestClient: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar paths: PathsOperations operations diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/aio/operations/_operations.py index 54b16bd3e92..2f3d308f9e3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +48,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_empty( # pylint: disable=inconsistent-return-statements + async def get_empty( self, vault: str, secret: str, key_name: str, *, key_version: str = "v1", **kwargs: Any ) -> None: """Get a 200 to test a valid base uri. @@ -66,7 +65,7 @@ async def get_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/operations/_operations.py index 047d9b072c9..5e86fcd5ede 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/custombaseurlmoreoptionsversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -97,7 +96,7 @@ def get_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/aio/operations/_operations.py index 34632561c6a..0cbf7f295c4 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,9 +48,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_empty( # pylint: disable=inconsistent-return-statements - self, account_name: str, **kwargs: Any - ) -> None: + async def get_empty(self, account_name: str, **kwargs: Any) -> None: """Get a 200 to test a valid base uri. :param account_name: Account Name. Required. @@ -60,7 +57,7 @@ async def get_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/operations/_operations.py index 28fb855b4c1..caf18682d14 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/custombaseurlversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -76,7 +75,7 @@ def get_empty(self, account_name: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_configuration.py index f78c9d2bd5b..e2549560074 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ErrorWithSecretsConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ErrorWithSecretsConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ErrorWithSecrets. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_operations/_operations.py index 1450b10f602..c1bbcd0d286 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -86,7 +85,7 @@ def create_secret(self, **kwargs: Any) -> JSON: "value": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,7 +133,7 @@ def get_error_with_secrets(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_vendor.py index 57b8012132b..fb1aa891cce 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ErrorWithSecretsConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_configuration.py index f9fde6b7c89..c00f94fffdc 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ErrorWithSecretsConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ErrorWithSecretsConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ErrorWithSecrets. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_operations/_operations.py index 17ad1927580..490ef54600a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +54,7 @@ async def create_secret(self, **kwargs: Any) -> JSON: "value": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -96,14 +95,14 @@ async def create_secret(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @distributed_trace_async - async def get_error_with_secrets(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_error_with_secrets(self, **kwargs: Any) -> None: """Gets an error response containing secrets and PII. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_vendor.py index 004d69077c2..e000cbd9842 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ErrorWithSecretsConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/aio/operations/_operations.py index 2a8338179c0..20cfc7c198d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -71,7 +70,7 @@ async def get_by_pet_id(self, pet_id: str, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -198,7 +197,7 @@ async def add_pet(self, pet_param: Optional[Union[JSON, IO[bytes]]] = None, **kw "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/operations/_operations.py index 15aa26da28d..efb440331d0 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/extensibleenumsswaggerversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -110,7 +109,7 @@ def get_by_pet_id(self, pet_id: str, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -237,7 +236,7 @@ def add_pet(self, pet_param: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/aio/operations/_operations.py index 59482df29a0..a93fd12f567 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -57,7 +57,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -80,9 +80,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def param_existing_key( # pylint: disable=inconsistent-return-statements - self, *, user_agent_parameter: str, **kwargs: Any - ) -> None: + async def param_existing_key(self, *, user_agent_parameter: str, **kwargs: Any) -> None: """Send a post request with header value "User-Agent": "overwrite". :keyword user_agent_parameter: Send a post request with header value "User-Agent": "overwrite". @@ -92,7 +90,7 @@ async def param_existing_key( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -127,14 +125,14 @@ async def param_existing_key( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_existing_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def response_existing_key(self, **kwargs: Any) -> None: """Get a response with header value "User-Agent": "overwrite". :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -171,14 +169,14 @@ async def response_existing_key(self, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_protected_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def param_protected_key(self, **kwargs: Any) -> None: """Send a post request with header value "Content-Type": "text/html". :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -214,14 +212,14 @@ async def param_protected_key(self, **kwargs: Any) -> None: # pylint: disable=i return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_protected_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def response_protected_key(self, **kwargs: Any) -> None: """Get a response with header value "Content-Type": "text/html". :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -258,9 +256,7 @@ async def response_protected_key(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_integer( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: int, **kwargs: Any - ) -> None: + async def param_integer(self, *, scenario: str, value: int, **kwargs: Any) -> None: """Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2. @@ -273,7 +269,7 @@ async def param_integer( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,9 +305,7 @@ async def param_integer( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_integer( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_integer(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header value "value": 1 or -2. :keyword scenario: Send a post request with header values "scenario": "positive" or "negative". @@ -321,7 +315,7 @@ async def response_integer( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -359,9 +353,7 @@ async def response_integer( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_long( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: int, **kwargs: Any - ) -> None: + async def param_long(self, *, scenario: str, value: int, **kwargs: Any) -> None: """Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2. @@ -374,7 +366,7 @@ async def param_long( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -410,9 +402,7 @@ async def param_long( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_long( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_long(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header value "value": 105 or -2. :keyword scenario: Send a post request with header values "scenario": "positive" or "negative". @@ -422,7 +412,7 @@ async def response_long( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -460,9 +450,7 @@ async def response_long( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_float( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: float, **kwargs: Any - ) -> None: + async def param_float(self, *, scenario: str, value: float, **kwargs: Any) -> None: """Send a post request with header values "scenario": "positive", "value": 0.07 or "scenario": "negative", "value": -3.0. @@ -475,7 +463,7 @@ async def param_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -511,9 +499,7 @@ async def param_float( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_float( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_float(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header value "value": 0.07 or -3.0. :keyword scenario: Send a post request with header values "scenario": "positive" or "negative". @@ -523,7 +509,7 @@ async def response_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -561,9 +547,7 @@ async def response_float( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_double( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: float, **kwargs: Any - ) -> None: + async def param_double(self, *, scenario: str, value: float, **kwargs: Any) -> None: """Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0. @@ -576,7 +560,7 @@ async def param_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -612,9 +596,7 @@ async def param_double( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_double( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_double(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header value "value": 7e120 or -3.0. :keyword scenario: Send a post request with header values "scenario": "positive" or "negative". @@ -624,7 +606,7 @@ async def response_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -662,9 +644,7 @@ async def response_double( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_bool( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: bool, **kwargs: Any - ) -> None: + async def param_bool(self, *, scenario: str, value: bool, **kwargs: Any) -> None: """Send a post request with header values "scenario": "true", "value": true or "scenario": "false", "value": false. @@ -677,7 +657,7 @@ async def param_bool( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -713,9 +693,7 @@ async def param_bool( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_bool( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_bool(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header value "value": true or false. :keyword scenario: Send a post request with header values "scenario": "true" or "false". @@ -725,7 +703,7 @@ async def response_bool( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -763,9 +741,7 @@ async def response_bool( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_string( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: Optional[str] = None, **kwargs: Any - ) -> None: + async def param_string(self, *, scenario: str, value: Optional[str] = None, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "The quick brown fox jumps over the lazy dog" or "scenario": "null", "value": null or "scenario": "empty", "value": "". @@ -779,7 +755,7 @@ async def param_string( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -815,9 +791,7 @@ async def param_string( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_string( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_string(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header values "The quick brown fox jumps over the lazy dog" or null or "". :keyword scenario: Send a post request with header values "scenario": "valid" or "null" or @@ -827,7 +801,7 @@ async def response_string( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -865,9 +839,7 @@ async def response_string( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_date( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: datetime.date, **kwargs: Any - ) -> None: + async def param_date(self, *, scenario: str, value: datetime.date, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "2010-01-01" or "scenario": "min", "value": "0001-01-01". @@ -880,7 +852,7 @@ async def param_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -916,9 +888,7 @@ async def param_date( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_date( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_date(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header values "2010-01-01" or "0001-01-01". :keyword scenario: Send a post request with header values "scenario": "valid" or "min". @@ -928,7 +898,7 @@ async def response_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -966,9 +936,7 @@ async def response_date( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_datetime( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: datetime.datetime, **kwargs: Any - ) -> None: + async def param_datetime(self, *, scenario: str, value: datetime.datetime, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": "0001-01-01T00:00:00Z". @@ -982,7 +950,7 @@ async def param_datetime( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1018,9 +986,7 @@ async def param_datetime( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_datetime( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_datetime(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z". :keyword scenario: Send a post request with header values "scenario": "valid" or "min". @@ -1030,7 +996,7 @@ async def response_datetime( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1068,7 +1034,7 @@ async def response_datetime( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_datetime_rfc1123( # pylint: disable=inconsistent-return-statements + async def param_datetime_rfc1123( self, *, scenario: str, value: Optional[datetime.datetime] = None, **kwargs: Any ) -> None: """Send a post request with header values "scenario": "valid", "value": "Wed, 01 Jan 2010 12:34:56 @@ -1084,7 +1050,7 @@ async def param_datetime_rfc1123( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1120,9 +1086,7 @@ async def param_datetime_rfc1123( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_datetime_rfc1123( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_datetime_rfc1123(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header values "Wed, 01 Jan 2010 12:34:56 GMT" or "Mon, 01 Jan 0001 00:00:00 GMT". @@ -1133,7 +1097,7 @@ async def response_datetime_rfc1123( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1171,9 +1135,7 @@ async def response_datetime_rfc1123( # pylint: disable=inconsistent-return-stat return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_duration( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: datetime.timedelta, **kwargs: Any - ) -> None: + async def param_duration(self, *, scenario: str, value: datetime.timedelta, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "P123DT22H14M12.011S". :keyword scenario: Send a post request with header values "scenario": "valid". Required. @@ -1184,7 +1146,7 @@ async def param_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1220,9 +1182,7 @@ async def param_duration( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_duration( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_duration(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header values "P123DT22H14M12.011S". :keyword scenario: Send a post request with header values "scenario": "valid". Required. @@ -1231,7 +1191,7 @@ async def response_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1269,9 +1229,7 @@ async def response_duration( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_byte( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: bytes, **kwargs: Any - ) -> None: + async def param_byte(self, *, scenario: str, value: bytes, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "啊齄丂狛狜隣郎隣兀﨩". :keyword scenario: Send a post request with header values "scenario": "valid". Required. @@ -1282,7 +1240,7 @@ async def param_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1318,9 +1276,7 @@ async def param_byte( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_byte( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_byte(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header values "啊齄丂狛狜隣郎隣兀﨩". :keyword scenario: Send a post request with header values "scenario": "valid". Required. @@ -1329,7 +1285,7 @@ async def response_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1367,9 +1323,7 @@ async def response_byte( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def param_enum( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, value: Optional[str] = None, **kwargs: Any - ) -> None: + async def param_enum(self, *, scenario: str, value: Optional[str] = None, **kwargs: Any) -> None: """Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": "null", "value": null. @@ -1383,7 +1337,7 @@ async def param_enum( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1419,9 +1373,7 @@ async def param_enum( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response_enum( # pylint: disable=inconsistent-return-statements - self, *, scenario: str, **kwargs: Any - ) -> None: + async def response_enum(self, *, scenario: str, **kwargs: Any) -> None: """Get a response with header values "GREY" or null. :keyword scenario: Send a post request with header values "scenario": "valid" or "null" or @@ -1431,7 +1383,7 @@ async def response_enum( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1469,7 +1421,7 @@ async def response_enum( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def custom_request_id(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def custom_request_id(self, **kwargs: Any) -> None: """Send x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request. @@ -1477,7 +1429,7 @@ async def custom_request_id(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/operations/_operations.py index c21a8f65c39..b7836ea653b 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/headerversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -518,7 +518,7 @@ def param_existing_key( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -560,7 +560,7 @@ def response_existing_key(self, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -604,7 +604,7 @@ def param_protected_key(self, **kwargs: Any) -> None: # pylint: disable=inconsi :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -647,7 +647,7 @@ def response_protected_key(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -699,7 +699,7 @@ def param_integer( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -747,7 +747,7 @@ def response_integer( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -800,7 +800,7 @@ def param_long( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -846,7 +846,7 @@ def response_long(self, *, scenario: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -899,7 +899,7 @@ def param_float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -945,7 +945,7 @@ def response_float(self, *, scenario: str, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -998,7 +998,7 @@ def param_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1046,7 +1046,7 @@ def response_double( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1099,7 +1099,7 @@ def param_bool( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1145,7 +1145,7 @@ def response_bool(self, *, scenario: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1199,7 +1199,7 @@ def param_string( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1247,7 +1247,7 @@ def response_string( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1300,7 +1300,7 @@ def param_date( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1346,7 +1346,7 @@ def response_date(self, *, scenario: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1400,7 +1400,7 @@ def param_datetime( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1448,7 +1448,7 @@ def response_datetime( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1502,7 +1502,7 @@ def param_datetime_rfc1123( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1551,7 +1551,7 @@ def response_datetime_rfc1123( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1602,7 +1602,7 @@ def param_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1649,7 +1649,7 @@ def response_duration( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1700,7 +1700,7 @@ def param_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1745,7 +1745,7 @@ def response_byte(self, *, scenario: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1799,7 +1799,7 @@ def param_enum( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1845,7 +1845,7 @@ def response_enum(self, *, scenario: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1891,7 +1891,7 @@ def custom_request_id(self, **kwargs: Any) -> None: # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/aio/operations/_operations.py index 463dbf2798a..a5b34e8b1ac 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -139,7 +139,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -170,7 +170,7 @@ async def get_empty_error(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -218,7 +218,7 @@ async def get_no_model_error(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +266,7 @@ async def get_no_model_empty(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -325,14 +325,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head200(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head200(self, **kwargs: Any) -> None: """Return 200 status code if successful. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -373,7 +373,7 @@ async def get200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -421,7 +421,7 @@ async def options200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -462,9 +462,7 @@ async def options200(self, **kwargs: Any) -> bool: return cast(bool, deserialized) # type: ignore @distributed_trace_async - async def put200( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put200(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Put boolean value true returning 200 success. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -474,7 +472,7 @@ async def put200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -516,9 +514,7 @@ async def put200( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch200( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def patch200(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Patch true Boolean value in request returning 200. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -528,7 +524,7 @@ async def patch200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -570,9 +566,7 @@ async def patch200( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post200( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post200(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Post bollean value true in request that returns a 200. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -582,7 +576,7 @@ async def post200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -624,9 +618,7 @@ async def post200( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete200( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def delete200(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Delete simple boolean value true returns 200. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -636,7 +628,7 @@ async def delete200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -678,9 +670,7 @@ async def delete200( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put201( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put201(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Put true Boolean value in request returns 201. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -690,7 +680,7 @@ async def put201( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -732,9 +722,7 @@ async def put201( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post201( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post201(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Post true Boolean value in request returns 201 (Created). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -744,7 +732,7 @@ async def post201( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -786,9 +774,7 @@ async def post201( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put202( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put202(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Put true Boolean value in request returns 202 (Accepted). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -798,7 +784,7 @@ async def put202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -840,9 +826,7 @@ async def put202( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch202( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def patch202(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Patch true Boolean value in request returns 202. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -852,7 +836,7 @@ async def patch202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -894,9 +878,7 @@ async def patch202( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post202( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post202(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Post true Boolean value in request returns 202 (Accepted). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -906,7 +888,7 @@ async def post202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -948,9 +930,7 @@ async def post202( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete202( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def delete202(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Delete true Boolean value in request returns 202 (accepted). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -960,7 +940,7 @@ async def delete202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1002,14 +982,14 @@ async def delete202( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head204(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head204(self, **kwargs: Any) -> None: """Return 204 status code if successful. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1043,9 +1023,7 @@ async def head204(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put204( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put204(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Put true Boolean value in request returns 204 (no content). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -1055,7 +1033,7 @@ async def put204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1097,9 +1075,7 @@ async def put204( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch204( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def patch204(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Patch true Boolean value in request returns 204 (no content). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -1109,7 +1085,7 @@ async def patch204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1151,9 +1127,7 @@ async def patch204( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post204( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post204(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Post true Boolean value in request returns 204 (no content). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -1163,7 +1137,7 @@ async def post204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1205,9 +1179,7 @@ async def post204( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete204( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def delete204(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Delete true Boolean value in request returns 204 (no content). :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -1217,7 +1189,7 @@ async def delete204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1259,14 +1231,14 @@ async def delete204( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head404(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head404(self, **kwargs: Any) -> None: """Return 404 status code. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1318,14 +1290,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head300(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head300(self, **kwargs: Any) -> None: """Return 300 status code and redirect to /http/success/200. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1378,7 +1350,7 @@ async def get300(self, **kwargs: Any) -> Optional[List[str]]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1424,14 +1396,14 @@ async def get300(self, **kwargs: Any) -> Optional[List[str]]: return deserialized # type: ignore @distributed_trace_async - async def head301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head301(self, **kwargs: Any) -> None: """Return 301 status code and redirect to /http/success/200. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1469,14 +1441,14 @@ async def head301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def get301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get301(self, **kwargs: Any) -> None: """Return 301 status code and redirect to /http/success/200. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1514,9 +1486,7 @@ async def get301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def put301( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put301(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Put true Boolean value in request returns 301. This request should not be automatically redirected, but should return the received 301 to the caller for evaluation. @@ -1527,7 +1497,7 @@ async def put301( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1572,14 +1542,14 @@ async def put301( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def head302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head302(self, **kwargs: Any) -> None: """Return 302 status code and redirect to /http/success/200. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1617,14 +1587,14 @@ async def head302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def get302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get302(self, **kwargs: Any) -> None: """Return 302 status code and redirect to /http/success/200. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1662,9 +1632,7 @@ async def get302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def patch302( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def patch302(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Patch true Boolean value in request returns 302. This request should not be automatically redirected, but should return the received 302 to the caller for evaluation. @@ -1675,7 +1643,7 @@ async def patch302( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1720,9 +1688,7 @@ async def patch302( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def post303( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post303(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Post true Boolean value in request returns 303. This request should be automatically redirected usign a get, ultimately returning a 200 status code. @@ -1733,7 +1699,7 @@ async def post303( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1779,14 +1745,14 @@ async def post303( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def head307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head307(self, **kwargs: Any) -> None: """Redirect with 307, resulting in a 200 success. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1824,14 +1790,14 @@ async def head307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def get307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get307(self, **kwargs: Any) -> None: """Redirect get with 307, resulting in a 200 success. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1869,14 +1835,14 @@ async def get307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def options307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def options307(self, **kwargs: Any) -> None: """options redirected with 307, resulting in a 200 after redirect. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1914,9 +1880,7 @@ async def options307(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def put307( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put307(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Put redirected with 307, resulting in a 200 after redirect. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -1926,7 +1890,7 @@ async def put307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1972,9 +1936,7 @@ async def put307( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def patch307( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def patch307(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Patch redirected with 307, resulting in a 200 after redirect. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -1984,7 +1946,7 @@ async def patch307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2030,9 +1992,7 @@ async def patch307( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def post307( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post307(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Post redirected with 307, resulting in a 200 after redirect. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2042,7 +2002,7 @@ async def post307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2088,9 +2048,7 @@ async def post307( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def delete307( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def delete307(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Delete redirected with 307, resulting in a 200 after redirect. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2100,7 +2058,7 @@ async def delete307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2164,14 +2122,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head400(self, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2205,14 +2163,14 @@ async def head400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get400(self, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2246,14 +2204,14 @@ async def get400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def options400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def options400(self, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2287,9 +2245,7 @@ async def options400(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put400( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put400(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2299,7 +2255,7 @@ async def put400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2341,9 +2297,7 @@ async def put400( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch400( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def patch400(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2353,7 +2307,7 @@ async def patch400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2395,9 +2349,7 @@ async def patch400( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post400( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post400(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2407,7 +2359,7 @@ async def post400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2449,9 +2401,7 @@ async def post400( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete400( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def delete400(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 400 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2461,7 +2411,7 @@ async def delete400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2503,14 +2453,14 @@ async def delete400( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head401(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head401(self, **kwargs: Any) -> None: """Return 401 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2544,14 +2494,14 @@ async def head401(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get402(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get402(self, **kwargs: Any) -> None: """Return 402 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2585,14 +2535,14 @@ async def get402(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def options403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def options403(self, **kwargs: Any) -> None: """Return 403 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2626,14 +2576,14 @@ async def options403(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get403(self, **kwargs: Any) -> None: """Return 403 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2667,9 +2617,7 @@ async def get403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put404( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put404(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 404 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2679,7 +2627,7 @@ async def put404( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2721,9 +2669,7 @@ async def put404( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch405( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def patch405(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 405 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2733,7 +2679,7 @@ async def patch405( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2775,9 +2721,7 @@ async def patch405( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post406( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post406(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 406 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2787,7 +2731,7 @@ async def post406( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2829,9 +2773,7 @@ async def post406( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete407( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def delete407(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 407 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2841,7 +2783,7 @@ async def delete407( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2883,9 +2825,7 @@ async def delete407( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put409( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put409(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 409 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -2895,7 +2835,7 @@ async def put409( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2937,14 +2877,14 @@ async def put409( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head410(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head410(self, **kwargs: Any) -> None: """Return 410 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2978,14 +2918,14 @@ async def head410(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get411(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get411(self, **kwargs: Any) -> None: """Return 411 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3019,14 +2959,14 @@ async def get411(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def options412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def options412(self, **kwargs: Any) -> None: """Return 412 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3060,14 +3000,14 @@ async def options412(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get412(self, **kwargs: Any) -> None: """Return 412 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3101,9 +3041,7 @@ async def get412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put413( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put413(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 413 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3113,7 +3051,7 @@ async def put413( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3155,9 +3093,7 @@ async def put413( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch414( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def patch414(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 414 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3167,7 +3103,7 @@ async def patch414( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3209,9 +3145,7 @@ async def patch414( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post415( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post415(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 415 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3221,7 +3155,7 @@ async def post415( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3263,14 +3197,14 @@ async def post415( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get416(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get416(self, **kwargs: Any) -> None: """Return 416 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3304,9 +3238,7 @@ async def get416(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete417( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def delete417(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 417 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3316,7 +3248,7 @@ async def delete417( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3358,14 +3290,14 @@ async def delete417( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def head429(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head429(self, **kwargs: Any) -> None: """Return 429 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3417,14 +3349,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head501(self, **kwargs: Any) -> None: """Return 501 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3458,14 +3390,14 @@ async def head501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get501(self, **kwargs: Any) -> None: """Return 501 status code - should be represented in the client as an error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3499,9 +3431,7 @@ async def get501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post505( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post505(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 505 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3511,7 +3441,7 @@ async def post505( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3553,9 +3483,7 @@ async def post505( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete505( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def delete505(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 505 status code - should be represented in the client as an error. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3565,7 +3493,7 @@ async def delete505( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3625,14 +3553,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def head408(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head408(self, **kwargs: Any) -> None: """Return 408 status code, then 200 after retry. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3666,9 +3594,7 @@ async def head408(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put500( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put500(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 500 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3678,7 +3604,7 @@ async def put500( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3720,9 +3646,7 @@ async def put500( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch500( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def patch500(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 500 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3732,7 +3656,7 @@ async def patch500( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3774,14 +3698,14 @@ async def patch500( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get502(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get502(self, **kwargs: Any) -> None: """Return 502 status code, then 200 after retry. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3822,7 +3746,7 @@ async def options502(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3863,9 +3787,7 @@ async def options502(self, **kwargs: Any) -> bool: return cast(bool, deserialized) # type: ignore @distributed_trace_async - async def post503( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def post503(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 503 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3875,7 +3797,7 @@ async def post503( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,9 +3839,7 @@ async def post503( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def delete503( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def delete503(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 503 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3929,7 +3849,7 @@ async def delete503( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3971,9 +3891,7 @@ async def delete503( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put504( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def put504(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 504 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -3983,7 +3901,7 @@ async def put504( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4025,9 +3943,7 @@ async def put504( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def patch504( # pylint: disable=inconsistent-return-statements - self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any - ) -> None: + async def patch504(self, boolean_value: Optional[Literal[True]] = None, **kwargs: Any) -> None: """Return 504 status code, then 200 after retry. :param boolean_value: Simple boolean value true. Known values are True and None. Default value @@ -4037,7 +3953,7 @@ async def patch504( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4114,7 +4030,7 @@ async def get200_model204_no_model_default_error200_valid( # pylint: disable=na "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4174,7 +4090,7 @@ async def get200_model204_no_model_default_error204_valid( # pylint: disable=na "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4234,7 +4150,7 @@ async def get200_model204_no_model_default_error201_invalid( # pylint: disable= "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4294,7 +4210,7 @@ async def get200_model204_no_model_default_error202_none( # pylint: disable=nam "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4354,7 +4270,7 @@ async def get200_model204_no_model_default_error400_valid( # pylint: disable=na "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4419,7 +4335,7 @@ async def get200_model201_model_default_error200_valid( # pylint: disable=name- "textStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4482,7 +4398,7 @@ async def get200_model201_model_default_error201_valid( # pylint: disable=name- "textStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4545,7 +4461,7 @@ async def get200_model201_model_default_error400_valid( # pylint: disable=name- "textStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4611,7 +4527,7 @@ async def get200_model_a201_model_c404_model_d_default_error200_valid( # pylint "httpStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4677,7 +4593,7 @@ async def get200_model_a201_model_c404_model_d_default_error201_valid( # pylint "httpStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4743,7 +4659,7 @@ async def get200_model_a201_model_c404_model_d_default_error404_valid( # pylint "httpStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4809,7 +4725,7 @@ async def get200_model_a201_model_c404_model_d_default_error400_valid( # pylint "httpStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4850,16 +4766,14 @@ async def get200_model_a201_model_c404_model_d_default_error400_valid( # pylint return cast(JSON, deserialized) # type: ignore @distributed_trace_async - async def get202_none204_none_default_error202_none( # pylint: disable=inconsistent-return-statements,name-too-long - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_error202_none(self, **kwargs: Any) -> None: # pylint: disable=name-too-long """Send a 202 response with no payload. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4893,16 +4807,14 @@ async def get202_none204_none_default_error202_none( # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_error204_none( # pylint: disable=inconsistent-return-statements,name-too-long - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_error204_none(self, **kwargs: Any) -> None: # pylint: disable=name-too-long """Send a 204 response with no payload. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4936,16 +4848,14 @@ async def get202_none204_none_default_error204_none( # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_error400_valid( # pylint: disable=inconsistent-return-statements,name-too-long - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_error400_valid(self, **kwargs: Any) -> None: # pylint: disable=name-too-long """Send a 400 response with valid payload: {'code': '400', 'message': 'client error'}. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4979,16 +4889,14 @@ async def get202_none204_none_default_error400_valid( # pylint: disable=inconsi return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_none202_invalid( # pylint: disable=inconsistent-return-statements,name-too-long - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_none202_invalid(self, **kwargs: Any) -> None: # pylint: disable=name-too-long """Send a 202 response with an unexpected payload {'property': 'value'}. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5022,16 +4930,14 @@ async def get202_none204_none_default_none202_invalid( # pylint: disable=incons return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_none204_none( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_none204_none(self, **kwargs: Any) -> None: """Send a 204 response with no payload. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5065,16 +4971,14 @@ async def get202_none204_none_default_none204_none( # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_none400_none( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_none400_none(self, **kwargs: Any) -> None: """Send a 400 response with no payload. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5108,16 +5012,14 @@ async def get202_none204_none_default_none400_none( # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get202_none204_none_default_none400_invalid( # pylint: disable=inconsistent-return-statements,name-too-long - self, **kwargs: Any - ) -> None: + async def get202_none204_none_default_none400_invalid(self, **kwargs: Any) -> None: # pylint: disable=name-too-long """Send a 400 response with an unexpected payload {'property': 'value'}. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5166,7 +5068,7 @@ async def get_default_model_a200_valid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5222,7 +5124,7 @@ async def get_default_model_a200_none(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5263,16 +5165,14 @@ async def get_default_model_a200_none(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @distributed_trace_async - async def get_default_model_a400_valid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_default_model_a400_valid(self, **kwargs: Any) -> None: """Send a 400 response with valid payload: {'statusCode': '400'}. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5306,16 +5206,14 @@ async def get_default_model_a400_valid( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_default_model_a400_none( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_default_model_a400_none(self, **kwargs: Any) -> None: """Send a 400 response with no payload. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5349,16 +5247,14 @@ async def get_default_model_a400_none( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_default_none200_invalid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_default_none200_invalid(self, **kwargs: Any) -> None: """Send a 200 response with invalid payload: {'statusCode': '200'}. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5392,14 +5288,14 @@ async def get_default_none200_invalid( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_default_none200_none(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_default_none200_none(self, **kwargs: Any) -> None: """Send a 200 response with no payload. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5433,16 +5329,14 @@ async def get_default_none200_none(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_default_none400_invalid( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_default_none400_invalid(self, **kwargs: Any) -> None: """Send a 400 response with valid payload: {'statusCode': '400'}. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5476,14 +5370,14 @@ async def get_default_none400_invalid( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_default_none400_none(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_default_none400_none(self, **kwargs: Any) -> None: """Send a 400 response with no payload. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5533,7 +5427,7 @@ async def get200_model_a200_none(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5589,7 +5483,7 @@ async def get200_model_a200_valid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5645,7 +5539,7 @@ async def get200_model_a200_invalid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5701,7 +5595,7 @@ async def get200_model_a400_none(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5757,7 +5651,7 @@ async def get200_model_a400_valid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5813,7 +5707,7 @@ async def get200_model_a400_invalid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5869,7 +5763,7 @@ async def get200_model_a202_valid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/operations/_operations.py index 599dfddfd21..1bee6690a00 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -1775,7 +1775,7 @@ def get_empty_error(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1823,7 +1823,7 @@ def get_no_model_error(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1871,7 +1871,7 @@ def get_no_model_empty(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1937,7 +1937,7 @@ def head200(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1978,7 +1978,7 @@ def get200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2026,7 +2026,7 @@ def options200(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2079,7 +2079,7 @@ def put200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2133,7 +2133,7 @@ def patch200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2187,7 +2187,7 @@ def post200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2241,7 +2241,7 @@ def delete200( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2295,7 +2295,7 @@ def put201( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2349,7 +2349,7 @@ def post201( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2403,7 +2403,7 @@ def put202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2457,7 +2457,7 @@ def patch202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2511,7 +2511,7 @@ def post202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2565,7 +2565,7 @@ def delete202( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2614,7 +2614,7 @@ def head204(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2660,7 +2660,7 @@ def put204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2714,7 +2714,7 @@ def patch204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2768,7 +2768,7 @@ def post204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2822,7 +2822,7 @@ def delete204( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2871,7 +2871,7 @@ def head404(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2930,7 +2930,7 @@ def head300(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2983,7 +2983,7 @@ def get300(self, **kwargs: Any) -> Optional[List[str]]: "str" ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3036,7 +3036,7 @@ def head301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3081,7 +3081,7 @@ def get301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3132,7 +3132,7 @@ def put301( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3184,7 +3184,7 @@ def head302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3229,7 +3229,7 @@ def get302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3280,7 +3280,7 @@ def patch302( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3338,7 +3338,7 @@ def post303( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3391,7 +3391,7 @@ def head307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3436,7 +3436,7 @@ def get307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3481,7 +3481,7 @@ def options307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3531,7 +3531,7 @@ def put307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3589,7 +3589,7 @@ def patch307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3647,7 +3647,7 @@ def post307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3705,7 +3705,7 @@ def delete307( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3776,7 +3776,7 @@ def head400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3817,7 +3817,7 @@ def get400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3858,7 +3858,7 @@ def options400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3904,7 +3904,7 @@ def put400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3958,7 +3958,7 @@ def patch400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4012,7 +4012,7 @@ def post400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4066,7 +4066,7 @@ def delete400( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4115,7 +4115,7 @@ def head401(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4156,7 +4156,7 @@ def get402(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4197,7 +4197,7 @@ def options403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4238,7 +4238,7 @@ def get403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4284,7 +4284,7 @@ def put404( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4338,7 +4338,7 @@ def patch405( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4392,7 +4392,7 @@ def post406( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4446,7 +4446,7 @@ def delete407( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4500,7 +4500,7 @@ def put409( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4549,7 +4549,7 @@ def head410(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4590,7 +4590,7 @@ def get411(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4631,7 +4631,7 @@ def options412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4672,7 +4672,7 @@ def get412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4718,7 +4718,7 @@ def put413( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4772,7 +4772,7 @@ def patch414( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4826,7 +4826,7 @@ def post415( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4875,7 +4875,7 @@ def get416(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4921,7 +4921,7 @@ def delete417( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4970,7 +4970,7 @@ def head429(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5029,7 +5029,7 @@ def head501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5070,7 +5070,7 @@ def get501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5116,7 +5116,7 @@ def post505( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5170,7 +5170,7 @@ def delete505( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5237,7 +5237,7 @@ def head408(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5283,7 +5283,7 @@ def put500( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5337,7 +5337,7 @@ def patch500( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5386,7 +5386,7 @@ def get502(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5427,7 +5427,7 @@ def options502(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5480,7 +5480,7 @@ def post503( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5534,7 +5534,7 @@ def delete503( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5588,7 +5588,7 @@ def put504( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5642,7 +5642,7 @@ def patch504( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5719,7 +5719,7 @@ def get200_model204_no_model_default_error200_valid( # pylint: disable=name-too "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5779,7 +5779,7 @@ def get200_model204_no_model_default_error204_valid( # pylint: disable=name-too "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5839,7 +5839,7 @@ def get200_model204_no_model_default_error201_invalid( # pylint: disable=name-t "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5899,7 +5899,7 @@ def get200_model204_no_model_default_error202_none( # pylint: disable=name-too- "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5959,7 +5959,7 @@ def get200_model204_no_model_default_error400_valid( # pylint: disable=name-too "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6022,7 +6022,7 @@ def get200_model201_model_default_error200_valid(self, **kwargs: Any) -> JSON: "textStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6083,7 +6083,7 @@ def get200_model201_model_default_error201_valid(self, **kwargs: Any) -> JSON: "textStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6144,7 +6144,7 @@ def get200_model201_model_default_error400_valid(self, **kwargs: Any) -> JSON: "textStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6210,7 +6210,7 @@ def get200_model_a201_model_c404_model_d_default_error200_valid( # pylint: disa "httpStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6276,7 +6276,7 @@ def get200_model_a201_model_c404_model_d_default_error201_valid( # pylint: disa "httpStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6342,7 +6342,7 @@ def get200_model_a201_model_c404_model_d_default_error404_valid( # pylint: disa "httpStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6408,7 +6408,7 @@ def get200_model_a201_model_c404_model_d_default_error400_valid( # pylint: disa "httpStatusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6458,7 +6458,7 @@ def get202_none204_none_default_error202_none( # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6501,7 +6501,7 @@ def get202_none204_none_default_error204_none( # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6544,7 +6544,7 @@ def get202_none204_none_default_error400_valid( # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6587,7 +6587,7 @@ def get202_none204_none_default_none202_invalid( # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6630,7 +6630,7 @@ def get202_none204_none_default_none204_none( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6673,7 +6673,7 @@ def get202_none204_none_default_none400_none( # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6716,7 +6716,7 @@ def get202_none204_none_default_none400_invalid( # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6765,7 +6765,7 @@ def get_default_model_a200_valid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6821,7 +6821,7 @@ def get_default_model_a200_none(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6869,7 +6869,7 @@ def get_default_model_a400_valid(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6910,7 +6910,7 @@ def get_default_model_a400_none(self, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6951,7 +6951,7 @@ def get_default_none200_invalid(self, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6992,7 +6992,7 @@ def get_default_none200_none(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7033,7 +7033,7 @@ def get_default_none400_invalid(self, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7074,7 +7074,7 @@ def get_default_none400_none(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7124,7 +7124,7 @@ def get200_model_a200_none(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7180,7 +7180,7 @@ def get200_model_a200_valid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7236,7 +7236,7 @@ def get200_model_a200_invalid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7292,7 +7292,7 @@ def get200_model_a400_none(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7348,7 +7348,7 @@ def get200_model_a400_valid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7404,7 +7404,7 @@ def get200_model_a400_invalid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7460,7 +7460,7 @@ def get200_model_a202_valid(self, **kwargs: Any) -> JSON: "statusCode": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_configuration.py index bf9531790ff..1a420f42331 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class IncorrectReturnedErrorModelConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class IncorrectReturnedErrorModelConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for IncorrectReturnedErrorModel. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_operations/_operations.py index 68409dd999f..cfaa4e5e7e1 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +54,7 @@ def get_incorrect_error_from_server(self, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_vendor.py index f44286f6df3..dc5c02fbead 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import IncorrectReturnedErrorModelConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_configuration.py index 6b8246a13f6..c0dd6fd9271 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class IncorrectReturnedErrorModelConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class IncorrectReturnedErrorModelConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for IncorrectReturnedErrorModel. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_operations/_operations.py index cb47efef630..b290de3ffd9 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,9 +34,7 @@ class IncorrectReturnedErrorModelOperationsMixin(IncorrectReturnedErrorModelMixinABC): # pylint: disable=name-too-long @distributed_trace_async - async def get_incorrect_error_from_server( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_incorrect_error_from_server(self, **kwargs: Any) -> None: """Get an error response from the server that is not as described in our Error object. Want to swallow the deserialization error and still return an HttpResponseError to the users. @@ -45,7 +42,7 @@ async def get_incorrect_error_from_server( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_vendor.py index 890e7156ceb..5f03a29a82f 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import IncorrectReturnedErrorModelConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_configuration.py index 8f1c651319a..5173debe784 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MediaTypesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_operations/_operations.py index e102ed7948d..fd338ad538b 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -215,7 +214,7 @@ def analyze_body(self, input: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: "source": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -276,7 +275,7 @@ def analyze_body(self, input: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: return cast(str, deserialized) # type: ignore @overload - def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + def analyze_body_no_accept_header( self, input: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -301,7 +300,7 @@ def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statem """ @overload - def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + def analyze_body_no_accept_header( self, input: Optional[IO[bytes]] = None, *, content_type: str, **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -340,7 +339,7 @@ def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statem "source": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -403,7 +402,7 @@ def content_type_with_encoding(self, input: Optional[str] = None, **kwargs: Any) :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -462,7 +461,7 @@ def binary_body_with_two_content_types(self, message: IO[bytes], **kwargs: Any) :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -519,7 +518,7 @@ def binary_body_with_three_content_types(self, message: IO[bytes], **kwargs: Any :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -574,7 +573,7 @@ def put_text_and_json_body(self, message: str, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_vendor.py index bd55e8df9fb..4cda5066f96 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MediaTypesClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_configuration.py index d4dee2ed8f6..58c343efa42 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MediaTypesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MediaTypesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/_operations.py index c9df4bc80c1..899603572b2 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -110,7 +109,7 @@ async def analyze_body(self, input: Optional[Union[JSON, IO[bytes]]] = None, **k "source": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -171,7 +170,7 @@ async def analyze_body(self, input: Optional[Union[JSON, IO[bytes]]] = None, **k return cast(str, deserialized) # type: ignore @overload - async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + async def analyze_body_no_accept_header( self, input: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -196,7 +195,7 @@ async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return- """ @overload - async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + async def analyze_body_no_accept_header( self, input: Optional[IO[bytes]] = None, *, content_type: str, **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -214,7 +213,7 @@ async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return-statements + async def analyze_body_no_accept_header( self, input: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> None: """Analyze body, that could be different media types. Adds to AnalyzeBody by not having an accept @@ -235,7 +234,7 @@ async def analyze_body_no_accept_header( # pylint: disable=inconsistent-return- "source": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -298,7 +297,7 @@ async def content_type_with_encoding(self, input: Optional[str] = None, **kwargs :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -357,7 +356,7 @@ async def binary_body_with_two_content_types(self, message: IO[bytes], **kwargs: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -414,7 +413,7 @@ async def binary_body_with_three_content_types(self, message: IO[bytes], **kwarg :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -469,7 +468,7 @@ async def put_text_and_json_body(self, message: str, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_vendor.py index 25d77ae17f3..c151fb621f7 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MediaTypesClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_configuration.py index db44d85350c..c28320cf73b 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class MergePatchJsonClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MergePatchJsonClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MergePatchJsonClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_operations/_operations.py index 3bd40a1d2c9..efae35048ba 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -68,7 +67,7 @@ def patch_single(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_vendor.py index bc7fd4a52a0..8295b4aa6c6 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MergePatchJsonClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_configuration.py index cddacf90887..819f513226f 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class MergePatchJsonClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MergePatchJsonClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MergePatchJsonClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_operations/_operations.py index 1f0a00ea95a..48250d032eb 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -37,7 +36,7 @@ class MergePatchJsonClientOperationsMixin(MergePatchJsonClientMixinABC): @distributed_trace_async - async def patch_single(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def patch_single(self, body: JSON, **kwargs: Any) -> None: """Basic patch with an object. :param body: Pass in {'foo': 'bar'} for a 200, anything else for an object error. Required. @@ -46,7 +45,7 @@ async def patch_single(self, body: JSON, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_vendor.py index 0521b5d17da..ef83da259a4 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MergePatchJsonClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_operations/_operations.py index 281a3730143..ca5207965a6 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -245,7 +245,7 @@ class AutoRestResourceFlatteningTestServiceOperationsMixin( # pylint: disable=n ): @overload - def put_array( # pylint: disable=inconsistent-return-statements + def put_array( self, resource_array: Optional[List[JSON]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as an Array. @@ -280,7 +280,7 @@ def put_array( # pylint: disable=inconsistent-return-statements """ @overload - def put_array( # pylint: disable=inconsistent-return-statements + def put_array( self, resource_array: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as an Array. @@ -314,7 +314,7 @@ def put_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -395,7 +395,7 @@ def get_array(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -436,7 +436,7 @@ def get_array(self, **kwargs: Any) -> List[JSON]: return cast(List[JSON], deserialized) # type: ignore @overload - def put_wrapped_array( # pylint: disable=inconsistent-return-statements + def put_wrapped_array( self, resource_array: Optional[List[JSON]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """No need to have a route in Express server for this operation. Used to verify the type flattened @@ -466,7 +466,7 @@ def put_wrapped_array( # pylint: disable=inconsistent-return-statements """ @overload - def put_wrapped_array( # pylint: disable=inconsistent-return-statements + def put_wrapped_array( self, resource_array: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """No need to have a route in Express server for this operation. Used to verify the type flattened @@ -502,7 +502,7 @@ def put_wrapped_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -574,7 +574,7 @@ def get_wrapped_array(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -615,7 +615,7 @@ def get_wrapped_array(self, **kwargs: Any) -> List[JSON]: return cast(List[JSON], deserialized) # type: ignore @overload - def put_dictionary( # pylint: disable=inconsistent-return-statements + def put_dictionary( self, resource_dictionary: Optional[Dict[str, JSON]] = None, *, @@ -660,7 +660,7 @@ def put_dictionary( # pylint: disable=inconsistent-return-statements """ @overload - def put_dictionary( # pylint: disable=inconsistent-return-statements + def put_dictionary( self, resource_dictionary: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as a Dictionary. @@ -694,7 +694,7 @@ def put_dictionary( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -775,7 +775,7 @@ def get_dictionary(self, **kwargs: Any) -> Dict[str, JSON]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -816,7 +816,7 @@ def get_dictionary(self, **kwargs: Any) -> Dict[str, JSON]: return cast(Dict[str, JSON], deserialized) # type: ignore @overload - def put_resource_collection( # pylint: disable=inconsistent-return-statements + def put_resource_collection( self, resource_complex_object: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as a ResourceCollection. @@ -892,7 +892,7 @@ def put_resource_collection( # pylint: disable=inconsistent-return-statements """ @overload - def put_resource_collection( # pylint: disable=inconsistent-return-statements + def put_resource_collection( self, resource_complex_object: Optional[IO[bytes]] = None, *, @@ -987,7 +987,7 @@ def put_resource_collection( # pylint: disable=inconsistent-return-statements } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1102,7 +1102,7 @@ def get_resource_collection(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1273,7 +1273,7 @@ def put_simple_product(self, simple_body_product: Optional[Union[JSON, IO[bytes] } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1461,7 +1461,7 @@ def post_flattened_simple_product( } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1665,7 +1665,7 @@ def put_simple_product_with_grouping( } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_vendor.py index a9c5cb94413..1ad7d328b42 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_vendor.py @@ -11,13 +11,12 @@ from ._configuration import AutoRestResourceFlatteningTestServiceConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer -class AutoRestResourceFlatteningTestServiceMixinABC(ABC): # pylint: disable=name-too-long +class AutoRestResourceFlatteningTestServiceMixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" _client: "PipelineClient" diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_operations/_operations.py index 57ea2ad77bb..c95106e31e5 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -41,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +52,7 @@ class AutoRestResourceFlatteningTestServiceOperationsMixin( # pylint: disable=n ): @overload - async def put_array( # pylint: disable=inconsistent-return-statements + async def put_array( self, resource_array: Optional[List[JSON]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as an Array. @@ -87,7 +87,7 @@ async def put_array( # pylint: disable=inconsistent-return-statements """ @overload - async def put_array( # pylint: disable=inconsistent-return-statements + async def put_array( self, resource_array: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as an Array. @@ -106,9 +106,7 @@ async def put_array( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_array( # pylint: disable=inconsistent-return-statements - self, resource_array: Optional[Union[List[JSON], IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def put_array(self, resource_array: Optional[Union[List[JSON], IO[bytes]]] = None, **kwargs: Any) -> None: """Put External Resource as an Array. .. seealso:: @@ -121,7 +119,7 @@ async def put_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -202,7 +200,7 @@ async def get_array(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -243,7 +241,7 @@ async def get_array(self, **kwargs: Any) -> List[JSON]: return cast(List[JSON], deserialized) # type: ignore @overload - async def put_wrapped_array( # pylint: disable=inconsistent-return-statements + async def put_wrapped_array( self, resource_array: Optional[List[JSON]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """No need to have a route in Express server for this operation. Used to verify the type flattened @@ -273,7 +271,7 @@ async def put_wrapped_array( # pylint: disable=inconsistent-return-statements """ @overload - async def put_wrapped_array( # pylint: disable=inconsistent-return-statements + async def put_wrapped_array( self, resource_array: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """No need to have a route in Express server for this operation. Used to verify the type flattened @@ -293,7 +291,7 @@ async def put_wrapped_array( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_wrapped_array( # pylint: disable=inconsistent-return-statements + async def put_wrapped_array( self, resource_array: Optional[Union[List[JSON], IO[bytes]]] = None, **kwargs: Any ) -> None: """No need to have a route in Express server for this operation. Used to verify the type flattened @@ -309,7 +307,7 @@ async def put_wrapped_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -381,7 +379,7 @@ async def get_wrapped_array(self, **kwargs: Any) -> List[JSON]: } ] """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -422,7 +420,7 @@ async def get_wrapped_array(self, **kwargs: Any) -> List[JSON]: return cast(List[JSON], deserialized) # type: ignore @overload - async def put_dictionary( # pylint: disable=inconsistent-return-statements + async def put_dictionary( self, resource_dictionary: Optional[Dict[str, JSON]] = None, *, @@ -467,7 +465,7 @@ async def put_dictionary( # pylint: disable=inconsistent-return-statements """ @overload - async def put_dictionary( # pylint: disable=inconsistent-return-statements + async def put_dictionary( self, resource_dictionary: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as a Dictionary. @@ -486,7 +484,7 @@ async def put_dictionary( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_dictionary( # pylint: disable=inconsistent-return-statements + async def put_dictionary( self, resource_dictionary: Optional[Union[Dict[str, JSON], IO[bytes]]] = None, **kwargs: Any ) -> None: """Put External Resource as a Dictionary. @@ -501,7 +499,7 @@ async def put_dictionary( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -582,7 +580,7 @@ async def get_dictionary(self, **kwargs: Any) -> Dict[str, JSON]: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -623,7 +621,7 @@ async def get_dictionary(self, **kwargs: Any) -> Dict[str, JSON]: return cast(Dict[str, JSON], deserialized) # type: ignore @overload - async def put_resource_collection( # pylint: disable=inconsistent-return-statements + async def put_resource_collection( self, resource_complex_object: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put External Resource as a ResourceCollection. @@ -699,7 +697,7 @@ async def put_resource_collection( # pylint: disable=inconsistent-return-statem """ @overload - async def put_resource_collection( # pylint: disable=inconsistent-return-statements + async def put_resource_collection( self, resource_complex_object: Optional[IO[bytes]] = None, *, @@ -723,7 +721,7 @@ async def put_resource_collection( # pylint: disable=inconsistent-return-statem """ @distributed_trace_async - async def put_resource_collection( # pylint: disable=inconsistent-return-statements + async def put_resource_collection( self, resource_complex_object: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> None: """Put External Resource as a ResourceCollection. @@ -794,7 +792,7 @@ async def put_resource_collection( # pylint: disable=inconsistent-return-statem } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -909,7 +907,7 @@ async def get_resource_collection(self, **kwargs: Any) -> JSON: } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1082,7 +1080,7 @@ async def put_simple_product( } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1270,7 +1268,7 @@ async def post_flattened_simple_product( } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1474,7 +1472,7 @@ async def put_simple_product_with_grouping( } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_vendor.py index a7599da945c..6f540954681 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_vendor.py @@ -11,13 +11,12 @@ from ._configuration import AutoRestResourceFlatteningTestServiceConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer -class AutoRestResourceFlatteningTestServiceMixinABC(ABC): # pylint: disable=name-too-long +class AutoRestResourceFlatteningTestServiceMixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" _client: "AsyncPipelineClient" diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/_operations.py index c108dba6966..edf1125c91d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -222,7 +222,7 @@ def get_horse(self, **kwargs: Any) -> JSON: "isAShowHorse": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -319,7 +319,7 @@ def put_horse(self, horse: Union[JSON, IO[bytes]], **kwargs: Any) -> str: "isAShowHorse": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -387,7 +387,7 @@ def get_pet(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -481,7 +481,7 @@ def put_pet(self, pet: Union[JSON, IO[bytes]], **kwargs: Any) -> str: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -550,7 +550,7 @@ def get_feline(self, **kwargs: Any) -> JSON: "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -647,7 +647,7 @@ def put_feline(self, feline: Union[JSON, IO[bytes]], **kwargs: Any) -> str: "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +718,7 @@ def get_cat(self, **kwargs: Any) -> JSON: "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -821,7 +821,7 @@ def put_cat(self, cat: Union[JSON, IO[bytes]], **kwargs: Any) -> str: "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -894,7 +894,7 @@ def get_kitten(self, **kwargs: Any) -> JSON: "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1002,7 +1002,7 @@ def put_kitten(self, kitten: Union[JSON, IO[bytes]], **kwargs: Any) -> str: "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_vendor.py index ab12708447c..8a74180edd6 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultipleInheritanceServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_operations/_operations.py index 479f8965269..0dc9a38a2d9 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -40,7 +39,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +66,7 @@ async def get_horse(self, **kwargs: Any) -> JSON: "isAShowHorse": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -164,7 +163,7 @@ async def put_horse(self, horse: Union[JSON, IO[bytes]], **kwargs: Any) -> str: "isAShowHorse": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -232,7 +231,7 @@ async def get_pet(self, **kwargs: Any) -> JSON: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -326,7 +325,7 @@ async def put_pet(self, pet: Union[JSON, IO[bytes]], **kwargs: Any) -> str: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -395,7 +394,7 @@ async def get_feline(self, **kwargs: Any) -> JSON: "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -492,7 +491,7 @@ async def put_feline(self, feline: Union[JSON, IO[bytes]], **kwargs: Any) -> str "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -563,7 +562,7 @@ async def get_cat(self, **kwargs: Any) -> JSON: "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -666,7 +665,7 @@ async def put_cat(self, cat: Union[JSON, IO[bytes]], **kwargs: Any) -> str: "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -739,7 +738,7 @@ async def get_kitten(self, **kwargs: Any) -> JSON: "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -847,7 +846,7 @@ async def put_kitten(self, kitten: Union[JSON, IO[bytes]], **kwargs: Any) -> str "meows": bool } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_vendor.py index 22e0b34b3f3..457fe8c5636 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultipleInheritanceServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_operations/_operations.py index bac954e418d..d081855ed58 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -131,7 +130,7 @@ def get_object(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +181,7 @@ def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -228,7 +227,7 @@ def get_string(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -279,7 +278,7 @@ def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -325,7 +324,7 @@ def get_array(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -376,7 +375,7 @@ def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_vendor.py index dc910ddc7e5..db0a5a9a33b 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AnythingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_operations/_operations.py index 65265f50875..fcb94ed360f 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +50,7 @@ async def get_object(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92,7 +91,7 @@ async def get_object(self, **kwargs: Any) -> Any: return cast(Any, deserialized) # type: ignore @distributed_trace_async - async def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_object(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an object as anything. Pass in {'foo': 'bar'} to get a 200 and anything else to get an object error. @@ -102,7 +101,7 @@ async def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -148,7 +147,7 @@ async def get_string(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -189,7 +188,7 @@ async def get_string(self, **kwargs: Any) -> Any: return cast(Any, deserialized) # type: ignore @distributed_trace_async - async def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_string(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an string as anything. Pass in 'anything' to get a 200 and anything else to get an object error. @@ -199,7 +198,7 @@ async def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -245,7 +244,7 @@ async def get_array(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -286,7 +285,7 @@ async def get_array(self, **kwargs: Any) -> Any: return cast(Any, deserialized) # type: ignore @distributed_trace_async - async def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put_array(self, input: Any, **kwargs: Any) -> None: """Basic put that puts an array as anything. Pass in ['foo', 'bar'] to get a 200 and anything else to get an object error. @@ -296,7 +295,7 @@ async def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_vendor.py index 29d65bdd121..c99b54eef8d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AnythingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/nooperationsversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/nooperationsversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/nooperationsversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/nooperationsversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/_configuration.py index fb3b4bb8129..9863b9fa552 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class NonStringEnumsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NonStringEnumsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NonStringEnumsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/aio/_configuration.py index fc6756a1965..b5ad758d11d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class NonStringEnumsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NonStringEnumsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NonStringEnumsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/aio/operations/_operations.py index 677669e57ad..e8f0931ec42 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -65,7 +64,7 @@ async def put(self, input: Optional[int] = None, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -121,7 +120,7 @@ async def get(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -190,7 +189,7 @@ async def put(self, input: Optional[float] = None, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -246,7 +245,7 @@ async def get(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/operations/_operations.py index a0bc3bc72ae..f250a333d6d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/nonstringenumsversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -125,7 +124,7 @@ def put(self, input: Optional[int] = None, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +180,7 @@ def get(self, **kwargs: Any) -> int: :rtype: int :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -250,7 +249,7 @@ def put(self, input: Optional[float] = None, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -306,7 +305,7 @@ def get(self, **kwargs: Any) -> float: :rtype: float :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_configuration.py index 80639e9d9ac..a5b3c890358 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ObjectTypeClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ObjectTypeClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ObjectTypeClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/_operations.py index 9deafa91b9b..a9cb45a5d70 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -79,7 +78,7 @@ def get(self, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -131,7 +130,7 @@ def put(self, put_object: JSON, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_vendor.py index 38f277f20f4..e42ff8bdaa8 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ObjectTypeClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_configuration.py index 062d8c513cd..3a8de7e5e25 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ObjectTypeClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ObjectTypeClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ObjectTypeClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_operations/_operations.py index ada2a6fa143..7f2df404f75 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +44,7 @@ async def get(self, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86,7 +85,7 @@ async def get(self, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @distributed_trace_async - async def put(self, put_object: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put(self, put_object: JSON, **kwargs: Any) -> None: """Basic put that puts an object. Pass in {'foo': 'bar'} to get a 200 and anything else to get an object error. @@ -97,7 +96,7 @@ async def put(self, put_object: JSON, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_vendor.py index 97ff8285a95..7773f545cb3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ObjectTypeClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/_configuration.py index 22081aeecad..dfbfa3c510e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestParameterFlatteningConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestParameterFlatteningConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestParameterFlattening. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/aio/_configuration.py index 1cba0561eb3..a1f67d7f164 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestParameterFlatteningConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestParameterFlatteningConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestParameterFlattening. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/aio/operations/_operations.py index 5e1b58fbf53..23a22e32a9d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def update( # pylint: disable=inconsistent-return-statements + async def update( self, resource_group_name: str, avset: str, tags: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Updates the tags for an availability set. @@ -82,7 +81,7 @@ async def update( # pylint: disable=inconsistent-return-statements """ @overload - async def update( # pylint: disable=inconsistent-return-statements + async def update( self, resource_group_name: str, avset: str, @@ -108,9 +107,7 @@ async def update( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def update( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, avset: str, tags: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def update(self, resource_group_name: str, avset: str, tags: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Updates the tags for an availability set. :param resource_group_name: The name of the resource group. Required. @@ -133,7 +130,7 @@ async def update( # pylint: disable=inconsistent-return-statements } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/operations/_operations.py index 8aca0837302..a9932680b88 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/parameterflatteningversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -75,7 +74,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def update( # pylint: disable=inconsistent-return-statements + def update( self, resource_group_name: str, avset: str, tags: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Updates the tags for an availability set. @@ -105,7 +104,7 @@ def update( # pylint: disable=inconsistent-return-statements """ @overload - def update( # pylint: disable=inconsistent-return-statements + def update( self, resource_group_name: str, avset: str, @@ -156,7 +155,7 @@ def update( # pylint: disable=inconsistent-return-statements } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_configuration.py index 229782ee04d..896c1ee8243 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ParmaterizedEndpointClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ParmaterizedEndpointClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ParmaterizedEndpointClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_operations/_operations.py index 8a8cd883d6a..87c42c62c59 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_vendor.py index 3aa95cca6e2..a9e7ad280de 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ParmaterizedEndpointClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_configuration.py index a38b3f9c39e..7188075d8cd 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ParmaterizedEndpointClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ParmaterizedEndpointClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ParmaterizedEndpointClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_operations/_operations.py index 368a075387b..e4f60416616 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class ParmaterizedEndpointClientOperationsMixin(ParmaterizedEndpointClientMixinABC): # pylint: disable=name-too-long @distributed_trace_async - async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get(self, **kwargs: Any) -> None: """Basic get to make sure base url formatting of 'endpoint' works. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_vendor.py index c8495a15c6f..32921e9fc7d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ParmaterizedEndpointClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_configuration.py index 8a6f1d8a654..cb569882d29 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestReportServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestReportServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestReportService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_operations/_operations.py index ec0af82656f..6d15a425633 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ def get_report(self, *, qualifier: Optional[str] = None, **kwargs: Any) -> Dict[ "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,7 +160,7 @@ def get_optional_report(self, *, qualifier: Optional[str] = None, **kwargs: Any) "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_vendor.py index 3809d97ecea..823d06e3b42 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestReportServiceConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_configuration.py index 35535c4c606..0a1e1f75555 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestReportServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestReportServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestReportService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_operations/_operations.py index b2149808884..8585a5f8fc5 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def get_report(self, *, qualifier: Optional[str] = None, **kwargs: Any) -> "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -118,7 +117,7 @@ async def get_optional_report(self, *, qualifier: Optional[str] = None, **kwargs "str": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_vendor.py index ebe95d1ea53..4777573d29a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestReportServiceConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/aio/operations/_operations.py index eb6dded4c1d..c1a0fc9b4e9 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -61,7 +61,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -85,9 +85,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_required_path( # pylint: disable=inconsistent-return-statements - self, path_parameter: str, **kwargs: Any - ) -> None: + async def get_required_path(self, path_parameter: str, **kwargs: Any) -> None: """Test implicitly required path parameter. :param path_parameter: Required. @@ -96,7 +94,7 @@ async def get_required_path( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -131,9 +129,7 @@ async def get_required_path( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_optional_query( # pylint: disable=inconsistent-return-statements - self, *, query_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def put_optional_query(self, *, query_parameter: Optional[str] = None, **kwargs: Any) -> None: """Test implicitly optional query parameter. :keyword query_parameter: Default value is None. @@ -142,7 +138,7 @@ async def put_optional_query( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -177,9 +173,7 @@ async def put_optional_query( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_optional_header( # pylint: disable=inconsistent-return-statements - self, *, query_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def put_optional_header(self, *, query_parameter: Optional[str] = None, **kwargs: Any) -> None: """Test implicitly optional header parameter. :keyword query_parameter: Default value is None. @@ -188,7 +182,7 @@ async def put_optional_header( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -223,9 +217,7 @@ async def put_optional_header( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_optional_body( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def put_optional_body(self, body_parameter: Optional[str] = None, **kwargs: Any) -> None: """Test implicitly optional body parameter. :param body_parameter: Default value is None. @@ -234,7 +226,7 @@ async def put_optional_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -276,9 +268,7 @@ async def put_optional_body( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_optional_binary_body( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[IO[bytes]] = None, **kwargs: Any - ) -> None: + async def put_optional_binary_body(self, body_parameter: Optional[IO[bytes]] = None, **kwargs: Any) -> None: """Test implicitly optional body parameter. :param body_parameter: Default value is None. @@ -287,7 +277,7 @@ async def put_optional_binary_body( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -326,14 +316,14 @@ async def put_optional_binary_body( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_required_global_path(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_required_global_path(self, **kwargs: Any) -> None: """Test implicitly required path parameter. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -368,14 +358,14 @@ async def get_required_global_path(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_required_global_query(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_required_global_query(self, **kwargs: Any) -> None: """Test implicitly required query parameter. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -410,14 +400,14 @@ async def get_required_global_query(self, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_optional_global_query(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_optional_global_query(self, **kwargs: Any) -> None: """Test implicitly optional query parameter. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -470,9 +460,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def put_optional_binary_body( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[IO[bytes]] = None, **kwargs: Any - ) -> None: + async def put_optional_binary_body(self, body_parameter: Optional[IO[bytes]] = None, **kwargs: Any) -> None: """Test explicitly optional body parameter. :param body_parameter: Default value is None. @@ -481,7 +469,7 @@ async def put_optional_binary_body( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -520,9 +508,7 @@ async def put_optional_binary_body( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_required_binary_body( # pylint: disable=inconsistent-return-statements - self, body_parameter: IO[bytes], **kwargs: Any - ) -> None: + async def put_required_binary_body(self, body_parameter: IO[bytes], **kwargs: Any) -> None: """Test explicitly required body parameter. :param body_parameter: Required. @@ -531,7 +517,7 @@ async def put_required_binary_body( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -570,9 +556,7 @@ async def put_required_binary_body( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_integer_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: int, **kwargs: Any - ) -> None: + async def post_required_integer_parameter(self, body_parameter: int, **kwargs: Any) -> None: """Test explicitly required integer. Please put null and the client library should throw before the request is sent. @@ -582,7 +566,7 @@ async def post_required_integer_parameter( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -621,9 +605,7 @@ async def post_required_integer_parameter( # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_integer_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[int] = None, **kwargs: Any - ) -> None: + async def post_optional_integer_parameter(self, body_parameter: Optional[int] = None, **kwargs: Any) -> None: """Test explicitly optional integer. Please put null. :param body_parameter: Default value is None. @@ -632,7 +614,7 @@ async def post_optional_integer_parameter( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -674,7 +656,7 @@ async def post_optional_integer_parameter( # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_required_integer_property( # pylint: disable=inconsistent-return-statements + async def post_required_integer_property( self, body_parameter: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required integer. Please put a valid int-wrapper with 'value' = null and the @@ -699,7 +681,7 @@ async def post_required_integer_property( # pylint: disable=inconsistent-return """ @overload - async def post_required_integer_property( # pylint: disable=inconsistent-return-statements + async def post_required_integer_property( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required integer. Please put a valid int-wrapper with 'value' = null and the @@ -716,9 +698,7 @@ async def post_required_integer_property( # pylint: disable=inconsistent-return """ @distributed_trace_async - async def post_required_integer_property( # pylint: disable=inconsistent-return-statements - self, body_parameter: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_required_integer_property(self, body_parameter: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Test explicitly required integer. Please put a valid int-wrapper with 'value' = null and the client library should throw before the request is sent. @@ -736,7 +716,7 @@ async def post_required_integer_property( # pylint: disable=inconsistent-return "value": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -782,7 +762,7 @@ async def post_required_integer_property( # pylint: disable=inconsistent-return return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_optional_integer_property( # pylint: disable=inconsistent-return-statements + async def post_optional_integer_property( self, body_parameter: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional integer. Please put a valid int-wrapper with 'value' = null. @@ -806,7 +786,7 @@ async def post_optional_integer_property( # pylint: disable=inconsistent-return """ @overload - async def post_optional_integer_property( # pylint: disable=inconsistent-return-statements + async def post_optional_integer_property( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional integer. Please put a valid int-wrapper with 'value' = null. @@ -822,7 +802,7 @@ async def post_optional_integer_property( # pylint: disable=inconsistent-return """ @distributed_trace_async - async def post_optional_integer_property( # pylint: disable=inconsistent-return-statements + async def post_optional_integer_property( self, body_parameter: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> None: """Test explicitly optional integer. Please put a valid int-wrapper with 'value' = null. @@ -841,7 +821,7 @@ async def post_optional_integer_property( # pylint: disable=inconsistent-return "value": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -890,9 +870,7 @@ async def post_optional_integer_property( # pylint: disable=inconsistent-return return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_integer_header( # pylint: disable=inconsistent-return-statements - self, *, header_parameter: int, **kwargs: Any - ) -> None: + async def post_required_integer_header(self, *, header_parameter: int, **kwargs: Any) -> None: """Test explicitly required integer. Please put a header 'headerParameter' => null and the client library should throw before the request is sent. @@ -902,7 +880,7 @@ async def post_required_integer_header( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -937,9 +915,7 @@ async def post_required_integer_header( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_integer_header( # pylint: disable=inconsistent-return-statements - self, *, header_parameter: Optional[int] = None, **kwargs: Any - ) -> None: + async def post_optional_integer_header(self, *, header_parameter: Optional[int] = None, **kwargs: Any) -> None: """Test explicitly optional integer. Please put a header 'headerParameter' => null. :keyword header_parameter: Default value is None. @@ -948,7 +924,7 @@ async def post_optional_integer_header( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -983,9 +959,7 @@ async def post_optional_integer_header( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_string_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: str, **kwargs: Any - ) -> None: + async def post_required_string_parameter(self, body_parameter: str, **kwargs: Any) -> None: """Test explicitly required string. Please put null and the client library should throw before the request is sent. @@ -995,7 +969,7 @@ async def post_required_string_parameter( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1034,9 +1008,7 @@ async def post_required_string_parameter( # pylint: disable=inconsistent-return return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_string_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def post_optional_string_parameter(self, body_parameter: Optional[str] = None, **kwargs: Any) -> None: """Test explicitly optional string. Please put null. :param body_parameter: Default value is None. @@ -1045,7 +1017,7 @@ async def post_optional_string_parameter( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1087,7 +1059,7 @@ async def post_optional_string_parameter( # pylint: disable=inconsistent-return return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_required_string_property( # pylint: disable=inconsistent-return-statements + async def post_required_string_property( self, body_parameter: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required string. Please put a valid string-wrapper with 'value' = null and the @@ -1112,7 +1084,7 @@ async def post_required_string_property( # pylint: disable=inconsistent-return- """ @overload - async def post_required_string_property( # pylint: disable=inconsistent-return-statements + async def post_required_string_property( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required string. Please put a valid string-wrapper with 'value' = null and the @@ -1129,9 +1101,7 @@ async def post_required_string_property( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def post_required_string_property( # pylint: disable=inconsistent-return-statements - self, body_parameter: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_required_string_property(self, body_parameter: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Test explicitly required string. Please put a valid string-wrapper with 'value' = null and the client library should throw before the request is sent. @@ -1149,7 +1119,7 @@ async def post_required_string_property( # pylint: disable=inconsistent-return- "value": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1195,7 +1165,7 @@ async def post_required_string_property( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_optional_string_property( # pylint: disable=inconsistent-return-statements + async def post_optional_string_property( self, body_parameter: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional integer. Please put a valid string-wrapper with 'value' = null. @@ -1219,7 +1189,7 @@ async def post_optional_string_property( # pylint: disable=inconsistent-return- """ @overload - async def post_optional_string_property( # pylint: disable=inconsistent-return-statements + async def post_optional_string_property( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional integer. Please put a valid string-wrapper with 'value' = null. @@ -1235,7 +1205,7 @@ async def post_optional_string_property( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def post_optional_string_property( # pylint: disable=inconsistent-return-statements + async def post_optional_string_property( self, body_parameter: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> None: """Test explicitly optional integer. Please put a valid string-wrapper with 'value' = null. @@ -1254,7 +1224,7 @@ async def post_optional_string_property( # pylint: disable=inconsistent-return- "value": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1303,9 +1273,7 @@ async def post_optional_string_property( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_string_header( # pylint: disable=inconsistent-return-statements - self, *, header_parameter: str, **kwargs: Any - ) -> None: + async def post_required_string_header(self, *, header_parameter: str, **kwargs: Any) -> None: """Test explicitly required string. Please put a header 'headerParameter' => null and the client library should throw before the request is sent. @@ -1315,7 +1283,7 @@ async def post_required_string_header( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1350,9 +1318,7 @@ async def post_required_string_header( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_string_header( # pylint: disable=inconsistent-return-statements - self, *, body_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def post_optional_string_header(self, *, body_parameter: Optional[str] = None, **kwargs: Any) -> None: """Test explicitly optional string. Please put a header 'headerParameter' => null. :keyword body_parameter: Default value is None. @@ -1361,7 +1327,7 @@ async def post_optional_string_header( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1396,7 +1362,7 @@ async def post_optional_string_header( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_required_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_required_class_parameter( self, body_parameter: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put null and the client library should throw @@ -1422,7 +1388,7 @@ async def post_required_class_parameter( # pylint: disable=inconsistent-return- """ @overload - async def post_required_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_required_class_parameter( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put null and the client library should throw @@ -1439,9 +1405,7 @@ async def post_required_class_parameter( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def post_required_class_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_required_class_parameter(self, body_parameter: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Test explicitly required complex object. Please put null and the client library should throw before the request is sent. @@ -1460,7 +1424,7 @@ async def post_required_class_parameter( # pylint: disable=inconsistent-return- "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1506,7 +1470,7 @@ async def post_required_class_parameter( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_optional_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_class_parameter( self, body_parameter: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put null. @@ -1531,7 +1495,7 @@ async def post_optional_class_parameter( # pylint: disable=inconsistent-return- """ @overload - async def post_optional_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_class_parameter( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put null. @@ -1547,7 +1511,7 @@ async def post_optional_class_parameter( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def post_optional_class_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_class_parameter( self, body_parameter: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put null. @@ -1567,7 +1531,7 @@ async def post_optional_class_parameter( # pylint: disable=inconsistent-return- "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1616,7 +1580,7 @@ async def post_optional_class_parameter( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_required_class_property( # pylint: disable=inconsistent-return-statements + async def post_required_class_property( self, body_parameter: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put a valid class-wrapper with 'value' = null @@ -1644,7 +1608,7 @@ async def post_required_class_property( # pylint: disable=inconsistent-return-s """ @overload - async def post_required_class_property( # pylint: disable=inconsistent-return-statements + async def post_required_class_property( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put a valid class-wrapper with 'value' = null @@ -1661,9 +1625,7 @@ async def post_required_class_property( # pylint: disable=inconsistent-return-s """ @distributed_trace_async - async def post_required_class_property( # pylint: disable=inconsistent-return-statements - self, body_parameter: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_required_class_property(self, body_parameter: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Test explicitly required complex object. Please put a valid class-wrapper with 'value' = null and the client library should throw before the request is sent. @@ -1684,7 +1646,7 @@ async def post_required_class_property( # pylint: disable=inconsistent-return-s } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1730,7 +1692,7 @@ async def post_required_class_property( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_optional_class_property( # pylint: disable=inconsistent-return-statements + async def post_optional_class_property( self, body_parameter: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put a valid class-wrapper with 'value' = null. @@ -1757,7 +1719,7 @@ async def post_optional_class_property( # pylint: disable=inconsistent-return-s """ @overload - async def post_optional_class_property( # pylint: disable=inconsistent-return-statements + async def post_optional_class_property( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put a valid class-wrapper with 'value' = null. @@ -1773,7 +1735,7 @@ async def post_optional_class_property( # pylint: disable=inconsistent-return-s """ @distributed_trace_async - async def post_optional_class_property( # pylint: disable=inconsistent-return-statements + async def post_optional_class_property( self, body_parameter: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put a valid class-wrapper with 'value' = null. @@ -1795,7 +1757,7 @@ async def post_optional_class_property( # pylint: disable=inconsistent-return-s } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1844,7 +1806,7 @@ async def post_optional_class_property( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_required_array_parameter( # pylint: disable=inconsistent-return-statements + async def post_required_array_parameter( self, body_parameter: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put null and the client library should throw before the @@ -1869,7 +1831,7 @@ async def post_required_array_parameter( # pylint: disable=inconsistent-return- """ @overload - async def post_required_array_parameter( # pylint: disable=inconsistent-return-statements + async def post_required_array_parameter( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put null and the client library should throw before the @@ -1886,9 +1848,7 @@ async def post_required_array_parameter( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def post_required_array_parameter( # pylint: disable=inconsistent-return-statements - self, body_parameter: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def post_required_array_parameter(self, body_parameter: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """Test explicitly required array. Please put null and the client library should throw before the request is sent. @@ -1898,7 +1858,7 @@ async def post_required_array_parameter( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1944,7 +1904,7 @@ async def post_required_array_parameter( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_optional_array_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_array_parameter( self, body_parameter: Optional[List[str]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put null. @@ -1968,7 +1928,7 @@ async def post_optional_array_parameter( # pylint: disable=inconsistent-return- """ @overload - async def post_optional_array_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_array_parameter( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put null. @@ -1984,7 +1944,7 @@ async def post_optional_array_parameter( # pylint: disable=inconsistent-return- """ @distributed_trace_async - async def post_optional_array_parameter( # pylint: disable=inconsistent-return-statements + async def post_optional_array_parameter( self, body_parameter: Optional[Union[List[str], IO[bytes]]] = None, **kwargs: Any ) -> None: """Test explicitly optional array. Please put null. @@ -1995,7 +1955,7 @@ async def post_optional_array_parameter( # pylint: disable=inconsistent-return- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2044,7 +2004,7 @@ async def post_optional_array_parameter( # pylint: disable=inconsistent-return- return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_required_array_property( # pylint: disable=inconsistent-return-statements + async def post_required_array_property( self, body_parameter: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put a valid array-wrapper with 'value' = null and the @@ -2071,7 +2031,7 @@ async def post_required_array_property( # pylint: disable=inconsistent-return-s """ @overload - async def post_required_array_property( # pylint: disable=inconsistent-return-statements + async def post_required_array_property( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put a valid array-wrapper with 'value' = null and the @@ -2088,9 +2048,7 @@ async def post_required_array_property( # pylint: disable=inconsistent-return-s """ @distributed_trace_async - async def post_required_array_property( # pylint: disable=inconsistent-return-statements - self, body_parameter: Union[JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_required_array_property(self, body_parameter: Union[JSON, IO[bytes]], **kwargs: Any) -> None: """Test explicitly required array. Please put a valid array-wrapper with 'value' = null and the client library should throw before the request is sent. @@ -2110,7 +2068,7 @@ async def post_required_array_property( # pylint: disable=inconsistent-return-s ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2156,7 +2114,7 @@ async def post_required_array_property( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_optional_array_property( # pylint: disable=inconsistent-return-statements + async def post_optional_array_property( self, body_parameter: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put a valid array-wrapper with 'value' = null. @@ -2182,7 +2140,7 @@ async def post_optional_array_property( # pylint: disable=inconsistent-return-s """ @overload - async def post_optional_array_property( # pylint: disable=inconsistent-return-statements + async def post_optional_array_property( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put a valid array-wrapper with 'value' = null. @@ -2198,7 +2156,7 @@ async def post_optional_array_property( # pylint: disable=inconsistent-return-s """ @distributed_trace_async - async def post_optional_array_property( # pylint: disable=inconsistent-return-statements + async def post_optional_array_property( self, body_parameter: Optional[Union[JSON, IO[bytes]]] = None, **kwargs: Any ) -> None: """Test explicitly optional array. Please put a valid array-wrapper with 'value' = null. @@ -2219,7 +2177,7 @@ async def post_optional_array_property( # pylint: disable=inconsistent-return-s ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2268,9 +2226,7 @@ async def post_optional_array_property( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_required_array_header( # pylint: disable=inconsistent-return-statements - self, *, header_parameter: List[str], **kwargs: Any - ) -> None: + async def post_required_array_header(self, *, header_parameter: List[str], **kwargs: Any) -> None: """Test explicitly required array. Please put a header 'headerParameter' => null and the client library should throw before the request is sent. @@ -2280,7 +2236,7 @@ async def post_required_array_header( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2315,9 +2271,7 @@ async def post_required_array_header( # pylint: disable=inconsistent-return-sta return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_optional_array_header( # pylint: disable=inconsistent-return-statements - self, *, header_parameter: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def post_optional_array_header(self, *, header_parameter: Optional[List[str]] = None, **kwargs: Any) -> None: """Test explicitly optional integer. Please put a header 'headerParameter' => null. :keyword header_parameter: Default value is None. @@ -2326,7 +2280,7 @@ async def post_optional_array_header( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/operations/_operations.py index dda8659cd8b..5a1dfe2b69a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -649,7 +649,7 @@ def get_required_path( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -695,7 +695,7 @@ def put_optional_query( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -741,7 +741,7 @@ def put_optional_header( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -787,7 +787,7 @@ def put_optional_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -840,7 +840,7 @@ def put_optional_binary_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -886,7 +886,7 @@ def get_required_global_path(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -928,7 +928,7 @@ def get_required_global_query(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -970,7 +970,7 @@ def get_optional_global_query(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1034,7 +1034,7 @@ def put_optional_binary_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1084,7 +1084,7 @@ def put_required_binary_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1135,7 +1135,7 @@ def post_required_integer_parameter( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1185,7 +1185,7 @@ def post_optional_integer_parameter( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1227,7 +1227,7 @@ def post_optional_integer_parameter( # pylint: disable=inconsistent-return-stat return cls(pipeline_response, None, {}) # type: ignore @overload - def post_required_integer_property( # pylint: disable=inconsistent-return-statements + def post_required_integer_property( self, body_parameter: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required integer. Please put a valid int-wrapper with 'value' = null and the @@ -1252,7 +1252,7 @@ def post_required_integer_property( # pylint: disable=inconsistent-return-state """ @overload - def post_required_integer_property( # pylint: disable=inconsistent-return-statements + def post_required_integer_property( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required integer. Please put a valid int-wrapper with 'value' = null and the @@ -1289,7 +1289,7 @@ def post_required_integer_property( # pylint: disable=inconsistent-return-state "value": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1335,7 +1335,7 @@ def post_required_integer_property( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @overload - def post_optional_integer_property( # pylint: disable=inconsistent-return-statements + def post_optional_integer_property( self, body_parameter: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional integer. Please put a valid int-wrapper with 'value' = null. @@ -1359,7 +1359,7 @@ def post_optional_integer_property( # pylint: disable=inconsistent-return-state """ @overload - def post_optional_integer_property( # pylint: disable=inconsistent-return-statements + def post_optional_integer_property( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional integer. Please put a valid int-wrapper with 'value' = null. @@ -1394,7 +1394,7 @@ def post_optional_integer_property( # pylint: disable=inconsistent-return-state "value": 0 } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1455,7 +1455,7 @@ def post_required_integer_header( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1501,7 +1501,7 @@ def post_optional_integer_header( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1548,7 +1548,7 @@ def post_required_string_parameter( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1598,7 +1598,7 @@ def post_optional_string_parameter( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1640,7 +1640,7 @@ def post_optional_string_parameter( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @overload - def post_required_string_property( # pylint: disable=inconsistent-return-statements + def post_required_string_property( self, body_parameter: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required string. Please put a valid string-wrapper with 'value' = null and the @@ -1665,7 +1665,7 @@ def post_required_string_property( # pylint: disable=inconsistent-return-statem """ @overload - def post_required_string_property( # pylint: disable=inconsistent-return-statements + def post_required_string_property( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required string. Please put a valid string-wrapper with 'value' = null and the @@ -1702,7 +1702,7 @@ def post_required_string_property( # pylint: disable=inconsistent-return-statem "value": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1748,7 +1748,7 @@ def post_required_string_property( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @overload - def post_optional_string_property( # pylint: disable=inconsistent-return-statements + def post_optional_string_property( self, body_parameter: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional integer. Please put a valid string-wrapper with 'value' = null. @@ -1772,7 +1772,7 @@ def post_optional_string_property( # pylint: disable=inconsistent-return-statem """ @overload - def post_optional_string_property( # pylint: disable=inconsistent-return-statements + def post_optional_string_property( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional integer. Please put a valid string-wrapper with 'value' = null. @@ -1807,7 +1807,7 @@ def post_optional_string_property( # pylint: disable=inconsistent-return-statem "value": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1868,7 +1868,7 @@ def post_required_string_header( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1914,7 +1914,7 @@ def post_optional_string_header( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1949,7 +1949,7 @@ def post_optional_string_header( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @overload - def post_required_class_parameter( # pylint: disable=inconsistent-return-statements + def post_required_class_parameter( self, body_parameter: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put null and the client library should throw @@ -1975,7 +1975,7 @@ def post_required_class_parameter( # pylint: disable=inconsistent-return-statem """ @overload - def post_required_class_parameter( # pylint: disable=inconsistent-return-statements + def post_required_class_parameter( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put null and the client library should throw @@ -2013,7 +2013,7 @@ def post_required_class_parameter( # pylint: disable=inconsistent-return-statem "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2059,7 +2059,7 @@ def post_required_class_parameter( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @overload - def post_optional_class_parameter( # pylint: disable=inconsistent-return-statements + def post_optional_class_parameter( self, body_parameter: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put null. @@ -2084,7 +2084,7 @@ def post_optional_class_parameter( # pylint: disable=inconsistent-return-statem """ @overload - def post_optional_class_parameter( # pylint: disable=inconsistent-return-statements + def post_optional_class_parameter( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put null. @@ -2120,7 +2120,7 @@ def post_optional_class_parameter( # pylint: disable=inconsistent-return-statem "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2169,7 +2169,7 @@ def post_optional_class_parameter( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @overload - def post_required_class_property( # pylint: disable=inconsistent-return-statements + def post_required_class_property( self, body_parameter: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put a valid class-wrapper with 'value' = null @@ -2197,7 +2197,7 @@ def post_required_class_property( # pylint: disable=inconsistent-return-stateme """ @overload - def post_required_class_property( # pylint: disable=inconsistent-return-statements + def post_required_class_property( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required complex object. Please put a valid class-wrapper with 'value' = null @@ -2237,7 +2237,7 @@ def post_required_class_property( # pylint: disable=inconsistent-return-stateme } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2283,7 +2283,7 @@ def post_required_class_property( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @overload - def post_optional_class_property( # pylint: disable=inconsistent-return-statements + def post_optional_class_property( self, body_parameter: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put a valid class-wrapper with 'value' = null. @@ -2310,7 +2310,7 @@ def post_optional_class_property( # pylint: disable=inconsistent-return-stateme """ @overload - def post_optional_class_property( # pylint: disable=inconsistent-return-statements + def post_optional_class_property( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional complex object. Please put a valid class-wrapper with 'value' = null. @@ -2348,7 +2348,7 @@ def post_optional_class_property( # pylint: disable=inconsistent-return-stateme } } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2397,7 +2397,7 @@ def post_optional_class_property( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @overload - def post_required_array_parameter( # pylint: disable=inconsistent-return-statements + def post_required_array_parameter( self, body_parameter: List[str], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put null and the client library should throw before the @@ -2422,7 +2422,7 @@ def post_required_array_parameter( # pylint: disable=inconsistent-return-statem """ @overload - def post_required_array_parameter( # pylint: disable=inconsistent-return-statements + def post_required_array_parameter( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put null and the client library should throw before the @@ -2451,7 +2451,7 @@ def post_required_array_parameter( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2497,7 +2497,7 @@ def post_required_array_parameter( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @overload - def post_optional_array_parameter( # pylint: disable=inconsistent-return-statements + def post_optional_array_parameter( self, body_parameter: Optional[List[str]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put null. @@ -2521,7 +2521,7 @@ def post_optional_array_parameter( # pylint: disable=inconsistent-return-statem """ @overload - def post_optional_array_parameter( # pylint: disable=inconsistent-return-statements + def post_optional_array_parameter( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put null. @@ -2548,7 +2548,7 @@ def post_optional_array_parameter( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2597,7 +2597,7 @@ def post_optional_array_parameter( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @overload - def post_required_array_property( # pylint: disable=inconsistent-return-statements + def post_required_array_property( self, body_parameter: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put a valid array-wrapper with 'value' = null and the @@ -2624,7 +2624,7 @@ def post_required_array_property( # pylint: disable=inconsistent-return-stateme """ @overload - def post_required_array_property( # pylint: disable=inconsistent-return-statements + def post_required_array_property( self, body_parameter: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly required array. Please put a valid array-wrapper with 'value' = null and the @@ -2663,7 +2663,7 @@ def post_required_array_property( # pylint: disable=inconsistent-return-stateme ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2709,7 +2709,7 @@ def post_required_array_property( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @overload - def post_optional_array_property( # pylint: disable=inconsistent-return-statements + def post_optional_array_property( self, body_parameter: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put a valid array-wrapper with 'value' = null. @@ -2735,7 +2735,7 @@ def post_optional_array_property( # pylint: disable=inconsistent-return-stateme """ @overload - def post_optional_array_property( # pylint: disable=inconsistent-return-statements + def post_optional_array_property( self, body_parameter: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Test explicitly optional array. Please put a valid array-wrapper with 'value' = null. @@ -2772,7 +2772,7 @@ def post_optional_array_property( # pylint: disable=inconsistent-return-stateme ] } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2833,7 +2833,7 @@ def post_required_array_header( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2879,7 +2879,7 @@ def post_optional_array_header( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_configuration.py index deb4c9d08ed..987ae38e00f 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ReservedWordsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ReservedWordsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ReservedWordsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_vendor.py index e74c45edd94..fbd2879d4ef 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ReservedWordsClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_configuration.py index 7b375283093..05a449a435c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ReservedWordsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ReservedWordsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ReservedWordsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_vendor.py index 9f9d18ebb0e..bed55c1ad80 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ReservedWordsClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/operations/_operations.py index 42acbf78f53..dedde817193 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +66,7 @@ async def operation_one(self, *, parameter1: str, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -130,7 +129,7 @@ async def operation_with_content_param(self, content: IO[bytes], **kwargs: Any) :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -185,7 +184,7 @@ async def operation_with_json_param(self, json: Any, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -249,7 +248,7 @@ async def operation_with_url( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,7 +302,7 @@ async def reserved_enum(self, *, enum_parameter: str, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/operations/_operations.py index 5b4dc23ca36..976033abf99 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, cast +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, cast from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -168,7 +167,7 @@ def operation_one(self, *, parameter1: str, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -231,7 +230,7 @@ def operation_with_content_param(self, content: IO[bytes], **kwargs: Any) -> JSO :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -286,7 +285,7 @@ def operation_with_json_param(self, json: Any, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -350,7 +349,7 @@ def operation_with_url( :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -404,7 +403,7 @@ def reserved_enum(self, *, enum_parameter: str, **kwargs: Any) -> JSON: :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_client.py index 865dd805c04..f6b5375eaed 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_client.py @@ -19,7 +19,6 @@ from ._serialization import Deserializer, Serializer if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_configuration.py index 4acd6b7cf60..4b4746f4a94 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_configuration.py @@ -13,11 +13,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityAad. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_operations/_operations.py index eb24b9c8660..f0f041ecb9e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_vendor.py index 307a2440f73..4bac3abea25 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityAadConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_client.py index 0ca9f977256..8d7178ca4eb 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_client.py @@ -19,7 +19,6 @@ from ._operations import AutorestSecurityAadOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_configuration.py index 854e5f77399..3e146cc669c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_configuration.py @@ -13,11 +13,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityAadConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityAad. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_operations/_operations.py index 4eaaa16a692..c1ad1bc2455 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class AutorestSecurityAadOperationsMixin(AutorestSecurityAadMixinABC): @distributed_trace_async - async def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head(self, **kwargs: Any) -> None: """Operation. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_vendor.py index 8e6e310bac2..3b07efefdc0 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityAadConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_configuration.py index 7f96e9d6302..a0e36b755ff 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityKey. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_operations/_operations.py index 088233139d2..667ae03989d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_vendor.py index 9fb96a324c5..d615edd04da 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityKeyConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_configuration.py index e1106014afb..be30d74d10e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutorestSecurityKeyConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutorestSecurityKey. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_operations/_operations.py index 44db214842c..0db98da5583 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class AutorestSecurityKeyOperationsMixin(AutorestSecurityKeyMixinABC): @distributed_trace_async - async def head(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def head(self, **kwargs: Any) -> None: """Operation. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_vendor.py index 7b331844629..cf209892619 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutorestSecurityKeyConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/_client.py index ebd77ecdcd5..3f2bb43b03c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/_client.py @@ -19,7 +19,7 @@ from .operations import QueriesOperations -class AutoRestUrlMutliCollectionFormatTestService: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestUrlMutliCollectionFormatTestService: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar queries: QueriesOperations operations diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/aio/_client.py index a7264d83797..d04f5a2cf5c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/aio/_client.py @@ -19,7 +19,7 @@ from .operations import QueriesOperations -class AutoRestUrlMutliCollectionFormatTestService: # pylint: disable=client-accepts-api-version-keyword,name-too-long +class AutoRestUrlMutliCollectionFormatTestService: # pylint: disable=client-accepts-api-version-keyword """Test Infrastructure for AutoRest. :ivar queries: QueriesOperations operations diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/aio/operations/_operations.py index b15656dbde9..52b6e0edc5a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,9 +52,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def array_string_multi_null( # pylint: disable=inconsistent-return-statements - self, *, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_multi_null(self, *, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get a null array of string using the multi-array format. :keyword array_query: a null array of string using the multi-array format. Default value is @@ -65,7 +62,7 @@ async def array_string_multi_null( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -100,9 +97,7 @@ async def array_string_multi_null( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_multi_empty( # pylint: disable=inconsistent-return-statements - self, *, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_multi_empty(self, *, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an empty array [] of string using the multi-array format. :keyword array_query: an empty array [] of string using the multi-array format. Default value @@ -112,7 +107,7 @@ async def array_string_multi_empty( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -147,9 +142,7 @@ async def array_string_multi_empty( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_multi_valid( # pylint: disable=inconsistent-return-statements - self, *, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_multi_valid(self, *, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the mult-array format. @@ -160,7 +153,7 @@ async def array_string_multi_valid( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/operations/_operations.py index 4cc9938b120..c4cae9895d0 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/urlmulticollectionformatversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -134,7 +133,7 @@ def array_string_multi_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +180,7 @@ def array_string_multi_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -229,7 +228,7 @@ def array_string_multi_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/_configuration.py index 5fe83d5fb83..851a054b79a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestUrlTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestUrlTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestUrlTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/aio/_configuration.py index 330484d01ce..2aa7e05c074 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestUrlTestServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestUrlTestServiceConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestUrlTestService. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/aio/operations/_operations.py index b4275253f05..4405679ef46 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -95,7 +95,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -118,14 +118,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_boolean_true(self, **kwargs: Any) -> None: """Get true Boolean value on path. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,14 +161,14 @@ async def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inco return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_boolean_false(self, **kwargs: Any) -> None: """Get false Boolean value on path. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,14 +204,14 @@ async def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inc return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_int_one_million(self, **kwargs: Any) -> None: """Get '1000000' integer value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -247,16 +247,14 @@ async def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=i return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_int_negative_one_million( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_int_negative_one_million(self, **kwargs: Any) -> None: """Get '-1000000' integer value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -292,14 +290,14 @@ async def get_int_negative_one_million( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_ten_billion(self, **kwargs: Any) -> None: """Get '10000000000' 64 bit integer value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -335,14 +333,14 @@ async def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=incon return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_negative_ten_billion(self, **kwargs: Any) -> None: """Get '-10000000000' 64 bit integer value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -378,14 +376,14 @@ async def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def float_scientific_positive(self, **kwargs: Any) -> None: """Get '1.034E+20' numeric value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -421,14 +419,14 @@ async def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def float_scientific_negative(self, **kwargs: Any) -> None: """Get '-1.034E-20' numeric value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -464,14 +462,14 @@ async def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def double_decimal_positive(self, **kwargs: Any) -> None: """Get '9999999.999' numeric value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -507,14 +505,14 @@ async def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def double_decimal_negative(self, **kwargs: Any) -> None: """Get '-9999999.999' numeric value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -550,14 +548,14 @@ async def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_unicode(self, **kwargs: Any) -> None: """Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -593,14 +591,14 @@ async def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=incons return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_url_encoded(self, **kwargs: Any) -> None: """Get 'begin!*'();:@ &=+$,/?#[]end. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -636,7 +634,7 @@ async def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=in return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_url_non_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_url_non_encoded(self, **kwargs: Any) -> None: """Get 'begin!*'();:@&=+$,end. https://tools.ietf.org/html/rfc3986#appendix-A 'path' accept any 'pchar' not encoded. @@ -645,7 +643,7 @@ async def string_url_non_encoded(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -681,14 +679,14 @@ async def string_url_non_encoded(self, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_empty(self, **kwargs: Any) -> None: """Get ''. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -724,9 +722,7 @@ async def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_null( # pylint: disable=inconsistent-return-statements - self, string_path: str, **kwargs: Any - ) -> None: + async def string_null(self, string_path: str, **kwargs: Any) -> None: """Get null (should throw). :param string_path: null string value. Required. @@ -735,7 +731,7 @@ async def string_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -770,7 +766,7 @@ async def string_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def enum_valid(self, enum_path: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def enum_valid(self, enum_path: str, **kwargs: Any) -> None: """Get using uri with 'green color' in path parameter. :param enum_path: send the value green. Known values are: "red color", "green color", and "blue @@ -780,7 +776,7 @@ async def enum_valid(self, enum_path: str, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -815,7 +811,7 @@ async def enum_valid(self, enum_path: str, **kwargs: Any) -> None: # pylint: di return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def enum_null(self, enum_path: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def enum_null(self, enum_path: str, **kwargs: Any) -> None: """Get null (should throw on the client before the request is sent on wire). :param enum_path: send null should throw. Known values are: "red color", "green color", and @@ -825,7 +821,7 @@ async def enum_null(self, enum_path: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -860,9 +856,7 @@ async def enum_null(self, enum_path: str, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_multi_byte( # pylint: disable=inconsistent-return-statements - self, byte_path: bytes, **kwargs: Any - ) -> None: + async def byte_multi_byte(self, byte_path: bytes, **kwargs: Any) -> None: """Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array. :param byte_path: '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array. Required. @@ -871,7 +865,7 @@ async def byte_multi_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -906,14 +900,14 @@ async def byte_multi_byte( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def byte_empty(self, **kwargs: Any) -> None: """Get '' as byte array. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -949,9 +943,7 @@ async def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_null( # pylint: disable=inconsistent-return-statements - self, byte_path: bytes, **kwargs: Any - ) -> None: + async def byte_null(self, byte_path: bytes, **kwargs: Any) -> None: """Get null as byte array (should throw). :param byte_path: null as byte array (should throw). Required. @@ -960,7 +952,7 @@ async def byte_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,14 +987,14 @@ async def byte_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def date_valid(self, **kwargs: Any) -> None: """Get '2012-01-01' as date. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1038,9 +1030,7 @@ async def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_null( # pylint: disable=inconsistent-return-statements - self, date_path: datetime.date, **kwargs: Any - ) -> None: + async def date_null(self, date_path: datetime.date, **kwargs: Any) -> None: """Get null as date - this should throw or be unusable on the client side, depending on date representation. @@ -1050,7 +1040,7 @@ async def date_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1085,14 +1075,14 @@ async def date_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def date_time_valid(self, **kwargs: Any) -> None: """Get '2012-01-01T01:01:01Z' as date-time. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1128,9 +1118,7 @@ async def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=incon return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_time_null( # pylint: disable=inconsistent-return-statements - self, date_time_path: datetime.datetime, **kwargs: Any - ) -> None: + async def date_time_null(self, date_time_path: datetime.datetime, **kwargs: Any) -> None: """Get null as date-time, should be disallowed or throw depending on representation of date-time. :param date_time_path: null as date-time. Required. @@ -1139,7 +1127,7 @@ async def date_time_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1174,9 +1162,7 @@ async def date_time_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def base64_url( # pylint: disable=inconsistent-return-statements - self, base64_url_path: bytes, **kwargs: Any - ) -> None: + async def base64_url(self, base64_url_path: bytes, **kwargs: Any) -> None: """Get 'lorem' encoded value as 'bG9yZW0' (base64url). :param base64_url_path: base64url encoded value. Required. @@ -1185,7 +1171,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1220,9 +1206,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_csv_in_path( # pylint: disable=inconsistent-return-statements - self, array_path: List[str], **kwargs: Any - ) -> None: + async def array_csv_in_path(self, array_path: List[str], **kwargs: Any) -> None: """Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format. @@ -1233,7 +1217,7 @@ async def array_csv_in_path( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1268,9 +1252,7 @@ async def array_csv_in_path( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def unix_time_url( # pylint: disable=inconsistent-return-statements - self, unix_time_url_path: datetime.datetime, **kwargs: Any - ) -> None: + async def unix_time_url(self, unix_time_url_path: datetime.datetime, **kwargs: Any) -> None: """Get the date 2016-04-13 encoded value as '1460505600' (Unix time). :param unix_time_url_path: Unix time encoded value. Required. @@ -1279,7 +1261,7 @@ async def unix_time_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1332,14 +1314,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_boolean_true(self, **kwargs: Any) -> None: """Get true Boolean value on path. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1375,14 +1357,14 @@ async def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inco return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_boolean_false(self, **kwargs: Any) -> None: """Get false Boolean value on path. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1418,9 +1400,7 @@ async def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inc return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_boolean_null( # pylint: disable=inconsistent-return-statements - self, *, bool_query: Optional[bool] = None, **kwargs: Any - ) -> None: + async def get_boolean_null(self, *, bool_query: Optional[bool] = None, **kwargs: Any) -> None: """Get null Boolean value on query (query string should be absent). :keyword bool_query: null boolean value. Default value is None. @@ -1429,7 +1409,7 @@ async def get_boolean_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1464,14 +1444,14 @@ async def get_boolean_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_int_one_million(self, **kwargs: Any) -> None: """Get '1000000' integer value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1507,16 +1487,14 @@ async def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=i return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_int_negative_one_million( # pylint: disable=inconsistent-return-statements - self, **kwargs: Any - ) -> None: + async def get_int_negative_one_million(self, **kwargs: Any) -> None: """Get '-1000000' integer value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1552,9 +1530,7 @@ async def get_int_negative_one_million( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_int_null( # pylint: disable=inconsistent-return-statements - self, *, int_query: Optional[int] = None, **kwargs: Any - ) -> None: + async def get_int_null(self, *, int_query: Optional[int] = None, **kwargs: Any) -> None: """Get null integer value (no query parameter). :keyword int_query: null integer value. Default value is None. @@ -1563,7 +1539,7 @@ async def get_int_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1598,14 +1574,14 @@ async def get_int_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_ten_billion(self, **kwargs: Any) -> None: """Get '10000000000' 64 bit integer value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1641,14 +1617,14 @@ async def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=incon return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_negative_ten_billion(self, **kwargs: Any) -> None: """Get '-10000000000' 64 bit integer value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1684,9 +1660,7 @@ async def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_long_null( # pylint: disable=inconsistent-return-statements - self, *, long_query: Optional[int] = None, **kwargs: Any - ) -> None: + async def get_long_null(self, *, long_query: Optional[int] = None, **kwargs: Any) -> None: """Get 'null 64 bit integer value (no query param in uri). :keyword long_query: null 64 bit integer value. Default value is None. @@ -1695,7 +1669,7 @@ async def get_long_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1730,14 +1704,14 @@ async def get_long_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def float_scientific_positive(self, **kwargs: Any) -> None: """Get '1.034E+20' numeric value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1773,14 +1747,14 @@ async def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def float_scientific_negative(self, **kwargs: Any) -> None: """Get '-1.034E-20' numeric value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1816,9 +1790,7 @@ async def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_null( # pylint: disable=inconsistent-return-statements - self, *, float_query: Optional[float] = None, **kwargs: Any - ) -> None: + async def float_null(self, *, float_query: Optional[float] = None, **kwargs: Any) -> None: """Get null numeric value (no query parameter). :keyword float_query: null numeric value. Default value is None. @@ -1827,7 +1799,7 @@ async def float_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1862,14 +1834,14 @@ async def float_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def double_decimal_positive(self, **kwargs: Any) -> None: """Get '9999999.999' numeric value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1905,14 +1877,14 @@ async def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def double_decimal_negative(self, **kwargs: Any) -> None: """Get '-9999999.999' numeric value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1948,9 +1920,7 @@ async def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def double_null( # pylint: disable=inconsistent-return-statements - self, *, double_query: Optional[float] = None, **kwargs: Any - ) -> None: + async def double_null(self, *, double_query: Optional[float] = None, **kwargs: Any) -> None: """Get null numeric value (no query parameter). :keyword double_query: null numeric value. Default value is None. @@ -1959,7 +1929,7 @@ async def double_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1994,14 +1964,14 @@ async def double_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_unicode(self, **kwargs: Any) -> None: """Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2039,14 +2009,14 @@ async def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=incons return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_url_encoded(self, **kwargs: Any) -> None: """Get 'begin!*'();:@ &=+$,/?#[]end. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2084,14 +2054,14 @@ async def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=in return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def string_empty(self, **kwargs: Any) -> None: """Get ''. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2127,9 +2097,7 @@ async def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def string_null( # pylint: disable=inconsistent-return-statements - self, *, string_query: Optional[str] = None, **kwargs: Any - ) -> None: + async def string_null(self, *, string_query: Optional[str] = None, **kwargs: Any) -> None: """Get null (no query parameter in url). :keyword string_query: null string value. Default value is None. @@ -2138,7 +2106,7 @@ async def string_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2173,9 +2141,7 @@ async def string_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def enum_valid( # pylint: disable=inconsistent-return-statements - self, *, enum_query: Optional[str] = None, **kwargs: Any - ) -> None: + async def enum_valid(self, *, enum_query: Optional[str] = None, **kwargs: Any) -> None: """Get using uri with query parameter 'green color'. :keyword enum_query: 'green color' enum value. Known values are: "red color", "green color", @@ -2185,7 +2151,7 @@ async def enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2220,9 +2186,7 @@ async def enum_valid( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def enum_null( # pylint: disable=inconsistent-return-statements - self, *, enum_query: Optional[str] = None, **kwargs: Any - ) -> None: + async def enum_null(self, *, enum_query: Optional[str] = None, **kwargs: Any) -> None: """Get null (no query parameter in url). :keyword enum_query: null string value. Known values are: "red color", "green color", and "blue @@ -2232,7 +2196,7 @@ async def enum_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2267,9 +2231,7 @@ async def enum_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_multi_byte( # pylint: disable=inconsistent-return-statements - self, *, byte_query: Optional[bytes] = None, **kwargs: Any - ) -> None: + async def byte_multi_byte(self, *, byte_query: Optional[bytes] = None, **kwargs: Any) -> None: """Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array. :keyword byte_query: '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array. Default value is @@ -2279,7 +2241,7 @@ async def byte_multi_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2314,14 +2276,14 @@ async def byte_multi_byte( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def byte_empty(self, **kwargs: Any) -> None: """Get '' as byte array. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2357,9 +2319,7 @@ async def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def byte_null( # pylint: disable=inconsistent-return-statements - self, *, byte_query: Optional[bytes] = None, **kwargs: Any - ) -> None: + async def byte_null(self, *, byte_query: Optional[bytes] = None, **kwargs: Any) -> None: """Get null as byte array (no query parameters in uri). :keyword byte_query: null as byte array (no query parameters in uri). Default value is None. @@ -2368,7 +2328,7 @@ async def byte_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2403,14 +2363,14 @@ async def byte_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def date_valid(self, **kwargs: Any) -> None: """Get '2012-01-01' as date. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2446,9 +2406,7 @@ async def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_null( # pylint: disable=inconsistent-return-statements - self, *, date_query: Optional[datetime.date] = None, **kwargs: Any - ) -> None: + async def date_null(self, *, date_query: Optional[datetime.date] = None, **kwargs: Any) -> None: """Get null as date - this should result in no query parameters in uri. :keyword date_query: null as date (no query parameters in uri). Default value is None. @@ -2457,7 +2415,7 @@ async def date_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2492,14 +2450,14 @@ async def date_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def date_time_valid(self, **kwargs: Any) -> None: """Get '2012-01-01T01:01:01Z' as date-time. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2537,9 +2495,7 @@ async def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=incon return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def date_time_null( # pylint: disable=inconsistent-return-statements - self, *, date_time_query: Optional[datetime.datetime] = None, **kwargs: Any - ) -> None: + async def date_time_null(self, *, date_time_query: Optional[datetime.datetime] = None, **kwargs: Any) -> None: """Get null as date-time, should result in no query parameters in uri. :keyword date_time_query: null as date-time (no query parameters). Default value is None. @@ -2548,7 +2504,7 @@ async def date_time_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2583,9 +2539,7 @@ async def date_time_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_csv_valid( # pylint: disable=inconsistent-return-statements - self, *, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_csv_valid(self, *, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format. @@ -2596,7 +2550,7 @@ async def array_string_csv_valid( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2631,9 +2585,7 @@ async def array_string_csv_valid( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_csv_null( # pylint: disable=inconsistent-return-statements - self, *, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_csv_null(self, *, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get a null array of string using the csv-array format. :keyword array_query: a null array of string using the csv-array format. Default value is None. @@ -2642,7 +2594,7 @@ async def array_string_csv_null( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2677,9 +2629,7 @@ async def array_string_csv_null( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_csv_empty( # pylint: disable=inconsistent-return-statements - self, *, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_csv_empty(self, *, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an empty array [] of string using the csv-array format. :keyword array_query: an empty array [] of string using the csv-array format. Default value is @@ -2689,7 +2639,7 @@ async def array_string_csv_empty( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2724,7 +2674,7 @@ async def array_string_csv_empty( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_no_collection_format_empty( # pylint: disable=inconsistent-return-statements + async def array_string_no_collection_format_empty( self, *, array_query: Optional[List[str]] = None, **kwargs: Any ) -> None: """Array query has no defined collection format, should default to csv. Pass in ['hello', 'nihao', @@ -2737,7 +2687,7 @@ async def array_string_no_collection_format_empty( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2772,9 +2722,7 @@ async def array_string_no_collection_format_empty( # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_ssv_valid( # pylint: disable=inconsistent-return-statements - self, *, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_ssv_valid(self, *, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the ssv-array format. @@ -2785,7 +2733,7 @@ async def array_string_ssv_valid( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2820,9 +2768,7 @@ async def array_string_ssv_valid( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_tsv_valid( # pylint: disable=inconsistent-return-statements - self, *, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_tsv_valid(self, *, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the tsv-array format. @@ -2833,7 +2779,7 @@ async def array_string_tsv_valid( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2868,9 +2814,7 @@ async def array_string_tsv_valid( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array_string_pipes_valid( # pylint: disable=inconsistent-return-statements - self, *, array_query: Optional[List[str]] = None, **kwargs: Any - ) -> None: + async def array_string_pipes_valid(self, *, array_query: Optional[List[str]] = None, **kwargs: Any) -> None: """Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the pipes-array format. @@ -2881,7 +2825,7 @@ async def array_string_pipes_valid( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2934,7 +2878,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_all_with_values( # pylint: disable=inconsistent-return-statements + async def get_all_with_values( self, path_item_string_path: str, local_string_path: str, @@ -2961,7 +2905,7 @@ async def get_all_with_values( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3001,7 +2945,7 @@ async def get_all_with_values( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_global_query_null( # pylint: disable=inconsistent-return-statements + async def get_global_query_null( self, path_item_string_path: str, local_string_path: str, @@ -3028,7 +2972,7 @@ async def get_global_query_null( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3068,7 +3012,7 @@ async def get_global_query_null( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_global_and_local_query_null( # pylint: disable=inconsistent-return-statements + async def get_global_and_local_query_null( self, path_item_string_path: str, local_string_path: str, @@ -3095,7 +3039,7 @@ async def get_global_and_local_query_null( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3135,7 +3079,7 @@ async def get_global_and_local_query_null( # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_local_path_item_query_null( # pylint: disable=inconsistent-return-statements + async def get_local_path_item_query_null( self, path_item_string_path: str, local_string_path: str, @@ -3161,7 +3105,7 @@ async def get_local_path_item_query_null( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/operations/_operations.py index ef4d533b9a7..7b29c46441a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/urlversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, List, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1436,7 +1436,7 @@ def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1479,7 +1479,7 @@ def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1522,7 +1522,7 @@ def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=inconsi :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1565,7 +1565,7 @@ def get_int_negative_one_million(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1608,7 +1608,7 @@ def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1651,7 +1651,7 @@ def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1694,7 +1694,7 @@ def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1737,7 +1737,7 @@ def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1780,7 +1780,7 @@ def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1823,7 +1823,7 @@ def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1866,7 +1866,7 @@ def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1909,7 +1909,7 @@ def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1954,7 +1954,7 @@ def string_url_non_encoded(self, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1997,7 +1997,7 @@ def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,7 +2042,7 @@ def string_null(self, string_path: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2087,7 +2087,7 @@ def enum_valid(self, enum_path: str, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2132,7 +2132,7 @@ def enum_null(self, enum_path: str, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2178,7 +2178,7 @@ def byte_multi_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2220,7 +2220,7 @@ def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2265,7 +2265,7 @@ def byte_null(self, byte_path: bytes, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2307,7 +2307,7 @@ def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2355,7 +2355,7 @@ def date_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2397,7 +2397,7 @@ def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2444,7 +2444,7 @@ def date_time_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2490,7 +2490,7 @@ def base64_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2538,7 +2538,7 @@ def array_csv_in_path( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2584,7 +2584,7 @@ def unix_time_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2644,7 +2644,7 @@ def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2687,7 +2687,7 @@ def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2734,7 +2734,7 @@ def get_boolean_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2776,7 +2776,7 @@ def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=inconsi :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2819,7 +2819,7 @@ def get_int_negative_one_million(self, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2866,7 +2866,7 @@ def get_int_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2908,7 +2908,7 @@ def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2951,7 +2951,7 @@ def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2998,7 +2998,7 @@ def get_long_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3040,7 +3040,7 @@ def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3083,7 +3083,7 @@ def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3130,7 +3130,7 @@ def float_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3172,7 +3172,7 @@ def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3215,7 +3215,7 @@ def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3262,7 +3262,7 @@ def double_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3304,7 +3304,7 @@ def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3349,7 +3349,7 @@ def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3394,7 +3394,7 @@ def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3441,7 +3441,7 @@ def string_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3488,7 +3488,7 @@ def enum_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3535,7 +3535,7 @@ def enum_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3582,7 +3582,7 @@ def byte_multi_byte( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3624,7 +3624,7 @@ def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3671,7 +3671,7 @@ def byte_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3713,7 +3713,7 @@ def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3760,7 +3760,7 @@ def date_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3802,7 +3802,7 @@ def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3851,7 +3851,7 @@ def date_time_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3899,7 +3899,7 @@ def array_string_csv_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3945,7 +3945,7 @@ def array_string_csv_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3992,7 +3992,7 @@ def array_string_csv_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4040,7 +4040,7 @@ def array_string_no_collection_format_empty( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4088,7 +4088,7 @@ def array_string_ssv_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4136,7 +4136,7 @@ def array_string_tsv_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4184,7 +4184,7 @@ def array_string_pipes_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4264,7 +4264,7 @@ def get_all_with_values( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4331,7 +4331,7 @@ def get_global_query_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4398,7 +4398,7 @@ def get_global_and_local_query_null( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4464,7 +4464,7 @@ def get_local_path_item_query_null( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_client.py index 545c0cdeb65..aa35473020b 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_client.py @@ -19,9 +19,7 @@ from ._serialization import Deserializer, Serializer -class AutoRestValidationTest( - AutoRestValidationTestOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class AutoRestValidationTest(AutoRestValidationTestOperationsMixin): """Test Infrastructure for AutoRest. No server backend exists for these tests. :param subscription_id: Subscription ID. Required. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_configuration.py index 9aabe906e80..1add1aba060 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AutoRestValidationTestConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestValidationTestConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestValidationTest. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_operations/_operations.py index a79673ba353..da2abe677c8 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -179,7 +178,7 @@ def validation_of_method_parameters(self, resource_group_name: str, id: int, **k "image": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -403,7 +402,7 @@ def validation_of_body( "image": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -470,7 +469,7 @@ def get_with_constant_in_path(self, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -656,7 +655,7 @@ def post_with_constant_in_body(self, body: Optional[Union[JSON, IO[bytes]]] = No "image": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_vendor.py index b4e453fcea6..9bbcf1c713e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestValidationTestConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_client.py index 9c1610f5300..fe99d83b2d9 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_client.py @@ -19,9 +19,7 @@ from ._operations import AutoRestValidationTestOperationsMixin -class AutoRestValidationTest( - AutoRestValidationTestOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class AutoRestValidationTest(AutoRestValidationTestOperationsMixin): """Test Infrastructure for AutoRest. No server backend exists for these tests. :param subscription_id: Subscription ID. Required. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_configuration.py index 76419c45e03..6e21549ae9c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AutoRestValidationTestConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AutoRestValidationTestConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AutoRestValidationTest. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_operations/_operations.py index 581f4549036..f4a6c20637e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -78,7 +77,7 @@ async def validation_of_method_parameters(self, resource_group_name: str, id: in "image": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -302,7 +301,7 @@ async def validation_of_body( "image": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -362,14 +361,14 @@ async def validation_of_body( return cast(JSON, deserialized) # type: ignore @distributed_trace_async - async def get_with_constant_in_path(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_with_constant_in_path(self, **kwargs: Any) -> None: """get_with_constant_in_path. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -555,7 +554,7 @@ async def post_with_constant_in_body(self, body: Optional[Union[JSON, IO[bytes]] "image": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_vendor.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_vendor.py index 33f5f6dd792..45c768f1db5 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_vendor.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AutoRestValidationTestConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/aio/operations/_operations.py index 865b360c6a3..946db4a4e55 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -64,7 +64,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -96,7 +96,7 @@ async def get_complex_type_ref_no_meta(self, **kwargs: Any) -> _models.RootWithR :rtype: ~xmlserviceversiontolerant.models.RootWithRefAndNoMeta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,9 +134,7 @@ async def get_complex_type_ref_no_meta(self, **kwargs: Any) -> _models.RootWithR return deserialized # type: ignore @distributed_trace_async - async def put_complex_type_ref_no_meta( # pylint: disable=inconsistent-return-statements - self, model: _models.RootWithRefAndNoMeta, **kwargs: Any - ) -> None: + async def put_complex_type_ref_no_meta(self, model: _models.RootWithRefAndNoMeta, **kwargs: Any) -> None: """Puts a complex type that has a ref to a complex type with no XML node. :param model: Required. @@ -145,7 +143,7 @@ async def put_complex_type_ref_no_meta( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -191,7 +189,7 @@ async def get_complex_type_ref_with_meta(self, **kwargs: Any) -> _models.RootWit :rtype: ~xmlserviceversiontolerant.models.RootWithRefAndMeta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -229,9 +227,7 @@ async def get_complex_type_ref_with_meta(self, **kwargs: Any) -> _models.RootWit return deserialized # type: ignore @distributed_trace_async - async def put_complex_type_ref_with_meta( # pylint: disable=inconsistent-return-statements - self, model: _models.RootWithRefAndMeta, **kwargs: Any - ) -> None: + async def put_complex_type_ref_with_meta(self, model: _models.RootWithRefAndMeta, **kwargs: Any) -> None: """Puts a complex type that has a ref to a complex type with XML node. :param model: Required. @@ -240,7 +236,7 @@ async def put_complex_type_ref_with_meta( # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -286,7 +282,7 @@ async def get_simple(self, **kwargs: Any) -> _models.Slideshow: :rtype: ~xmlserviceversiontolerant.models.Slideshow :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -325,9 +321,7 @@ async def get_simple(self, **kwargs: Any) -> _models.Slideshow: return deserialized # type: ignore @distributed_trace_async - async def put_simple( # pylint: disable=inconsistent-return-statements - self, slideshow: _models.Slideshow, **kwargs: Any - ) -> None: + async def put_simple(self, slideshow: _models.Slideshow, **kwargs: Any) -> None: """Put a simple XML document. :param slideshow: Required. @@ -336,7 +330,7 @@ async def put_simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -383,7 +377,7 @@ async def get_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: :rtype: ~xmlserviceversiontolerant.models.AppleBarrel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -421,9 +415,7 @@ async def get_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: return deserialized # type: ignore @distributed_trace_async - async def put_wrapped_lists( # pylint: disable=inconsistent-return-statements - self, wrapped_lists: _models.AppleBarrel, **kwargs: Any - ) -> None: + async def put_wrapped_lists(self, wrapped_lists: _models.AppleBarrel, **kwargs: Any) -> None: """Put an XML document with multiple wrapped lists. :param wrapped_lists: Required. @@ -432,7 +424,7 @@ async def put_wrapped_lists( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -472,14 +464,14 @@ async def put_wrapped_lists( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_headers(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get_headers(self, **kwargs: Any) -> None: """Get strongly-typed response headers. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -523,7 +515,7 @@ async def get_empty_list(self, **kwargs: Any) -> _models.Slideshow: :rtype: ~xmlserviceversiontolerant.models.Slideshow :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -561,9 +553,7 @@ async def get_empty_list(self, **kwargs: Any) -> _models.Slideshow: return deserialized # type: ignore @distributed_trace_async - async def put_empty_list( # pylint: disable=inconsistent-return-statements - self, slideshow: _models.Slideshow, **kwargs: Any - ) -> None: + async def put_empty_list(self, slideshow: _models.Slideshow, **kwargs: Any) -> None: """Puts an empty list. :param slideshow: Required. @@ -572,7 +562,7 @@ async def put_empty_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -618,7 +608,7 @@ async def get_empty_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: :rtype: ~xmlserviceversiontolerant.models.AppleBarrel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -656,9 +646,7 @@ async def get_empty_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: return deserialized # type: ignore @distributed_trace_async - async def put_empty_wrapped_lists( # pylint: disable=inconsistent-return-statements - self, apple_barrel: _models.AppleBarrel, **kwargs: Any - ) -> None: + async def put_empty_wrapped_lists(self, apple_barrel: _models.AppleBarrel, **kwargs: Any) -> None: """Puts some empty wrapped lists. :param apple_barrel: Required. @@ -667,7 +655,7 @@ async def put_empty_wrapped_lists( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -713,7 +701,7 @@ async def get_root_list(self, **kwargs: Any) -> List[_models.Banana]: :rtype: ~xmlserviceversiontolerant.models.Banana :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -751,9 +739,7 @@ async def get_root_list(self, **kwargs: Any) -> List[_models.Banana]: return deserialized # type: ignore @distributed_trace_async - async def put_root_list( # pylint: disable=inconsistent-return-statements - self, bananas: List[_models.Banana], **kwargs: Any - ) -> None: + async def put_root_list(self, bananas: List[_models.Banana], **kwargs: Any) -> None: """Puts a list as the root element. :param bananas: Required. @@ -762,7 +748,7 @@ async def put_root_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -809,7 +795,7 @@ async def get_root_list_single_item(self, **kwargs: Any) -> List[_models.Banana] :rtype: ~xmlserviceversiontolerant.models.Banana :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -847,9 +833,7 @@ async def get_root_list_single_item(self, **kwargs: Any) -> List[_models.Banana] return deserialized # type: ignore @distributed_trace_async - async def put_root_list_single_item( # pylint: disable=inconsistent-return-statements - self, bananas: List[_models.Banana], **kwargs: Any - ) -> None: + async def put_root_list_single_item(self, bananas: List[_models.Banana], **kwargs: Any) -> None: """Puts a list with a single item. :param bananas: Required. @@ -858,7 +842,7 @@ async def put_root_list_single_item( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -905,7 +889,7 @@ async def get_empty_root_list(self, **kwargs: Any) -> List[_models.Banana]: :rtype: ~xmlserviceversiontolerant.models.Banana :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -943,9 +927,7 @@ async def get_empty_root_list(self, **kwargs: Any) -> List[_models.Banana]: return deserialized # type: ignore @distributed_trace_async - async def put_empty_root_list( # pylint: disable=inconsistent-return-statements - self, bananas: List[_models.Banana], **kwargs: Any - ) -> None: + async def put_empty_root_list(self, bananas: List[_models.Banana], **kwargs: Any) -> None: """Puts an empty list as the root element. :param bananas: Required. @@ -954,7 +936,7 @@ async def put_empty_root_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1001,7 +983,7 @@ async def get_empty_child_element(self, **kwargs: Any) -> _models.Banana: :rtype: ~xmlserviceversiontolerant.models.Banana :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1039,9 +1021,7 @@ async def get_empty_child_element(self, **kwargs: Any) -> _models.Banana: return deserialized # type: ignore @distributed_trace_async - async def put_empty_child_element( # pylint: disable=inconsistent-return-statements - self, banana: _models.Banana, **kwargs: Any - ) -> None: + async def put_empty_child_element(self, banana: _models.Banana, **kwargs: Any) -> None: """Puts a value with an empty child element. :param banana: Required. @@ -1050,7 +1030,7 @@ async def put_empty_child_element( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1096,7 +1076,7 @@ async def list_containers(self, **kwargs: Any) -> _models.ListContainersResponse :rtype: ~xmlserviceversiontolerant.models.ListContainersResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1143,7 +1123,7 @@ async def get_service_properties(self, **kwargs: Any) -> _models.StorageServiceP :rtype: ~xmlserviceversiontolerant.models.StorageServiceProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1185,9 +1165,7 @@ async def get_service_properties(self, **kwargs: Any) -> _models.StorageServiceP return deserialized # type: ignore @distributed_trace_async - async def put_service_properties( # pylint: disable=inconsistent-return-statements - self, properties: _models.StorageServiceProperties, **kwargs: Any - ) -> None: + async def put_service_properties(self, properties: _models.StorageServiceProperties, **kwargs: Any) -> None: """Puts storage service properties. :param properties: Required. @@ -1196,7 +1174,7 @@ async def put_service_properties( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1246,7 +1224,7 @@ async def get_acls(self, **kwargs: Any) -> List[_models.SignedIdentifier]: :rtype: ~xmlserviceversiontolerant.models.SignedIdentifier :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1288,9 +1266,7 @@ async def get_acls(self, **kwargs: Any) -> List[_models.SignedIdentifier]: return deserialized # type: ignore @distributed_trace_async - async def put_acls( # pylint: disable=inconsistent-return-statements - self, properties: List[_models.SignedIdentifier], **kwargs: Any - ) -> None: + async def put_acls(self, properties: List[_models.SignedIdentifier], **kwargs: Any) -> None: """Puts storage ACLs for a container. :param properties: Required. @@ -1299,7 +1275,7 @@ async def put_acls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1352,7 +1328,7 @@ async def list_blobs(self, **kwargs: Any) -> _models.ListBlobsResponse: :rtype: ~xmlserviceversiontolerant.models.ListBlobsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1394,7 +1370,7 @@ async def list_blobs(self, **kwargs: Any) -> _models.ListBlobsResponse: return deserialized # type: ignore @overload - async def json_input( # pylint: disable=inconsistent-return-statements + async def json_input( self, properties: _models.JSONInput, *, content_type: str = "application/json", **kwargs: Any ) -> None: """A Swagger with XML that has one operation that takes JSON as input. You need to send the ID @@ -1411,9 +1387,7 @@ async def json_input( # pylint: disable=inconsistent-return-statements """ @overload - async def json_input( # pylint: disable=inconsistent-return-statements - self, properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def json_input(self, properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """A Swagger with XML that has one operation that takes JSON as input. You need to send the ID number 42. @@ -1428,9 +1402,7 @@ async def json_input( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def json_input( # pylint: disable=inconsistent-return-statements - self, properties: Union[_models.JSONInput, IO[bytes]], **kwargs: Any - ) -> None: + async def json_input(self, properties: Union[_models.JSONInput, IO[bytes]], **kwargs: Any) -> None: """A Swagger with XML that has one operation that takes JSON as input. You need to send the ID number 42. @@ -1440,7 +1412,7 @@ async def json_input( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1493,7 +1465,7 @@ async def json_output(self, **kwargs: Any) -> _models.JSONOutput: :rtype: ~xmlserviceversiontolerant.models.JSONOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1539,7 +1511,7 @@ async def get_xms_text(self, **kwargs: Any) -> _models.ObjectWithXMsTextProperty :rtype: ~xmlserviceversiontolerant.models.ObjectWithXMsTextProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1584,7 +1556,7 @@ async def get_bytes(self, **kwargs: Any) -> _models.ModelWithByteProperty: :rtype: ~xmlserviceversiontolerant.models.ModelWithByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1623,9 +1595,7 @@ async def get_bytes(self, **kwargs: Any) -> _models.ModelWithByteProperty: return deserialized # type: ignore @distributed_trace_async - async def put_binary( # pylint: disable=inconsistent-return-statements - self, slideshow: _models.ModelWithByteProperty, **kwargs: Any - ) -> None: + async def put_binary(self, slideshow: _models.ModelWithByteProperty, **kwargs: Any) -> None: """Put an XML document with binary property. :param slideshow: Required. @@ -1634,7 +1604,7 @@ async def put_binary( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1681,7 +1651,7 @@ async def get_uri(self, **kwargs: Any) -> _models.ModelWithUrlProperty: :rtype: ~xmlserviceversiontolerant.models.ModelWithUrlProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1720,9 +1690,7 @@ async def get_uri(self, **kwargs: Any) -> _models.ModelWithUrlProperty: return deserialized # type: ignore @distributed_trace_async - async def put_uri( # pylint: disable=inconsistent-return-statements - self, model: _models.ModelWithUrlProperty, **kwargs: Any - ) -> None: + async def put_uri(self, model: _models.ModelWithUrlProperty, **kwargs: Any) -> None: """Put an XML document with uri property. :param model: Required. @@ -1731,7 +1699,7 @@ async def put_uri( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/models/_models.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/models/_models.py index a52a27d5007..d4d28301472 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/models/_models.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/models/_models.py @@ -1,5 +1,5 @@ -# coding=utf-8 # pylint: disable=too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +13,6 @@ from .. import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/operations/_operations.py index 89dfd2dd168..aaac1e2b9d9 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -595,7 +595,7 @@ def get_complex_type_ref_no_meta(self, **kwargs: Any) -> _models.RootWithRefAndN :rtype: ~xmlserviceversiontolerant.models.RootWithRefAndNoMeta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -644,7 +644,7 @@ def put_complex_type_ref_no_meta( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -690,7 +690,7 @@ def get_complex_type_ref_with_meta(self, **kwargs: Any) -> _models.RootWithRefAn :rtype: ~xmlserviceversiontolerant.models.RootWithRefAndMeta :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -739,7 +739,7 @@ def put_complex_type_ref_with_meta( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ def get_simple(self, **kwargs: Any) -> _models.Slideshow: :rtype: ~xmlserviceversiontolerant.models.Slideshow :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -835,7 +835,7 @@ def put_simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -882,7 +882,7 @@ def get_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: :rtype: ~xmlserviceversiontolerant.models.AppleBarrel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -931,7 +931,7 @@ def put_wrapped_lists( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -978,7 +978,7 @@ def get_headers(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1022,7 +1022,7 @@ def get_empty_list(self, **kwargs: Any) -> _models.Slideshow: :rtype: ~xmlserviceversiontolerant.models.Slideshow :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1071,7 +1071,7 @@ def put_empty_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1117,7 +1117,7 @@ def get_empty_wrapped_lists(self, **kwargs: Any) -> _models.AppleBarrel: :rtype: ~xmlserviceversiontolerant.models.AppleBarrel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1166,7 +1166,7 @@ def put_empty_wrapped_lists( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1212,7 +1212,7 @@ def get_root_list(self, **kwargs: Any) -> List[_models.Banana]: :rtype: ~xmlserviceversiontolerant.models.Banana :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1261,7 +1261,7 @@ def put_root_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1308,7 +1308,7 @@ def get_root_list_single_item(self, **kwargs: Any) -> List[_models.Banana]: :rtype: ~xmlserviceversiontolerant.models.Banana :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1357,7 +1357,7 @@ def put_root_list_single_item( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1404,7 +1404,7 @@ def get_empty_root_list(self, **kwargs: Any) -> List[_models.Banana]: :rtype: ~xmlserviceversiontolerant.models.Banana :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1453,7 +1453,7 @@ def put_empty_root_list( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1500,7 +1500,7 @@ def get_empty_child_element(self, **kwargs: Any) -> _models.Banana: :rtype: ~xmlserviceversiontolerant.models.Banana :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1549,7 +1549,7 @@ def put_empty_child_element( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1595,7 +1595,7 @@ def list_containers(self, **kwargs: Any) -> _models.ListContainersResponse: :rtype: ~xmlserviceversiontolerant.models.ListContainersResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1642,7 +1642,7 @@ def get_service_properties(self, **kwargs: Any) -> _models.StorageServicePropert :rtype: ~xmlserviceversiontolerant.models.StorageServiceProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1695,7 +1695,7 @@ def put_service_properties( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1745,7 +1745,7 @@ def get_acls(self, **kwargs: Any) -> List[_models.SignedIdentifier]: :rtype: ~xmlserviceversiontolerant.models.SignedIdentifier :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1798,7 +1798,7 @@ def put_acls( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1851,7 +1851,7 @@ def list_blobs(self, **kwargs: Any) -> _models.ListBlobsResponse: :rtype: ~xmlserviceversiontolerant.models.ListBlobsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1893,7 +1893,7 @@ def list_blobs(self, **kwargs: Any) -> _models.ListBlobsResponse: return deserialized # type: ignore @overload - def json_input( # pylint: disable=inconsistent-return-statements + def json_input( self, properties: _models.JSONInput, *, content_type: str = "application/json", **kwargs: Any ) -> None: """A Swagger with XML that has one operation that takes JSON as input. You need to send the ID @@ -1910,9 +1910,7 @@ def json_input( # pylint: disable=inconsistent-return-statements """ @overload - def json_input( # pylint: disable=inconsistent-return-statements - self, properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def json_input(self, properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """A Swagger with XML that has one operation that takes JSON as input. You need to send the ID number 42. @@ -1939,7 +1937,7 @@ def json_input( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1992,7 +1990,7 @@ def json_output(self, **kwargs: Any) -> _models.JSONOutput: :rtype: ~xmlserviceversiontolerant.models.JSONOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2038,7 +2036,7 @@ def get_xms_text(self, **kwargs: Any) -> _models.ObjectWithXMsTextProperty: :rtype: ~xmlserviceversiontolerant.models.ObjectWithXMsTextProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2083,7 +2081,7 @@ def get_bytes(self, **kwargs: Any) -> _models.ModelWithByteProperty: :rtype: ~xmlserviceversiontolerant.models.ModelWithByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2133,7 +2131,7 @@ def put_binary( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2180,7 +2178,7 @@ def get_uri(self, **kwargs: Any) -> _models.ModelWithUrlProperty: :rtype: ~xmlserviceversiontolerant.models.ModelWithUrlProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2230,7 +2228,7 @@ def put_uri( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/_configuration.py index d31a7f937b5..ca2eb8d20a9 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class XMSErrorResponseExtensionsConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class XMSErrorResponseExtensionsConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for XMSErrorResponseExtensions. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/_serialization.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/_serialization.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/aio/_configuration.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/aio/_configuration.py index db7172a74a1..76e6f142c3f 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/aio/_configuration.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class XMSErrorResponseExtensionsConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class XMSErrorResponseExtensionsConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for XMSErrorResponseExtensions. Note that all parameters used to create this instance are saved as instance diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/aio/operations/_operations.py index 396e89bb306..2e8c6d3da1d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -72,7 +71,7 @@ async def get_pet_by_id(self, pet_id: str, **kwargs: Any) -> Optional[JSON]: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 409: ResourceExistsError, 304: ResourceNotModifiedError, @@ -135,7 +134,7 @@ async def do_something(self, what_action: str, **kwargs: Any) -> JSON: "actionResponse": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -178,9 +177,7 @@ async def do_something(self, what_action: str, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @distributed_trace_async - async def has_models_param( # pylint: disable=inconsistent-return-statements - self, *, models: str = "value1", **kwargs: Any - ) -> None: + async def has_models_param(self, *, models: str = "value1", **kwargs: Any) -> None: """Ensure you can correctly deserialize the returned PetActionError and deserialization doesn't conflict with the input param name 'models'. @@ -191,7 +188,7 @@ async def has_models_param( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/operations/_operations.py index 82533d390fb..72fff0f9516 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/xmserrorresponseversiontolerant/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -129,7 +128,7 @@ def get_pet_by_id(self, pet_id: str, **kwargs: Any) -> Optional[JSON]: "name": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 409: ResourceExistsError, 304: ResourceNotModifiedError, @@ -192,7 +191,7 @@ def do_something(self, what_action: str, **kwargs: Any) -> JSON: "actionResponse": "str" } """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -248,7 +247,7 @@ def has_models_param( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_model_base.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_model_base.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_operations/_operations.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_operations/_operations.py index 0f07b55332a..326ccdcc4f7 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -69,7 +68,7 @@ def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -113,7 +112,7 @@ def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_serialization.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_serialization.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_vendor.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_vendor.py index d7b37ac9402..b99f7ccffbc 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_vendor.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ApiKeyClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_operations/_operations.py index b5039ec09e9..c1c1b85fc4f 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -37,14 +36,14 @@ class ApiKeyClientOperationsMixin(ApiKeyClientMixinABC): @distributed_trace_async - async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def valid(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81,14 +80,14 @@ async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def invalid(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_vendor.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_vendor.py index 3d4e81d4d49..4340164b26b 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ApiKeyClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/models/_models.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/models/_models.py index 686832c5e2f..c20f55d6d12 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/models/_models.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_model_base.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_model_base.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_operations/_operations.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_operations/_operations.py index 5466888d598..9e8a461c1c0 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -69,7 +68,7 @@ def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -113,7 +112,7 @@ def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_serialization.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_serialization.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_vendor.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_vendor.py index c9e42590ffc..ca3074f75b4 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_vendor.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import CustomClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_operations/_operations.py index 379ec1d6a91..83c3f3acf3e 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -37,14 +36,14 @@ class CustomClientOperationsMixin(CustomClientMixinABC): @distributed_trace_async - async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def valid(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81,14 +80,14 @@ async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def invalid(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_vendor.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_vendor.py index 15b4ac4542d..c795fc22c5a 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import CustomClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/models/_models.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/models/_models.py index 686832c5e2f..c20f55d6d12 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/models/_models.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_client.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_client.py index daaff7b4b52..8acaa0d5bba 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_client.py @@ -19,7 +19,6 @@ from ._serialization import Deserializer, Serializer if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_configuration.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_configuration.py index 9131989d16a..76bf6f42ba2 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_configuration.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_configuration.py @@ -13,7 +13,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_model_base.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_model_base.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_operations/_operations.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_operations/_operations.py index 40b83cfb210..32e92fbc6fd 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -69,7 +68,7 @@ def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -113,7 +112,7 @@ def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_serialization.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_serialization.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_vendor.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_vendor.py index 4eb993dbd50..18bfe1600c2 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_vendor.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import OAuth2ClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_client.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_client.py index e4becfe1e6e..e41739ecf0b 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_client.py @@ -19,7 +19,6 @@ from ._operations import OAuth2ClientOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_configuration.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_configuration.py index 9191716694b..4960264519b 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_configuration.py @@ -13,7 +13,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_operations/_operations.py index 494c61c6351..c5d01164158 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -37,14 +36,14 @@ class OAuth2ClientOperationsMixin(OAuth2ClientMixinABC): @distributed_trace_async - async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def valid(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81,14 +80,14 @@ async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def invalid(self, **kwargs: Any) -> None: """Check whether client is authenticated. Will return an invalid bearer error. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_vendor.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_vendor.py index daa5b857001..b07a94fefba 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import OAuth2ClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/models/_models.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/models/_models.py index 686832c5e2f..c20f55d6d12 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/models/_models.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_client.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_client.py index dc03e2f9b4c..a561a3c40ba 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_client.py @@ -20,7 +20,6 @@ from ._serialization import Deserializer, Serializer if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_configuration.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_configuration.py index 35fc652bf9f..cf4839cdef1 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_configuration.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_configuration.py @@ -14,7 +14,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_model_base.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_model_base.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_operations/_operations.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_operations/_operations.py index 66e744b69a2..47e6aae425f 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -59,7 +58,7 @@ def valid_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -103,7 +102,7 @@ def valid_token(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_serialization.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_serialization.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_vendor.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_vendor.py index e495bc9fa81..b4a86bb9e91 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_vendor.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import UnionClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_client.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_client.py index df6d8510efe..0a27dd13936 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_client.py @@ -20,7 +20,6 @@ from ._operations import UnionClientOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_configuration.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_configuration.py index 8b689f7854f..c9798c0298b 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_configuration.py @@ -14,7 +14,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_operations/_operations.py index 4df480e846b..6ccd3b393bb 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class UnionClientOperationsMixin(UnionClientMixinABC): @distributed_trace_async - async def valid_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def valid_key(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79,14 +78,14 @@ async def valid_key(self, **kwargs: Any) -> None: # pylint: disable=inconsisten return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def valid_token(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def valid_token(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_vendor.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_vendor.py index 216170e8fb1..0e4af421704 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import UnionClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_model_base.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_serialization.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py index 4a23fdd1964..b86297bfe0c 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -40,7 +39,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -73,7 +72,7 @@ async def no_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.N :rtype: ~specs.azure.clientgenerator.core.access.models.NoDecoratorModelInPublic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -133,7 +132,7 @@ async def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _mode :rtype: ~specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInPublic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -213,7 +212,7 @@ async def _no_decorator_in_internal( # pylint: disable=protected-access :rtype: ~specs.azure.clientgenerator.core.access.models._models.NoDecoratorModelInInternal :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -224,9 +223,7 @@ async def _no_decorator_in_internal( # pylint: disable=protected-access _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models._models.NoDecoratorModelInInternal] = kwargs.pop( # pylint: disable=protected-access - "cls", None - ) + cls: ClsType[_models._models.NoDecoratorModelInInternal] = kwargs.pop("cls", None) _request = build_internal_operation_no_decorator_in_internal_request( name=name, @@ -280,7 +277,7 @@ async def _internal_decorator_in_internal( # pylint: disable=protected-access ~specs.azure.clientgenerator.core.access.models._models.InternalDecoratorModelInInternal :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -291,9 +288,7 @@ async def _internal_decorator_in_internal( # pylint: disable=protected-access _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models._models.InternalDecoratorModelInInternal] = kwargs.pop( # pylint: disable=protected-access - "cls", None - ) + cls: ClsType[_models._models.InternalDecoratorModelInInternal] = kwargs.pop("cls", None) _request = build_internal_operation_internal_decorator_in_internal_request( name=name, @@ -346,7 +341,7 @@ async def _public_decorator_in_internal( :rtype: ~specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInInternal :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -423,7 +418,7 @@ async def public(self, *, name: str, **kwargs: Any) -> _models.SharedModel: :rtype: ~specs.azure.clientgenerator.core.access.models.SharedModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,7 +477,7 @@ async def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel: :rtype: ~specs.azure.clientgenerator.core.access.models.SharedModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -572,7 +567,7 @@ async def _operation( # pylint: disable=protected-access :rtype: ~specs.azure.clientgenerator.core.access.models._models.OuterModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -583,7 +578,7 @@ async def _operation( # pylint: disable=protected-access _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models._models.OuterModel] = kwargs.pop("cls", None) # pylint: disable=protected-access + cls: ClsType[_models._models.OuterModel] = kwargs.pop("cls", None) _request = build_relative_model_in_operation_operation_request( name=name, @@ -641,7 +636,7 @@ async def _discriminator( # pylint: disable=protected-access :rtype: ~specs.azure.clientgenerator.core.access.models._models.AbstractModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -652,7 +647,7 @@ async def _discriminator( # pylint: disable=protected-access _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models._models.AbstractModel] = kwargs.pop("cls", None) # pylint: disable=protected-access + cls: ClsType[_models._models.AbstractModel] = kwargs.pop("cls", None) _request = build_relative_model_in_operation_discriminator_request( kind=kind, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/models/_models.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/models/_models.py index 169cec74f16..1fc5c38cbc1 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_discriminator, rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py index ba93194bd0d..5ddfe337614 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -247,7 +246,7 @@ def no_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.NoDecor :rtype: ~specs.azure.clientgenerator.core.access.models.NoDecoratorModelInPublic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -307,7 +306,7 @@ def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.Pub :rtype: ~specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInPublic :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -387,7 +386,7 @@ def _no_decorator_in_internal( # pylint: disable=protected-access :rtype: ~specs.azure.clientgenerator.core.access.models._models.NoDecoratorModelInInternal :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -398,9 +397,7 @@ def _no_decorator_in_internal( # pylint: disable=protected-access _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models._models.NoDecoratorModelInInternal] = kwargs.pop( # pylint: disable=protected-access - "cls", None - ) + cls: ClsType[_models._models.NoDecoratorModelInInternal] = kwargs.pop("cls", None) _request = build_internal_operation_no_decorator_in_internal_request( name=name, @@ -454,7 +451,7 @@ def _internal_decorator_in_internal( # pylint: disable=protected-access ~specs.azure.clientgenerator.core.access.models._models.InternalDecoratorModelInInternal :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -465,9 +462,7 @@ def _internal_decorator_in_internal( # pylint: disable=protected-access _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models._models.InternalDecoratorModelInInternal] = kwargs.pop( # pylint: disable=protected-access - "cls", None - ) + cls: ClsType[_models._models.InternalDecoratorModelInInternal] = kwargs.pop("cls", None) _request = build_internal_operation_internal_decorator_in_internal_request( name=name, @@ -518,7 +513,7 @@ def _public_decorator_in_internal(self, *, name: str, **kwargs: Any) -> _models. :rtype: ~specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInInternal :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -595,7 +590,7 @@ def public(self, *, name: str, **kwargs: Any) -> _models.SharedModel: :rtype: ~specs.azure.clientgenerator.core.access.models.SharedModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -654,7 +649,7 @@ def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel: :rtype: ~specs.azure.clientgenerator.core.access.models.SharedModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -742,7 +737,7 @@ def _operation(self, *, name: str, **kwargs: Any) -> _models._models.OuterModel: :rtype: ~specs.azure.clientgenerator.core.access.models._models.OuterModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -753,7 +748,7 @@ def _operation(self, *, name: str, **kwargs: Any) -> _models._models.OuterModel: _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models._models.OuterModel] = kwargs.pop("cls", None) # pylint: disable=protected-access + cls: ClsType[_models._models.OuterModel] = kwargs.pop("cls", None) _request = build_relative_model_in_operation_operation_request( name=name, @@ -811,7 +806,7 @@ def _discriminator( # pylint: disable=protected-access :rtype: ~specs.azure.clientgenerator.core.access.models._models.AbstractModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -822,7 +817,7 @@ def _discriminator( # pylint: disable=protected-access _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models._models.AbstractModel] = kwargs.pop("cls", None) # pylint: disable=protected-access + cls: ClsType[_models._models.AbstractModel] = kwargs.pop("cls", None) _request = build_relative_model_in_operation_discriminator_request( kind=kind, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_configuration.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_configuration.py index 2dd1ae8fc4f..8341999c54a 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_configuration.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class FlattenPropertyClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class FlattenPropertyClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for FlattenPropertyClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_model_base.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/_operations.py index 8e9d0114355..3fd8e817935 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -142,7 +141,7 @@ def put_flatten_model( :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -261,7 +260,7 @@ def put_nested_flatten_model( :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.NestedFlattenModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_serialization.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_vendor.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_vendor.py index 2e9d1090845..bc0657eb4e5 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import FlattenPropertyClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_configuration.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_configuration.py index 52ac5c7f305..ac8e8834f92 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class FlattenPropertyClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class FlattenPropertyClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for FlattenPropertyClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/_operations.py index dfb3cf24782..6cac4b9822f 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -106,7 +105,7 @@ async def put_flatten_model( :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,7 +224,7 @@ async def put_nested_flatten_model( :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.NestedFlattenModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_vendor.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_vendor.py index 06892a97fe5..56b763366fe 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import FlattenPropertyClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/_models.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/_models.py index b455b10da58..a3849d8079f 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -49,7 +47,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} super().__init__(*args, **kwargs) for k, v in _flattened_input.items(): @@ -137,7 +135,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} super().__init__(*args, **kwargs) for k, v in _flattened_input.items(): diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_model_base.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_serialization.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py index a3cb3cae3ad..0604d9e4310 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def input_to_input_output( # pylint: disable=inconsistent-return-statements + async def input_to_input_output( self, body: _models.InputModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Expected body parameter: @@ -83,9 +82,7 @@ async def input_to_input_output( # pylint: disable=inconsistent-return-statemen """ @overload - async def input_to_input_output( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def input_to_input_output(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Expected body parameter: .. code-block:: json @@ -105,7 +102,7 @@ async def input_to_input_output( # pylint: disable=inconsistent-return-statemen """ @overload - async def input_to_input_output( # pylint: disable=inconsistent-return-statements + async def input_to_input_output( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Expected body parameter: @@ -127,9 +124,7 @@ async def input_to_input_output( # pylint: disable=inconsistent-return-statemen """ @distributed_trace_async - async def input_to_input_output( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.InputModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def input_to_input_output(self, body: Union[_models.InputModel, JSON, IO[bytes]], **kwargs: Any) -> None: """Expected body parameter: .. code-block:: json @@ -144,7 +139,7 @@ async def input_to_input_output( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,7 +199,7 @@ async def output_to_input_output(self, **kwargs: Any) -> _models.OutputModel: :rtype: ~specs.azure.clientgenerator.core.usage.models.OutputModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -380,7 +375,7 @@ async def model_in_read_only_property( :rtype: ~specs.azure.clientgenerator.core.usage.models.RoundTripModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/models/_models.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/models/_models.py index 0faa0774d3a..2e7f168aa4a 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py index f77341b328a..ddb755c19fe 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -111,7 +110,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def input_to_input_output( # pylint: disable=inconsistent-return-statements + def input_to_input_output( self, body: _models.InputModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Expected body parameter: @@ -133,9 +132,7 @@ def input_to_input_output( # pylint: disable=inconsistent-return-statements """ @overload - def input_to_input_output( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def input_to_input_output(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Expected body parameter: .. code-block:: json @@ -155,9 +152,7 @@ def input_to_input_output( # pylint: disable=inconsistent-return-statements """ @overload - def input_to_input_output( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def input_to_input_output(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Expected body parameter: .. code-block:: json @@ -194,7 +189,7 @@ def input_to_input_output( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -254,7 +249,7 @@ def output_to_input_output(self, **kwargs: Any) -> _models.OutputModel: :rtype: ~specs.azure.clientgenerator.core.usage.models.OutputModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -430,7 +425,7 @@ def model_in_read_only_property( :rtype: ~specs.azure.clientgenerator.core.usage.models.RoundTripModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_client.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_client.py index f0c31a2f322..92d669e749c 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_client.py @@ -19,7 +19,7 @@ from ._serialization import Deserializer, Serializer -class BasicClient(BasicClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class BasicClient(BasicClientOperationsMixin): """Illustrates bodies templated with Azure Core. :keyword endpoint: Service host. Default value is "http://localhost:3000". diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_model_base.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_operations/_operations.py index eda441e4910..d8a7a613f85 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -312,7 +311,7 @@ def create_or_update(self, id: int, resource: Union[_models.User, JSON, IO[bytes :rtype: ~specs.azure.core.basic.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -447,7 +446,7 @@ def create_or_replace(self, id: int, resource: Union[_models.User, JSON, IO[byte :rtype: ~specs.azure.core.basic.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -519,7 +518,7 @@ def get(self, id: int, **kwargs: Any) -> _models.User: :rtype: ~specs.azure.core.basic.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -609,7 +608,7 @@ def list( maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -697,7 +696,7 @@ def delete(self, id: int, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -749,7 +748,7 @@ def export(self, id: int, *, format: str, **kwargs: Any) -> _models.User: :rtype: ~specs.azure.core.basic.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -812,7 +811,7 @@ def export_all_users(self, *, format: str, **kwargs: Any) -> _models.UserList: :rtype: ~specs.azure.core.basic.models.UserList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_serialization.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_vendor.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_vendor.py index 2a7edfc78ea..a9646cc0a20 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import BasicClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_client.py index 3d5efa30266..fe19dc3ae87 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_client.py @@ -19,7 +19,7 @@ from ._operations import BasicClientOperationsMixin -class BasicClient(BasicClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class BasicClient(BasicClientOperationsMixin): """Illustrates bodies templated with Azure Core. :keyword endpoint: Service host. Default value is "http://localhost:3000". diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_operations/_operations.py index 0b0b1a9e6c3..377b1e07882 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -45,7 +44,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -130,7 +129,7 @@ async def create_or_update( :rtype: ~specs.azure.core.basic.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +266,7 @@ async def create_or_replace( :rtype: ~specs.azure.core.basic.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -339,7 +338,7 @@ async def get(self, id: int, **kwargs: Any) -> _models.User: :rtype: ~specs.azure.core.basic.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -429,7 +428,7 @@ def list( maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -506,7 +505,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def delete(self, id: int, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def delete(self, id: int, **kwargs: Any) -> None: """Deletes a user. Deletes a User. @@ -517,7 +516,7 @@ async def delete(self, id: int, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -569,7 +568,7 @@ async def export(self, id: int, *, format: str, **kwargs: Any) -> _models.User: :rtype: ~specs.azure.core.basic.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -632,7 +631,7 @@ async def export_all_users(self, *, format: str, **kwargs: Any) -> _models.UserL :rtype: ~specs.azure.core.basic.models.UserList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_vendor.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_vendor.py index d027f7a8fc9..1adc29db48d 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import BasicClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/models/_models.py index 8829d19bd1b..16a03e1bc54 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_client.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_client.py index 0802365efb9..82c4ceeb159 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_client.py @@ -19,7 +19,7 @@ from ._serialization import Deserializer, Serializer -class StandardClient(StandardClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class StandardClient(StandardClientOperationsMixin): """Illustrates bodies templated with Azure Core with long-running operation. :keyword endpoint: Service host. Default value is "http://localhost:3000". diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_model_base.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_operations/_operations.py index 5fdfa662521..556c0e50997 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -126,7 +125,7 @@ class StandardClientOperationsMixin(StandardClientMixinABC): def _create_or_replace_initial( self, name: str, resource: Union[_models.User, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -319,7 +318,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -420,7 +419,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _export_initial(self, name: str, *, format: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_serialization.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_vendor.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_vendor.py index a0786321c64..89c21215746 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import StandardClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_client.py index 05bd6a0d267..1bf0f0b5991 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_client.py @@ -19,7 +19,7 @@ from ._operations import StandardClientOperationsMixin -class StandardClient(StandardClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class StandardClient(StandardClientOperationsMixin): """Illustrates bodies templated with Azure Core with long-running operation. :keyword endpoint: Service host. Default value is "http://localhost:3000". diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_operations/_operations.py index 5ae86c89f39..513d9917ab6 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -40,7 +39,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +50,7 @@ class StandardClientOperationsMixin(StandardClientMixinABC): async def _create_or_replace_initial( self, name: str, resource: Union[_models.User, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -249,7 +248,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -351,7 +350,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _export_initial(self, name: str, *, format: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_vendor.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_vendor.py index 3283a74ebe6..4461082402a 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import StandardClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py index e5ca2850c0c..d5638212d31 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_model_base.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_serialization.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/_operations.py index 5efea4b4a99..84a6c9fa333 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -68,7 +67,7 @@ async def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -117,9 +116,7 @@ async def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put an embedding vector. :param body: _. Required. @@ -133,9 +130,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put an embedding vector. :param body: _. Required. @@ -149,9 +144,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """put an embedding vector. :param body: _. Is either a [int] type or a IO[bytes] type. Required. @@ -160,7 +153,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +259,7 @@ async def post( :rtype: ~specs.azure.core.model.models.AzureEmbeddingModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/models/_models.py index cc866b6eeb4..19dc337ee1c 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/_operations.py index 38ac6101002..9785cd8742c 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -112,7 +111,7 @@ def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,9 +160,7 @@ def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put an embedding vector. :param body: _. Required. @@ -177,9 +174,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put an embedding vector. :param body: _. Required. @@ -204,7 +199,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -308,7 +303,7 @@ def post( :rtype: ~specs.azure.core.model.models.AzureEmbeddingModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py index a2b5ac1fd39..b0184ed3e51 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py @@ -19,7 +19,7 @@ from .operations import PageClientOperationsMixin, TwoModelsAsPageItemOperations -class PageClient(PageClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class PageClient(PageClientOperationsMixin): """Illustrates bodies templated with Azure Core with paging support. :ivar two_models_as_page_item: TwoModelsAsPageItemOperations operations diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_model_base.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_serialization.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_vendor.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_vendor.py index efb82c530dd..d4b6b2a9067 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import PageClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py index 8d4da7ff838..249f5287162 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py @@ -19,7 +19,7 @@ from .operations import PageClientOperationsMixin, TwoModelsAsPageItemOperations -class PageClient(PageClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class PageClient(PageClientOperationsMixin): """Illustrates bodies templated with Azure Core with paging support. :ivar two_models_as_page_item: TwoModelsAsPageItemOperations operations diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_vendor.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_vendor.py index ff07f485d33..8d99e4023fd 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import PageClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/_operations.py index 15cc81748ff..e82ecac5247 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -40,7 +39,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -77,7 +76,7 @@ def list_first_item(self, **kwargs: Any) -> AsyncIterable["_models.FirstItem"]: cls: ClsType[List[_models.FirstItem]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,7 +159,7 @@ def list_second_item(self, **kwargs: Any) -> AsyncIterable["_models.SecondItem"] cls: ClsType[List[_models.SecondItem]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -245,7 +244,7 @@ def list_with_page(self, **kwargs: Any) -> AsyncIterable["_models.User"]: cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -412,7 +411,7 @@ def list_with_parameters( content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -503,7 +502,7 @@ def list_with_custom_page_model(self, **kwargs: Any) -> AsyncIterable["_models.U cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/models/_models.py index 5860f1f0327..74b52ee3a27 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/_operations.py index f69ce409d54..fd397a78c8f 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -180,7 +179,7 @@ def list_first_item(self, **kwargs: Any) -> Iterable["_models.FirstItem"]: cls: ClsType[List[_models.FirstItem]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -263,7 +262,7 @@ def list_second_item(self, **kwargs: Any) -> Iterable["_models.SecondItem"]: cls: ClsType[List[_models.SecondItem]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -348,7 +347,7 @@ def list_with_page(self, **kwargs: Any) -> Iterable["_models.User"]: cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -515,7 +514,7 @@ def list_with_parameters( content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -606,7 +605,7 @@ def list_with_custom_page_model(self, **kwargs: Any) -> Iterable["_models.User"] cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_model_base.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_serialization.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/_operations.py index ac2e2cb3f26..97eaaf6cce0 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -39,7 +38,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -70,7 +69,7 @@ async def get(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -119,7 +118,7 @@ async def get(self, **kwargs: Any) -> str: return deserialized # type: ignore @distributed_trace_async - async def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put(self, body: str, **kwargs: Any) -> None: """put azureLocation value. :param body: _. Required. @@ -128,7 +127,7 @@ async def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -229,7 +228,7 @@ async def post( :rtype: ~specs.azure.core.scalar.models.AzureLocationModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +287,7 @@ async def post( return deserialized # type: ignore @distributed_trace_async - async def header(self, *, region: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def header(self, *, region: str, **kwargs: Any) -> None: """azureLocation value header. :keyword region: _. Required. @@ -297,7 +296,7 @@ async def header(self, *, region: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -335,7 +334,7 @@ async def header(self, *, region: str, **kwargs: Any) -> None: # pylint: disabl return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def query(self, *, region: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def query(self, *, region: str, **kwargs: Any) -> None: """azureLocation value query. :keyword region: _. Required. @@ -344,7 +343,7 @@ async def query(self, *, region: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/models/_models.py index f41da3a56a0..483602e41b9 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/_operations.py index 95ff7bb860c..4e61dedf75d 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -139,7 +138,7 @@ def get(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -197,7 +196,7 @@ def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -296,7 +295,7 @@ def post( :rtype: ~specs.azure.core.scalar.models.AzureLocationModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -364,7 +363,7 @@ def header(self, *, region: str, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -411,7 +410,7 @@ def query(self, *, region: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_client.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_client.py index 1448bc89bd9..66171c21f0e 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_client.py @@ -19,7 +19,7 @@ from ._serialization import Deserializer, Serializer -class TraitsClient(TraitsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class TraitsClient(TraitsClientOperationsMixin): """Illustrates Azure Core operation customizations by traits. :keyword endpoint: Service host. Default value is "http://localhost:3000". diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_model_base.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_operations/_operations.py index edeca0d8ec4..bbb6ea903a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload import uuid from azure.core import MatchConditions @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -159,7 +158,7 @@ def smoke_test( :rtype: ~specs.azure.core.traits.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -296,7 +295,7 @@ def repeatable_action( :rtype: ~specs.azure.core.traits.models.UserActionResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_serialization.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_vendor.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_vendor.py index c11f85e6716..85a828d8094 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_vendor.py @@ -13,7 +13,6 @@ from ._configuration import TraitsClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_client.py index b61608b085e..03856dd146e 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_client.py @@ -19,7 +19,7 @@ from ._operations import TraitsClientOperationsMixin -class TraitsClient(TraitsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class TraitsClient(TraitsClientOperationsMixin): """Illustrates Azure Core operation customizations by traits. :keyword endpoint: Service host. Default value is "http://localhost:3000". diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_operations/_operations.py index 9d5793e68fc..be4c7979a3c 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core import MatchConditions from azure.core.exceptions import ( @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -78,7 +77,7 @@ async def smoke_test( :rtype: ~specs.azure.core.traits.models.User :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -215,7 +214,7 @@ async def repeatable_action( :rtype: ~specs.azure.core.traits.models.UserActionResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_vendor.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_vendor.py index 91cca7e4e8a..206aaefb870 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_vendor.py @@ -13,7 +13,6 @@ from ._configuration import TraitsClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/models/_models.py index 39aedab4dbc..863430f8ce3 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_client.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_client.py index 2b90b383fcf..c633041f8a6 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_client.py @@ -19,7 +19,7 @@ from ._serialization import Deserializer, Serializer -class AzureExampleClient(AzureExampleClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class AzureExampleClient(AzureExampleClientOperationsMixin): """AzureExampleClient. :keyword endpoint: Service host. Default value is "http://localhost:3000". diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_configuration.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_configuration.py index 12191ba6221..14df3fdec52 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_configuration.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AzureExampleClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AzureExampleClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AzureExampleClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_model_base.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_operations/_operations.py index dec8a4a7af5..0e8f98efa24 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -157,7 +156,7 @@ def basic_action( :rtype: ~specs.azure.example.basic.models.ActionResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_serialization.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_vendor.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_vendor.py index fadf164f6e4..fbed59a5ee8 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AzureExampleClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_client.py index 9553dd887b8..c041c6dc21c 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_client.py @@ -19,7 +19,7 @@ from ._operations import AzureExampleClientOperationsMixin -class AzureExampleClient(AzureExampleClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class AzureExampleClient(AzureExampleClientOperationsMixin): """AzureExampleClient. :keyword endpoint: Service host. Default value is "http://localhost:3000". diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_configuration.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_configuration.py index e895c35eac1..b851be5e7f1 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AzureExampleClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AzureExampleClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AzureExampleClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_operations/_operations.py index 36f7b1e03fd..b37bdc713a9 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -130,7 +129,7 @@ async def basic_action( :rtype: ~specs.azure.example.basic.models.ActionResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_vendor.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_vendor.py index 4f47d6cb65f..08b0ff0d65e 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AzureExampleClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/models/_models.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/models/_models.py index 9f34bb0bbee..75a371e0f1a 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_client.py index 4da103a03ff..9541af3be45 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_client.py @@ -20,11 +20,10 @@ from .operations import ManagedIdentityTrackedResourcesOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ManagedIdentityClient: # pylint: disable=client-accepts-api-version-keyword +class ManagedIdentityClient: """Arm Managed Identity Provider management API. :ivar managed_identity_tracked_resources: ManagedIdentityTrackedResourcesOperations operations diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_configuration.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_configuration.py index c75644b59b0..6a896c3150d 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_configuration.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ManagedIdentityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ManagedIdentityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ManagedIdentityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_model_base.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_serialization.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/_client.py index da0a591def4..9a16c85f23a 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/_client.py @@ -20,11 +20,10 @@ from .operations import ManagedIdentityTrackedResourcesOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ManagedIdentityClient: # pylint: disable=client-accepts-api-version-keyword +class ManagedIdentityClient: """Arm Managed Identity Provider management API. :ivar managed_identity_tracked_resources: ManagedIdentityTrackedResourcesOperations operations diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/_configuration.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/_configuration.py index 91a41bb6b44..25cf2bda3b1 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ManagedIdentityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ManagedIdentityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ManagedIdentityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/operations/_operations.py index a735edcf5d5..ca70bf4e685 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -78,7 +77,7 @@ async def get( ~azure.resourcemanager.models.commontypes.managedidentity.models.ManagedIdentityTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -245,7 +244,7 @@ async def create_with_system_assigned( ~azure.resourcemanager.models.commontypes.managedidentity.models.ManagedIdentityTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -422,7 +421,7 @@ async def update_with_user_assigned_and_system_assigned( # pylint: disable=name ~azure.resourcemanager.models.commontypes.managedidentity.models.ManagedIdentityTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/models/_models.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/models/_models.py index 7fad059a600..7cc4019c786 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +13,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -230,7 +228,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/operations/_operations.py index c5eec17725b..d11bfddcd3b 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-common-types-managed-identity/azure/resourcemanager/models/commontypes/managedidentity/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -173,7 +172,7 @@ def get( ~azure.resourcemanager.models.commontypes.managedidentity.models.ManagedIdentityTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -340,7 +339,7 @@ def create_with_system_assigned( ~azure.resourcemanager.models.commontypes.managedidentity.models.ManagedIdentityTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,7 +516,7 @@ def update_with_user_assigned_and_system_assigned( # pylint: disable=name-too-l ~azure.resourcemanager.models.commontypes.managedidentity.models.ManagedIdentityTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_client.py index e16797ceb2e..47dcee0a76a 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_client.py @@ -24,11 +24,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ResourcesClient: # pylint: disable=client-accepts-api-version-keyword +class ResourcesClient: """Arm Resource Provider management API. :ivar top_level_tracked_resources: TopLevelTrackedResourcesOperations operations diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_configuration.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_configuration.py index 902cad19dd8..188ff149575 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_configuration.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ResourcesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ResourcesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ResourcesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_model_base.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_serialization.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/_client.py index dac1649a320..7db19a3af59 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/_client.py @@ -24,11 +24,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ResourcesClient: # pylint: disable=client-accepts-api-version-keyword +class ResourcesClient: """Arm Resource Provider management API. :ivar top_level_tracked_resources: TopLevelTrackedResourcesOperations operations diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/_configuration.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/_configuration.py index cb7fb0a6566..cee35adabb7 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ResourcesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ResourcesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ResourcesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/operations/_operations.py index 271f1370d67..1dbd8a6ee9f 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,21 +9,7 @@ from io import IOBase import json import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -70,7 +56,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -108,7 +94,7 @@ async def get( :rtype: ~azure.resourcemanager.models.resources.models.TopLevelTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -168,7 +154,7 @@ async def _create_or_replace_initial( resource: Union[_models.TopLevelTrackedResource, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -405,7 +391,7 @@ async def _update_initial( properties: Union[_models.TopLevelTrackedResource, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -636,7 +622,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, top_level_tracked_resource_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -768,7 +754,7 @@ def list_by_resource_group( cls: ClsType[List[_models.TopLevelTrackedResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,7 +840,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.TopLevel cls: ClsType[List[_models.TopLevelTrackedResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -926,7 +912,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @overload - async def action_sync( # pylint: disable=inconsistent-return-statements + async def action_sync( self, resource_group_name: str, top_level_tracked_resource_name: str, @@ -953,7 +939,7 @@ async def action_sync( # pylint: disable=inconsistent-return-statements """ @overload - async def action_sync( # pylint: disable=inconsistent-return-statements + async def action_sync( self, resource_group_name: str, top_level_tracked_resource_name: str, @@ -980,7 +966,7 @@ async def action_sync( # pylint: disable=inconsistent-return-statements """ @overload - async def action_sync( # pylint: disable=inconsistent-return-statements + async def action_sync( self, resource_group_name: str, top_level_tracked_resource_name: str, @@ -1007,7 +993,7 @@ async def action_sync( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def action_sync( # pylint: disable=inconsistent-return-statements + async def action_sync( self, resource_group_name: str, top_level_tracked_resource_name: str, @@ -1029,7 +1015,7 @@ async def action_sync( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1119,7 +1105,7 @@ async def get( :rtype: ~azure.resourcemanager.models.resources.models.NestedProxyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1181,7 +1167,7 @@ async def _create_or_replace_initial( resource: Union[_models.NestedProxyResource, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1433,7 +1419,7 @@ async def _update_initial( properties: Union[_models.NestedProxyResource, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1682,7 +1668,7 @@ async def _delete_initial( nexted_proxy_resource_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1824,7 +1810,7 @@ def list_by_top_level_tracked_resource( cls: ClsType[List[_models.NestedProxyResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1927,7 +1913,7 @@ async def get_by_resource_group(self, resource_group_name: str, **kwargs: Any) - :rtype: ~azure.resourcemanager.models.resources.models.SingletonTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1985,7 +1971,7 @@ async def _create_or_update_initial( resource: Union[_models.SingletonTrackedResource, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2277,7 +2263,7 @@ async def update( :rtype: ~azure.resourcemanager.models.resources.models.SingletonTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2359,7 +2345,7 @@ def list_by_resource_group( cls: ClsType[List[_models.SingletonTrackedResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/models/_models.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/models/_models.py index ba5020a97dd..abf1ad2b53c 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +13,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -356,7 +354,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -503,7 +501,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/operations/_operations.py index cdba4b738e0..17426d56772 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-models-resources/azure/resourcemanager/models/resources/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -38,7 +38,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -581,7 +581,7 @@ def get( :rtype: ~azure.resourcemanager.models.resources.models.TopLevelTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -641,7 +641,7 @@ def _create_or_replace_initial( resource: Union[_models.TopLevelTrackedResource, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -878,7 +878,7 @@ def _update_initial( properties: Union[_models.TopLevelTrackedResource, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1109,7 +1109,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, top_level_tracked_resource_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1241,7 +1241,7 @@ def list_by_resource_group( cls: ClsType[List[_models.TopLevelTrackedResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1327,7 +1327,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.TopLevelTrack cls: ClsType[List[_models.TopLevelTrackedResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1399,7 +1399,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @overload - def action_sync( # pylint: disable=inconsistent-return-statements + def action_sync( self, resource_group_name: str, top_level_tracked_resource_name: str, @@ -1426,7 +1426,7 @@ def action_sync( # pylint: disable=inconsistent-return-statements """ @overload - def action_sync( # pylint: disable=inconsistent-return-statements + def action_sync( self, resource_group_name: str, top_level_tracked_resource_name: str, @@ -1453,7 +1453,7 @@ def action_sync( # pylint: disable=inconsistent-return-statements """ @overload - def action_sync( # pylint: disable=inconsistent-return-statements + def action_sync( self, resource_group_name: str, top_level_tracked_resource_name: str, @@ -1502,7 +1502,7 @@ def action_sync( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1592,7 +1592,7 @@ def get( :rtype: ~azure.resourcemanager.models.resources.models.NestedProxyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1654,7 +1654,7 @@ def _create_or_replace_initial( resource: Union[_models.NestedProxyResource, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1906,7 +1906,7 @@ def _update_initial( properties: Union[_models.NestedProxyResource, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2155,7 +2155,7 @@ def _delete_initial( nexted_proxy_resource_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2297,7 +2297,7 @@ def list_by_top_level_tracked_resource( cls: ClsType[List[_models.NestedProxyResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2400,7 +2400,7 @@ def get_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> _mod :rtype: ~azure.resourcemanager.models.resources.models.SingletonTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2458,7 +2458,7 @@ def _create_or_update_initial( resource: Union[_models.SingletonTrackedResource, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2750,7 +2750,7 @@ def update( :rtype: ~azure.resourcemanager.models.resources.models.SingletonTrackedResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2831,7 +2831,7 @@ def list_by_resource_group( cls: ClsType[List[_models.SingletonTrackedResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_configuration.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_configuration.py index 596cb18d668..baba7065942 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_configuration.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class XmsClientRequestIdClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class XmsClientRequestIdClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for XmsClientRequestIdClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_model_base.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_operations/_operations.py index fbe331cd7e2..0c000371333 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_serialization.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_vendor.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_vendor.py index bb6e2a34c38..1114c6de90e 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import XmsClientRequestIdClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_configuration.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_configuration.py index 2e178ef0075..e9e359fd317 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class XmsClientRequestIdClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class XmsClientRequestIdClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for XmsClientRequestIdClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_operations/_operations.py index 5878bbee40e..fbf0eedef40 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class XmsClientRequestIdClientOperationsMixin(XmsClientRequestIdClientMixinABC): @distributed_trace_async - async def get(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def get(self, **kwargs: Any) -> None: """Get operation with azure ``x-ms-client-request-id`` header. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_vendor.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_vendor.py index 873eeba05db..f5bddb4b92b 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import XmsClientRequestIdClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_client.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_client.py index a25a6420a1f..91986b17333 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_client.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_client.py @@ -19,7 +19,7 @@ from ._serialization import Deserializer, Serializer -class RpcClient(RpcClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class RpcClient(RpcClientOperationsMixin): """Illustrates bodies templated with Azure Core with long-running RPC operation. :keyword endpoint: Service host. Default value is "http://localhost:3000". diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_model_base.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_model_base.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_operations/_operations.py index 68bb5038c63..3e5947e21f7 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -72,7 +71,7 @@ class RpcClientOperationsMixin(RpcClientMixinABC): def _long_running_rpc_initial( self, body: Union[_models.GenerationOptions, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_serialization.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_serialization.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_vendor.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_vendor.py index a07666217c9..15a90450617 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RpcClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_client.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_client.py index 16fa166e883..9c997c34626 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_client.py @@ -19,7 +19,7 @@ from ._operations import RpcClientOperationsMixin -class RpcClient(RpcClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class RpcClient(RpcClientOperationsMixin): """Illustrates bodies templated with Azure Core with long-running RPC operation. :keyword endpoint: Service host. Default value is "http://localhost:3000". diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_operations/_operations.py index 7cdb300fd60..740388993b7 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +46,7 @@ class RpcClientOperationsMixin(RpcClientMixinABC): async def _long_running_rpc_initial( self, body: Union[_models.GenerationOptions, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_vendor.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_vendor.py index d947a433870..9e0cd032e1d 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RpcClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/models/_models.py b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/models/_models.py index 429e3daa2cc..cdd6943d506 100644 --- a/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azurecore-lro-rpc/azurecore/lro/rpc/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/_model_base.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/_model_base.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/_serialization.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/_serialization.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/_vendor.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/_vendor.py index 4f7fbf2b037..a2c7563548d 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/_vendor.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NamingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/_vendor.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/_vendor.py index 35303b31b6e..ba41624431c 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NamingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/operations/_operations.py index 5e844cd265d..9908681c9bd 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -44,7 +43,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -68,9 +67,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def client( # pylint: disable=inconsistent-return-statements - self, body: _models.ClientModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def client(self, body: _models.ClientModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -84,9 +81,7 @@ async def client( # pylint: disable=inconsistent-return-statements """ @overload - async def client( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def client(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -100,9 +95,7 @@ async def client( # pylint: disable=inconsistent-return-statements """ @overload - async def client( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def client(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -116,9 +109,7 @@ async def client( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def client( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ClientModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def client(self, body: Union[_models.ClientModel, JSON, IO[bytes]], **kwargs: Any) -> None: """client. :param body: Is one of the following types: ClientModel, JSON, IO[bytes] Required. @@ -127,7 +118,7 @@ async def client( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -174,7 +165,7 @@ async def client( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def language( # pylint: disable=inconsistent-return-statements + async def language( self, body: _models.PythonModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """language. @@ -190,9 +181,7 @@ async def language( # pylint: disable=inconsistent-return-statements """ @overload - async def language( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def language(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -206,9 +195,7 @@ async def language( # pylint: disable=inconsistent-return-statements """ @overload - async def language( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def language(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -222,9 +209,7 @@ async def language( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def language( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PythonModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def language(self, body: Union[_models.PythonModel, JSON, IO[bytes]], **kwargs: Any) -> None: """language. :param body: Is one of the following types: PythonModel, JSON, IO[bytes] Required. @@ -233,7 +218,7 @@ async def language( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -298,9 +283,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def union_enum_name( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.ClientExtensibleEnum], **kwargs: Any - ) -> None: + async def union_enum_name(self, body: Union[str, _models.ClientExtensibleEnum], **kwargs: Any) -> None: """union_enum_name. :param body: "value1" Required. @@ -309,7 +292,7 @@ async def union_enum_name( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -351,9 +334,7 @@ async def union_enum_name( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def union_enum_member_name( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.ExtensibleEnum], **kwargs: Any - ) -> None: + async def union_enum_member_name(self, body: Union[str, _models.ExtensibleEnum], **kwargs: Any) -> None: """union_enum_member_name. :param body: Known values are: "value1" and "value2". Required. @@ -362,7 +343,7 @@ async def union_enum_member_name( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -407,14 +388,14 @@ async def union_enum_member_name( # pylint: disable=inconsistent-return-stateme class NamingClientOperationsMixin(NamingClientMixinABC): @distributed_trace_async - async def client_name(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def client_name(self, **kwargs: Any) -> None: """client_name. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -451,9 +432,7 @@ async def client_name(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def parameter( # pylint: disable=inconsistent-return-statements - self, *, client_name: str, **kwargs: Any - ) -> None: + async def parameter(self, *, client_name: str, **kwargs: Any) -> None: """parameter. :keyword client_name: Required. @@ -462,7 +441,7 @@ async def parameter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -500,7 +479,7 @@ async def parameter( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def client( # pylint: disable=inconsistent-return-statements + async def client( self, body: _models.ClientNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """client. @@ -516,9 +495,7 @@ async def client( # pylint: disable=inconsistent-return-statements """ @overload - async def client( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def client(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -532,9 +509,7 @@ async def client( # pylint: disable=inconsistent-return-statements """ @overload - async def client( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def client(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -548,9 +523,7 @@ async def client( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def client( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ClientNameModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def client(self, body: Union[_models.ClientNameModel, JSON, IO[bytes]], **kwargs: Any) -> None: """client. :param body: Is one of the following types: ClientNameModel, JSON, IO[bytes] Required. @@ -559,7 +532,7 @@ async def client( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -606,7 +579,7 @@ async def client( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def language( # pylint: disable=inconsistent-return-statements + async def language( self, body: _models.LanguageClientNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """language. @@ -622,9 +595,7 @@ async def language( # pylint: disable=inconsistent-return-statements """ @overload - async def language( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def language(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -638,9 +609,7 @@ async def language( # pylint: disable=inconsistent-return-statements """ @overload - async def language( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def language(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -654,9 +623,7 @@ async def language( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def language( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.LanguageClientNameModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def language(self, body: Union[_models.LanguageClientNameModel, JSON, IO[bytes]], **kwargs: Any) -> None: """language. :param body: Is one of the following types: LanguageClientNameModel, JSON, IO[bytes] Required. @@ -665,7 +632,7 @@ async def language( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -712,7 +679,7 @@ async def language( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + async def compatible_with_encoded_name( self, body: _models.ClientNameAndJsonEncodedNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -728,7 +695,7 @@ async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-s """ @overload - async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + async def compatible_with_encoded_name( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -744,7 +711,7 @@ async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-s """ @overload - async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + async def compatible_with_encoded_name( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -760,7 +727,7 @@ async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-s """ @distributed_trace_async - async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + async def compatible_with_encoded_name( self, body: Union[_models.ClientNameAndJsonEncodedNameModel, JSON, IO[bytes]], **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -772,7 +739,7 @@ async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -819,9 +786,7 @@ async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def request( # pylint: disable=inconsistent-return-statements - self, *, client_name: str, **kwargs: Any - ) -> None: + async def request(self, *, client_name: str, **kwargs: Any) -> None: """request. :keyword client_name: Required. @@ -830,7 +795,7 @@ async def request( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -868,14 +833,14 @@ async def request( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def response(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def response(self, **kwargs: Any) -> None: """response. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/models/_models.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/models/_models.py index 71b5a1e60a2..3d1209b1b01 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/models/_models.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/operations/_operations.py index a1cd38c3dc7..f2fd00a255a 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -193,9 +193,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: _models.ClientModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: _models.ClientModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -209,9 +207,7 @@ def client( # pylint: disable=inconsistent-return-statements """ @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -225,9 +221,7 @@ def client( # pylint: disable=inconsistent-return-statements """ @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -252,7 +246,7 @@ def client( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -299,9 +293,7 @@ def client( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def language( # pylint: disable=inconsistent-return-statements - self, body: _models.PythonModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def language(self, body: _models.PythonModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -315,9 +307,7 @@ def language( # pylint: disable=inconsistent-return-statements """ @overload - def language( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def language(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -331,9 +321,7 @@ def language( # pylint: disable=inconsistent-return-statements """ @overload - def language( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def language(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -358,7 +346,7 @@ def language( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -434,7 +422,7 @@ def union_enum_name( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -487,7 +475,7 @@ def union_enum_member_name( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -539,7 +527,7 @@ def client_name(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -585,7 +573,7 @@ def parameter(self, *, client_name: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -623,9 +611,7 @@ def parameter(self, *, client_name: str, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: _models.ClientNameModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: _models.ClientNameModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -639,9 +625,7 @@ def client( # pylint: disable=inconsistent-return-statements """ @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -655,9 +639,7 @@ def client( # pylint: disable=inconsistent-return-statements """ @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -682,7 +664,7 @@ def client( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -729,7 +711,7 @@ def client( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def language( # pylint: disable=inconsistent-return-statements + def language( self, body: _models.LanguageClientNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """language. @@ -745,9 +727,7 @@ def language( # pylint: disable=inconsistent-return-statements """ @overload - def language( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def language(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -761,9 +741,7 @@ def language( # pylint: disable=inconsistent-return-statements """ @overload - def language( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def language(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -788,7 +766,7 @@ def language( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -835,7 +813,7 @@ def language( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + def compatible_with_encoded_name( self, body: _models.ClientNameAndJsonEncodedNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -851,7 +829,7 @@ def compatible_with_encoded_name( # pylint: disable=inconsistent-return-stateme """ @overload - def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + def compatible_with_encoded_name( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -867,7 +845,7 @@ def compatible_with_encoded_name( # pylint: disable=inconsistent-return-stateme """ @overload - def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + def compatible_with_encoded_name( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -895,7 +873,7 @@ def compatible_with_encoded_name( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -951,7 +929,7 @@ def request(self, *, client_name: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -996,7 +974,7 @@ def response(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_model_base.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_model_base.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_serialization.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_serialization.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_vendor.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_vendor.py index 1bba0ed1b5e..f4827264b19 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_vendor.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_vendor.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_vendor.py index ab4208e36cb..b11ec73753f 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/_operations.py index 7cdd263fbf1..aba36948913 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -82,14 +81,14 @@ def __init__(self, *args, **kwargs) -> None: self.bar = QuxBarOperations(self._client, self._config, self._serialize, self._deserialize) @distributed_trace_async - async def eight(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def eight(self, **kwargs: Any) -> None: """eight. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -145,14 +144,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def three(self, **kwargs: Any) -> None: """three. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -190,14 +189,14 @@ async def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def four(self, **kwargs: Any) -> None: """four. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,14 +252,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def five(self, **kwargs: Any) -> None: """five. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -298,14 +297,14 @@ async def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def six(self, **kwargs: Any) -> None: """six. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -346,14 +345,14 @@ async def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu class ServiceClientOperationsMixin(ServiceClientMixinABC): @distributed_trace_async - async def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def one(self, **kwargs: Any) -> None: """one. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -391,14 +390,14 @@ async def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def two(self, **kwargs: Any) -> None: """two. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -454,14 +453,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def seven(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def seven(self, **kwargs: Any) -> None: """seven. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,14 +516,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def nine(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def nine(self, **kwargs: Any) -> None: """nine. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/_operations.py index 90d9a8f787a..21da34ddb91 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -145,7 +144,7 @@ def eight(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -208,7 +207,7 @@ def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +252,7 @@ def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -316,7 +315,7 @@ def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -361,7 +360,7 @@ def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -409,7 +408,7 @@ def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -454,7 +453,7 @@ def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,7 +516,7 @@ def seven(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -580,7 +579,7 @@ def nine(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_operations/_operations.py index c21b9d4184c..14365ddb794 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -87,7 +86,7 @@ def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -132,7 +131,7 @@ def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -177,7 +176,7 @@ def renamed_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,7 +224,7 @@ def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,7 +269,7 @@ def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -315,7 +314,7 @@ def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_serialization.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_serialization.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_vendor.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_vendor.py index cd6b7285cac..3b8be01047d 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_vendor.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ClientAClientConfiguration, ClientBClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/_operations.py index f114cfddb15..51a94c456ac 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,14 +41,14 @@ class ClientAClientOperationsMixin(ClientAClientMixinABC): @distributed_trace_async - async def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_one(self, **kwargs: Any) -> None: """renamed_one. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -87,14 +86,14 @@ async def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_three(self, **kwargs: Any) -> None: """renamed_three. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -132,14 +131,14 @@ async def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsi return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def renamed_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_five(self, **kwargs: Any) -> None: """renamed_five. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -180,14 +179,14 @@ async def renamed_five(self, **kwargs: Any) -> None: # pylint: disable=inconsis class ClientBClientOperationsMixin(ClientBClientMixinABC): @distributed_trace_async - async def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_two(self, **kwargs: Any) -> None: """renamed_two. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,14 +224,14 @@ async def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_four(self, **kwargs: Any) -> None: """renamed_four. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,14 +269,14 @@ async def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_six(self, **kwargs: Any) -> None: """renamed_six. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_vendor.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_vendor.py index eb76885c02c..6e8a9245612 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ClientAClientConfiguration, ClientBClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_configuration.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_configuration.py index 2b006fbb153..6187f4443f3 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_configuration.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class RenamedOperationClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RenamedOperationClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RenamedOperationClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_serialization.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_serialization.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_vendor.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_vendor.py index 9aa35d17714..8b9d2061a65 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_vendor.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RenamedOperationClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_configuration.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_configuration.py index 7f05f3e4f88..1a90883e614 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class RenamedOperationClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RenamedOperationClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RenamedOperationClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_vendor.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_vendor.py index 671237de476..6164a637cc6 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RenamedOperationClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py index 7884044a4ba..1224f1fc794 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,14 +56,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_two(self, **kwargs: Any) -> None: """renamed_two. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -102,14 +101,14 @@ async def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_four(self, **kwargs: Any) -> None: """renamed_four. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -147,14 +146,14 @@ async def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_six(self, **kwargs: Any) -> None: """renamed_six. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -195,14 +194,14 @@ async def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsist class RenamedOperationClientOperationsMixin(RenamedOperationClientMixinABC): @distributed_trace_async - async def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_one(self, **kwargs: Any) -> None: """renamed_one. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -240,14 +239,14 @@ async def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_three(self, **kwargs: Any) -> None: """renamed_three. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -285,14 +284,14 @@ async def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsi return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def renamed_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_five(self, **kwargs: Any) -> None: """renamed_five. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py index 9c004ec1b8d..d9287bb14c2 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -102,7 +101,7 @@ def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -147,7 +146,7 @@ def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -192,7 +191,7 @@ def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -240,7 +239,7 @@ def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -285,7 +284,7 @@ def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -330,7 +329,7 @@ def renamed_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_configuration.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_configuration.py index 231508bbedd..9e687d71dfa 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_configuration.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class TwoOperationGroupClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TwoOperationGroupClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TwoOperationGroupClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_serialization.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_serialization.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_configuration.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_configuration.py index c0481c26870..aa2f5549b74 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class TwoOperationGroupClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TwoOperationGroupClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TwoOperationGroupClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py index 0c74cb3d91d..c53cbacc8a5 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,14 +55,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def one(self, **kwargs: Any) -> None: """one. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -101,14 +100,14 @@ async def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def three(self, **kwargs: Any) -> None: """three. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -146,14 +145,14 @@ async def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def four(self, **kwargs: Any) -> None: """four. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -209,14 +208,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def two(self, **kwargs: Any) -> None: """two. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -254,14 +253,14 @@ async def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def five(self, **kwargs: Any) -> None: """five. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -299,14 +298,14 @@ async def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def six(self, **kwargs: Any) -> None: """six. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py index 01b8e0eefcf..5e9dbb78628 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -101,7 +100,7 @@ def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -146,7 +145,7 @@ def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -191,7 +190,7 @@ def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -254,7 +253,7 @@ def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -299,7 +298,7 @@ def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -344,7 +343,7 @@ def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_model_base.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_model_base.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_serialization.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_serialization.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/aio/operations/_operations.py index 92dedfda2ed..c693fd9f1c5 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -56,7 +56,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -80,7 +80,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def default(self, *, value: bytes, **kwargs: Any) -> None: """default. :keyword value: Required. @@ -89,7 +89,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -127,7 +127,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def base64(self, *, value: bytes, **kwargs: Any) -> None: """base64. :keyword value: Required. @@ -136,7 +136,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -174,9 +174,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def base64_url( # pylint: disable=inconsistent-return-statements - self, *, value: bytes, **kwargs: Any - ) -> None: + async def base64_url(self, *, value: bytes, **kwargs: Any) -> None: """base64_url. :keyword value: Required. @@ -185,7 +183,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -223,9 +221,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def base64_url_array( # pylint: disable=inconsistent-return-statements - self, *, value: List[bytes], **kwargs: Any - ) -> None: + async def base64_url_array(self, *, value: List[bytes], **kwargs: Any) -> None: """base64_url_array. :keyword value: Required. @@ -234,7 +230,7 @@ async def base64_url_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -349,7 +345,7 @@ async def default( :rtype: ~encode.bytes.models.DefaultBytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -467,7 +463,7 @@ async def base64( :rtype: ~encode.bytes.models.Base64BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -585,7 +581,7 @@ async def base64_url( :rtype: ~encode.bytes.models.Base64urlBytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -708,7 +704,7 @@ async def base64_url_array( :rtype: ~encode.bytes.models.Base64urlArrayBytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +781,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def default(self, *, value: bytes, **kwargs: Any) -> None: """default. :keyword value: Required. @@ -794,7 +790,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -832,7 +828,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def base64(self, *, value: bytes, **kwargs: Any) -> None: """base64. :keyword value: Required. @@ -841,7 +837,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -879,9 +875,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def base64_url( # pylint: disable=inconsistent-return-statements - self, *, value: bytes, **kwargs: Any - ) -> None: + async def base64_url(self, *, value: bytes, **kwargs: Any) -> None: """base64_url. :keyword value: Required. @@ -890,7 +884,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -928,9 +922,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def base64_url_array( # pylint: disable=inconsistent-return-statements - self, *, value: List[bytes], **kwargs: Any - ) -> None: + async def base64_url_array(self, *, value: List[bytes], **kwargs: Any) -> None: """base64_url_array. :keyword value: Required. @@ -939,7 +931,7 @@ async def base64_url_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,7 +987,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def default(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def default(self, value: bytes, **kwargs: Any) -> None: """default. :param value: Required. @@ -1004,7 +996,7 @@ async def default(self, value: bytes, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1046,7 +1038,7 @@ async def default(self, value: bytes, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def octet_stream(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def octet_stream(self, value: bytes, **kwargs: Any) -> None: """octet_stream. :param value: Required. @@ -1055,7 +1047,7 @@ async def octet_stream(self, value: bytes, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1097,9 +1089,7 @@ async def octet_stream(self, value: bytes, **kwargs: Any) -> None: # pylint: di return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def custom_content_type( # pylint: disable=inconsistent-return-statements - self, value: bytes, **kwargs: Any - ) -> None: + async def custom_content_type(self, value: bytes, **kwargs: Any) -> None: """custom_content_type. :param value: Required. @@ -1108,7 +1098,7 @@ async def custom_content_type( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1150,7 +1140,7 @@ async def custom_content_type( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def base64(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def base64(self, value: bytes, **kwargs: Any) -> None: """base64. :param value: Required. @@ -1159,7 +1149,7 @@ async def base64(self, value: bytes, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1201,7 +1191,7 @@ async def base64(self, value: bytes, **kwargs: Any) -> None: # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def base64_url(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def base64_url(self, value: bytes, **kwargs: Any) -> None: """base64_url. :param value: Required. @@ -1210,7 +1200,7 @@ async def base64_url(self, value: bytes, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1277,7 +1267,7 @@ async def default(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1333,7 +1323,7 @@ async def octet_stream(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1389,7 +1379,7 @@ async def custom_content_type(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1445,7 +1435,7 @@ async def base64(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1501,7 +1491,7 @@ async def base64_url(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/models/_models.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/models/_models.py index 193d7f34b64..c49abf9a818 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/models/_models.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/operations/_operations.py index 914fc18d11a..981f3b6fc56 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Iterator, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -368,7 +368,7 @@ def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -415,7 +415,7 @@ def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -462,7 +462,7 @@ def base64_url(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -511,7 +511,7 @@ def base64_url_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -626,7 +626,7 @@ def default( :rtype: ~encode.bytes.models.DefaultBytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -744,7 +744,7 @@ def base64( :rtype: ~encode.bytes.models.Base64BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -862,7 +862,7 @@ def base64_url( :rtype: ~encode.bytes.models.Base64urlBytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -985,7 +985,7 @@ def base64_url_array( :rtype: ~encode.bytes.models.Base64urlArrayBytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1071,7 +1071,7 @@ def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1118,7 +1118,7 @@ def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1165,7 +1165,7 @@ def base64_url(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1214,7 +1214,7 @@ def base64_url_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1279,7 +1279,7 @@ def default(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1330,7 +1330,7 @@ def octet_stream(self, value: bytes, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1383,7 +1383,7 @@ def custom_content_type( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1434,7 +1434,7 @@ def base64(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1485,7 +1485,7 @@ def base64_url(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1552,7 +1552,7 @@ def default(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1608,7 +1608,7 @@ def octet_stream(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1664,7 +1664,7 @@ def custom_content_type(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1720,7 +1720,7 @@ def base64(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1776,7 +1776,7 @@ def base64_url(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_model_base.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_model_base.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_serialization.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_serialization.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/aio/operations/_operations.py index a4dcf81cada..e93e6ae10a9 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -54,7 +54,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -78,9 +78,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def default( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def default(self, *, value: datetime.datetime, **kwargs: Any) -> None: """default. :keyword value: Required. @@ -89,7 +87,7 @@ async def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -127,9 +125,7 @@ async def default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def rfc3339( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def rfc3339(self, *, value: datetime.datetime, **kwargs: Any) -> None: """rfc3339. :keyword value: Required. @@ -138,7 +134,7 @@ async def rfc3339( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -176,9 +172,7 @@ async def rfc3339( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def rfc7231( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def rfc7231(self, *, value: datetime.datetime, **kwargs: Any) -> None: """rfc7231. :keyword value: Required. @@ -187,7 +181,7 @@ async def rfc7231( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,9 +219,7 @@ async def rfc7231( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def unix_timestamp( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def unix_timestamp(self, *, value: datetime.datetime, **kwargs: Any) -> None: """unix_timestamp. :keyword value: Required. @@ -236,7 +228,7 @@ async def unix_timestamp( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -274,9 +266,7 @@ async def unix_timestamp( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def unix_timestamp_array( # pylint: disable=inconsistent-return-statements - self, *, value: List[datetime.datetime], **kwargs: Any - ) -> None: + async def unix_timestamp_array(self, *, value: List[datetime.datetime], **kwargs: Any) -> None: """unix_timestamp_array. :keyword value: Required. @@ -285,7 +275,7 @@ async def unix_timestamp_array( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -400,7 +390,7 @@ async def default( :rtype: ~encode.datetime.models.DefaultDatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -518,7 +508,7 @@ async def rfc3339( :rtype: ~encode.datetime.models.Rfc3339DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -636,7 +626,7 @@ async def rfc7231( :rtype: ~encode.datetime.models.Rfc7231DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -759,7 +749,7 @@ async def unix_timestamp( :rtype: ~encode.datetime.models.UnixTimestampDatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -882,7 +872,7 @@ async def unix_timestamp_array( :rtype: ~encode.datetime.models.UnixTimestampArrayDatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -959,9 +949,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def default( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def default(self, *, value: datetime.datetime, **kwargs: Any) -> None: """default. :keyword value: Required. @@ -970,7 +958,7 @@ async def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1008,9 +996,7 @@ async def default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def rfc3339( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def rfc3339(self, *, value: datetime.datetime, **kwargs: Any) -> None: """rfc3339. :keyword value: Required. @@ -1019,7 +1005,7 @@ async def rfc3339( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1057,9 +1043,7 @@ async def rfc3339( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def rfc7231( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def rfc7231(self, *, value: datetime.datetime, **kwargs: Any) -> None: """rfc7231. :keyword value: Required. @@ -1068,7 +1052,7 @@ async def rfc7231( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1106,9 +1090,7 @@ async def rfc7231( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def unix_timestamp( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def unix_timestamp(self, *, value: datetime.datetime, **kwargs: Any) -> None: """unix_timestamp. :keyword value: Required. @@ -1117,7 +1099,7 @@ async def unix_timestamp( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1155,9 +1137,7 @@ async def unix_timestamp( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def unix_timestamp_array( # pylint: disable=inconsistent-return-statements - self, *, value: List[datetime.datetime], **kwargs: Any - ) -> None: + async def unix_timestamp_array(self, *, value: List[datetime.datetime], **kwargs: Any) -> None: """unix_timestamp_array. :keyword value: Required. @@ -1166,7 +1146,7 @@ async def unix_timestamp_array( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1222,14 +1202,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def default(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def default(self, **kwargs: Any) -> None: """default. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1269,14 +1249,14 @@ async def default(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def rfc3339(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def rfc3339(self, **kwargs: Any) -> None: """rfc3339. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1316,14 +1296,14 @@ async def rfc3339(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def rfc7231(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def rfc7231(self, **kwargs: Any) -> None: """rfc7231. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1363,14 +1343,14 @@ async def rfc7231(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace_async - async def unix_timestamp(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def unix_timestamp(self, **kwargs: Any) -> None: """unix_timestamp. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/models/_models.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/models/_models.py index 76729ad09d5..ac9589a1548 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/models/_models.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/operations/_operations.py index b4343f15107..2996c9fc619 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -307,7 +307,7 @@ def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -356,7 +356,7 @@ def rfc3339( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -405,7 +405,7 @@ def rfc7231( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -454,7 +454,7 @@ def unix_timestamp( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -503,7 +503,7 @@ def unix_timestamp_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -618,7 +618,7 @@ def default( :rtype: ~encode.datetime.models.DefaultDatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -736,7 +736,7 @@ def rfc3339( :rtype: ~encode.datetime.models.Rfc3339DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,7 +854,7 @@ def rfc7231( :rtype: ~encode.datetime.models.Rfc7231DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -977,7 +977,7 @@ def unix_timestamp( :rtype: ~encode.datetime.models.UnixTimestampDatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1100,7 +1100,7 @@ def unix_timestamp_array( :rtype: ~encode.datetime.models.UnixTimestampArrayDatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1188,7 +1188,7 @@ def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1237,7 +1237,7 @@ def rfc3339( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1286,7 +1286,7 @@ def rfc7231( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1335,7 +1335,7 @@ def unix_timestamp( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1384,7 +1384,7 @@ def unix_timestamp_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1447,7 +1447,7 @@ def default(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1494,7 +1494,7 @@ def rfc3339(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1541,7 +1541,7 @@ def rfc7231(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1588,7 +1588,7 @@ def unix_timestamp(self, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_model_base.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_model_base.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_serialization.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_serialization.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/_operations.py index 7393cd572c8..e8532aebfca 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -53,7 +53,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -77,9 +77,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def default( # pylint: disable=inconsistent-return-statements - self, *, input: datetime.timedelta, **kwargs: Any - ) -> None: + async def default(self, *, input: datetime.timedelta, **kwargs: Any) -> None: """default. :keyword input: Required. @@ -88,7 +86,7 @@ async def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -126,9 +124,7 @@ async def default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def iso8601( # pylint: disable=inconsistent-return-statements - self, *, input: datetime.timedelta, **kwargs: Any - ) -> None: + async def iso8601(self, *, input: datetime.timedelta, **kwargs: Any) -> None: """iso8601. :keyword input: Required. @@ -137,7 +133,7 @@ async def iso8601( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -175,9 +171,7 @@ async def iso8601( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def int32_seconds( # pylint: disable=inconsistent-return-statements - self, *, input: int, **kwargs: Any - ) -> None: + async def int32_seconds(self, *, input: int, **kwargs: Any) -> None: """int32_seconds. :keyword input: Required. @@ -186,7 +180,7 @@ async def int32_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -224,9 +218,7 @@ async def int32_seconds( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_seconds( # pylint: disable=inconsistent-return-statements - self, *, input: float, **kwargs: Any - ) -> None: + async def float_seconds(self, *, input: float, **kwargs: Any) -> None: """float_seconds. :keyword input: Required. @@ -235,7 +227,7 @@ async def float_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -273,9 +265,7 @@ async def float_seconds( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float64_seconds( # pylint: disable=inconsistent-return-statements - self, *, input: float, **kwargs: Any - ) -> None: + async def float64_seconds(self, *, input: float, **kwargs: Any) -> None: """float64_seconds. :keyword input: Required. @@ -284,7 +274,7 @@ async def float64_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -322,9 +312,7 @@ async def float64_seconds( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def int32_seconds_array( # pylint: disable=inconsistent-return-statements - self, *, input: List[int], **kwargs: Any - ) -> None: + async def int32_seconds_array(self, *, input: List[int], **kwargs: Any) -> None: """int32_seconds_array. :keyword input: Required. @@ -333,7 +321,7 @@ async def int32_seconds_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -448,7 +436,7 @@ async def default( :rtype: ~encode.duration.models.DefaultDurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -566,7 +554,7 @@ async def iso8601( :rtype: ~encode.duration.models.ISO8601DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -689,7 +677,7 @@ async def int32_seconds( :rtype: ~encode.duration.models.Int32SecondsDurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -812,7 +800,7 @@ async def float_seconds( :rtype: ~encode.duration.models.FloatSecondsDurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -935,7 +923,7 @@ async def float64_seconds( :rtype: ~encode.duration.models.Float64SecondsDurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1058,7 +1046,7 @@ async def float_seconds_array( :rtype: ~encode.duration.models.FloatSecondsDurationArrayProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1135,9 +1123,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def default( # pylint: disable=inconsistent-return-statements - self, *, duration: datetime.timedelta, **kwargs: Any - ) -> None: + async def default(self, *, duration: datetime.timedelta, **kwargs: Any) -> None: """default. :keyword duration: Required. @@ -1146,7 +1132,7 @@ async def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1184,9 +1170,7 @@ async def default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def iso8601( # pylint: disable=inconsistent-return-statements - self, *, duration: datetime.timedelta, **kwargs: Any - ) -> None: + async def iso8601(self, *, duration: datetime.timedelta, **kwargs: Any) -> None: """iso8601. :keyword duration: Required. @@ -1195,7 +1179,7 @@ async def iso8601( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1233,9 +1217,7 @@ async def iso8601( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def iso8601_array( # pylint: disable=inconsistent-return-statements - self, *, duration: List[datetime.timedelta], **kwargs: Any - ) -> None: + async def iso8601_array(self, *, duration: List[datetime.timedelta], **kwargs: Any) -> None: """iso8601_array. :keyword duration: Required. @@ -1244,7 +1226,7 @@ async def iso8601_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1282,9 +1264,7 @@ async def iso8601_array( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def int32_seconds( # pylint: disable=inconsistent-return-statements - self, *, duration: int, **kwargs: Any - ) -> None: + async def int32_seconds(self, *, duration: int, **kwargs: Any) -> None: """int32_seconds. :keyword duration: Required. @@ -1293,7 +1273,7 @@ async def int32_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1331,9 +1311,7 @@ async def int32_seconds( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float_seconds( # pylint: disable=inconsistent-return-statements - self, *, duration: float, **kwargs: Any - ) -> None: + async def float_seconds(self, *, duration: float, **kwargs: Any) -> None: """float_seconds. :keyword duration: Required. @@ -1342,7 +1320,7 @@ async def float_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1380,9 +1358,7 @@ async def float_seconds( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def float64_seconds( # pylint: disable=inconsistent-return-statements - self, *, duration: float, **kwargs: Any - ) -> None: + async def float64_seconds(self, *, duration: float, **kwargs: Any) -> None: """float64_seconds. :keyword duration: Required. @@ -1391,7 +1367,7 @@ async def float64_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/models/_models.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/models/_models.py index 4d9db646710..1edc84f94d7 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/models/_models.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/_operations.py index 8714d80471e..76c715f7fec 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -318,7 +318,7 @@ def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -367,7 +367,7 @@ def iso8601( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -414,7 +414,7 @@ def int32_seconds(self, *, input: int, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -461,7 +461,7 @@ def float_seconds(self, *, input: float, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -508,7 +508,7 @@ def float64_seconds(self, *, input: float, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -557,7 +557,7 @@ def int32_seconds_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -672,7 +672,7 @@ def default( :rtype: ~encode.duration.models.DefaultDurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -790,7 +790,7 @@ def iso8601( :rtype: ~encode.duration.models.ISO8601DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -913,7 +913,7 @@ def int32_seconds( :rtype: ~encode.duration.models.Int32SecondsDurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1036,7 +1036,7 @@ def float_seconds( :rtype: ~encode.duration.models.FloatSecondsDurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1159,7 +1159,7 @@ def float64_seconds( :rtype: ~encode.duration.models.Float64SecondsDurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1282,7 +1282,7 @@ def float_seconds_array( :rtype: ~encode.duration.models.FloatSecondsDurationArrayProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1370,7 +1370,7 @@ def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1419,7 +1419,7 @@ def iso8601( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1468,7 +1468,7 @@ def iso8601_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1515,7 +1515,7 @@ def int32_seconds(self, *, duration: int, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1564,7 +1564,7 @@ def float_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1613,7 +1613,7 @@ def float64_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_model_base.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_model_base.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_serialization.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_serialization.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/_operations.py index 454ff4b7055..4eb087de0f4 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -120,7 +119,7 @@ async def safeint_as_string( :rtype: ~encode.numeric.models.SafeintAsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -238,7 +237,7 @@ async def uint32_as_string_optional( :rtype: ~encode.numeric.models.Uint32AsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -356,7 +355,7 @@ async def uint8_as_string( :rtype: ~encode.numeric.models.Uint8AsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/models/_models.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/models/_models.py index 3e259d9b614..100ea2f8b8a 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/models/_models.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/_operations.py index ccbe2981463..0fa2dfab05b 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -170,7 +169,7 @@ def safeint_as_string( :rtype: ~encode.numeric.models.SafeintAsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +287,7 @@ def uint32_as_string_optional( :rtype: ~encode.numeric.models.Uint32AsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -406,7 +405,7 @@ def uint8_as_string( :rtype: ~encode.numeric.models.Uint8AsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_configuration.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_configuration.py index a5ccf5e34c3..feffa1dfda3 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_configuration.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_operations/_operations.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_operations/_operations.py index 4303f1ab21d..65032d2250e 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -209,7 +208,7 @@ def get_model( :rtype: ~headasbooleanfalse.models.VisibilityModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +267,7 @@ def get_model( return deserialized # type: ignore @overload - def head_model( # pylint: disable=inconsistent-return-statements + def head_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """head_model. @@ -284,9 +283,7 @@ def head_model( # pylint: disable=inconsistent-return-statements """ @overload - def head_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def head_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """head_model. :param input: Required. @@ -300,9 +297,7 @@ def head_model( # pylint: disable=inconsistent-return-statements """ @overload - def head_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def head_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """head_model. :param input: Required. @@ -327,7 +322,7 @@ def head_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -374,7 +369,7 @@ def head_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_model( # pylint: disable=inconsistent-return-statements + def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -390,9 +385,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -406,9 +399,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -433,7 +424,7 @@ def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -480,7 +471,7 @@ def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_model( # pylint: disable=inconsistent-return-statements + def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -496,9 +487,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -512,9 +501,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -539,7 +526,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -586,7 +573,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def post_model( # pylint: disable=inconsistent-return-statements + def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -602,9 +589,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -618,9 +603,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -645,7 +628,7 @@ def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -692,7 +675,7 @@ def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def delete_model( # pylint: disable=inconsistent-return-statements + def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -708,9 +691,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -724,9 +705,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -751,7 +730,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -857,7 +836,7 @@ def put_read_only_model( :rtype: ~headasbooleanfalse.models.ReadOnlyModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_serialization.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_serialization.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_vendor.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_vendor.py index ce279851825..f3eb127559a 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_vendor.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_configuration.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_configuration.py index 1eae7adbbde..f3dd4f1306e 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/_operations.py index a7a0f6b0b16..5d4a59c4be5 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -110,7 +109,7 @@ async def get_model( :rtype: ~headasbooleanfalse.models.VisibilityModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -169,7 +168,7 @@ async def get_model( return deserialized # type: ignore @overload - async def head_model( # pylint: disable=inconsistent-return-statements + async def head_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """head_model. @@ -185,9 +184,7 @@ async def head_model( # pylint: disable=inconsistent-return-statements """ @overload - async def head_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def head_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """head_model. :param input: Required. @@ -201,9 +198,7 @@ async def head_model( # pylint: disable=inconsistent-return-statements """ @overload - async def head_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def head_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """head_model. :param input: Required. @@ -217,9 +212,7 @@ async def head_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def head_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """head_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -228,7 +221,7 @@ async def head_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -275,7 +268,7 @@ async def head_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_model( # pylint: disable=inconsistent-return-statements + async def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -291,9 +284,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -307,9 +298,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -323,9 +312,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """put_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -334,7 +321,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -381,7 +368,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_model( # pylint: disable=inconsistent-return-statements + async def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -397,9 +384,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -413,9 +398,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -429,9 +412,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """patch_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -440,7 +421,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -487,7 +468,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_model( # pylint: disable=inconsistent-return-statements + async def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -503,9 +484,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -519,9 +498,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -535,9 +512,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """post_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -546,7 +521,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -593,7 +568,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def delete_model( # pylint: disable=inconsistent-return-statements + async def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -609,9 +584,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -625,9 +598,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -641,9 +612,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def delete_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """delete_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -652,7 +621,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -758,7 +727,7 @@ async def put_read_only_model( :rtype: ~headasbooleanfalse.models.ReadOnlyModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_vendor.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_vendor.py index c80671baabf..59219e20434 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/models/_models.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/models/_models.py index 5a99a68854e..782540fb08d 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/models/_models.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_configuration.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_configuration.py index 100167b2b68..53fecf4e7b8 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_configuration.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_model_base.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_model_base.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_operations/_operations.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_operations/_operations.py index 0e88a01b39c..0cb3b5a6e32 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -209,7 +208,7 @@ def get_model( :rtype: ~headasbooleantrue.models.VisibilityModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -321,7 +320,7 @@ def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **k :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +368,7 @@ def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **k return 200 <= response.status_code <= 299 @overload - def put_model( # pylint: disable=inconsistent-return-statements + def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -385,9 +384,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -401,9 +398,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -428,7 +423,7 @@ def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -475,7 +470,7 @@ def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_model( # pylint: disable=inconsistent-return-statements + def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -491,9 +486,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -507,9 +500,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -534,7 +525,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -581,7 +572,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def post_model( # pylint: disable=inconsistent-return-statements + def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -597,9 +588,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -613,9 +602,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -640,7 +627,7 @@ def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -687,7 +674,7 @@ def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def delete_model( # pylint: disable=inconsistent-return-statements + def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -703,9 +690,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -719,9 +704,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -746,7 +729,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,7 +835,7 @@ def put_read_only_model( :rtype: ~headasbooleantrue.models.ReadOnlyModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_serialization.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_serialization.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_vendor.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_vendor.py index ce279851825..f3eb127559a 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_vendor.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_configuration.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_configuration.py index 49e7a260e06..1311d06e524 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_operations/_operations.py index 4adfeb7978e..396846323f5 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -110,7 +109,7 @@ async def get_model( :rtype: ~headasbooleantrue.models.VisibilityModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -222,7 +221,7 @@ async def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes] :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,7 +269,7 @@ async def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes] return 200 <= response.status_code <= 299 @overload - async def put_model( # pylint: disable=inconsistent-return-statements + async def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -286,9 +285,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -302,9 +299,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -318,9 +313,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """put_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -329,7 +322,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -376,7 +369,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_model( # pylint: disable=inconsistent-return-statements + async def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -392,9 +385,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -408,9 +399,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -424,9 +413,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """patch_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -435,7 +422,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,7 +469,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_model( # pylint: disable=inconsistent-return-statements + async def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -498,9 +485,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -514,9 +499,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -530,9 +513,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """post_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -541,7 +522,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -588,7 +569,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def delete_model( # pylint: disable=inconsistent-return-statements + async def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -604,9 +585,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -620,9 +599,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -636,9 +613,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def delete_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """delete_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -647,7 +622,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -753,7 +728,7 @@ async def put_read_only_model( :rtype: ~headasbooleantrue.models.ReadOnlyModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_vendor.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_vendor.py index c80671baabf..59219e20434 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/models/_models.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/models/_models.py index 5a99a68854e..782540fb08d 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/models/_models.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_model_base.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_model_base.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_serialization.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_serialization.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/_operations.py index 8a28f2bdc9e..515fec47d4d 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,9 +55,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, body: _models.User, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, body: _models.User, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -72,9 +69,7 @@ async def simple( # pylint: disable=inconsistent-return-statements """ @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -88,9 +83,7 @@ async def simple( # pylint: disable=inconsistent-return-statements """ @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -104,9 +97,7 @@ async def simple( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def simple( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.User, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def simple(self, body: Union[_models.User, JSON, IO[bytes]], **kwargs: Any) -> None: """simple. :param body: Is one of the following types: User, JSON, IO[bytes] Required. @@ -115,7 +106,7 @@ async def simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -180,9 +171,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -196,9 +185,7 @@ async def simple( # pylint: disable=inconsistent-return-statements """ @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :keyword name: Required. @@ -212,9 +199,7 @@ async def simple( # pylint: disable=inconsistent-return-statements """ @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -228,9 +213,7 @@ async def simple( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def simple( # pylint: disable=inconsistent-return-statements - self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, **kwargs: Any - ) -> None: + async def simple(self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, **kwargs: Any) -> None: """simple. :param body: Is either a JSON type or a IO[bytes] type. Required. @@ -241,7 +224,7 @@ async def simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/models/_models.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/models/_models.py index c86dd370a1a..428a8f759b0 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/models/_models.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/_operations.py index 65af21ae497..cf57e7d3599 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -87,9 +86,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def simple( # pylint: disable=inconsistent-return-statements - self, body: _models.User, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, body: _models.User, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -103,9 +100,7 @@ def simple( # pylint: disable=inconsistent-return-statements """ @overload - def simple( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -119,9 +114,7 @@ def simple( # pylint: disable=inconsistent-return-statements """ @overload - def simple( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -146,7 +139,7 @@ def simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -211,9 +204,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def simple( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -227,9 +218,7 @@ def simple( # pylint: disable=inconsistent-return-statements """ @overload - def simple( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :keyword name: Required. @@ -243,9 +232,7 @@ def simple( # pylint: disable=inconsistent-return-statements """ @overload - def simple( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -272,7 +259,7 @@ def simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_configuration.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_configuration.py index 38dbb09da49..4841edbd6db 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_configuration.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class BodyOptionalityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class BodyOptionalityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for BodyOptionalityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_serialization.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_serialization.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_vendor.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_vendor.py index d7d755f1b60..b3061844306 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_vendor.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import BodyOptionalityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_configuration.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_configuration.py index 3404653a7ca..51038512922 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class BodyOptionalityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class BodyOptionalityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for BodyOptionalityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_vendor.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_vendor.py index 4caf8c277fc..7ed4ad1471a 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import BodyOptionalityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/operations/_operations.py index dd16a4c3dcc..0990ea8e2aa 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,7 +61,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def set( # pylint: disable=inconsistent-return-statements + async def set( self, body: Optional[_models.BodyModel] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """set. @@ -78,9 +77,7 @@ async def set( # pylint: disable=inconsistent-return-statements """ @overload - async def set( # pylint: disable=inconsistent-return-statements - self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def set(self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """set. :param body: Default value is None. @@ -94,7 +91,7 @@ async def set( # pylint: disable=inconsistent-return-statements """ @overload - async def set( # pylint: disable=inconsistent-return-statements + async def set( self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """set. @@ -110,9 +107,7 @@ async def set( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def set( # pylint: disable=inconsistent-return-statements - self, body: Optional[Union[_models.BodyModel, JSON, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def set(self, body: Optional[Union[_models.BodyModel, JSON, IO[bytes]]] = None, **kwargs: Any) -> None: """set. :param body: Is one of the following types: BodyModel, JSON, IO[bytes] Default value is None. @@ -121,7 +116,7 @@ async def set( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -171,7 +166,7 @@ async def set( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def omit( # pylint: disable=inconsistent-return-statements + async def omit( self, body: Optional[_models.BodyModel] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """omit. @@ -187,9 +182,7 @@ async def omit( # pylint: disable=inconsistent-return-statements """ @overload - async def omit( # pylint: disable=inconsistent-return-statements - self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def omit(self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """omit. :param body: Default value is None. @@ -203,7 +196,7 @@ async def omit( # pylint: disable=inconsistent-return-statements """ @overload - async def omit( # pylint: disable=inconsistent-return-statements + async def omit( self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """omit. @@ -219,9 +212,7 @@ async def omit( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def omit( # pylint: disable=inconsistent-return-statements - self, body: Optional[Union[_models.BodyModel, JSON, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def omit(self, body: Optional[Union[_models.BodyModel, JSON, IO[bytes]]] = None, **kwargs: Any) -> None: """omit. :param body: Is one of the following types: BodyModel, JSON, IO[bytes] Default value is None. @@ -230,7 +221,7 @@ async def omit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -283,7 +274,7 @@ async def omit( # pylint: disable=inconsistent-return-statements class BodyOptionalityClientOperationsMixin(BodyOptionalityClientMixinABC): @overload - async def required_explicit( # pylint: disable=inconsistent-return-statements + async def required_explicit( self, body: _models.BodyModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """required_explicit. @@ -299,9 +290,7 @@ async def required_explicit( # pylint: disable=inconsistent-return-statements """ @overload - async def required_explicit( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def required_explicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """required_explicit. :param body: Required. @@ -315,7 +304,7 @@ async def required_explicit( # pylint: disable=inconsistent-return-statements """ @overload - async def required_explicit( # pylint: disable=inconsistent-return-statements + async def required_explicit( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """required_explicit. @@ -331,9 +320,7 @@ async def required_explicit( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def required_explicit( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BodyModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def required_explicit(self, body: Union[_models.BodyModel, JSON, IO[bytes]], **kwargs: Any) -> None: """required_explicit. :param body: Is one of the following types: BodyModel, JSON, IO[bytes] Required. @@ -342,7 +329,7 @@ async def required_explicit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -389,9 +376,7 @@ async def required_explicit( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def required_implicit( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def required_implicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """required_implicit. :param body: Required. @@ -405,9 +390,7 @@ async def required_implicit( # pylint: disable=inconsistent-return-statements """ @overload - async def required_implicit( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def required_implicit(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """required_implicit. :keyword name: Required. @@ -421,7 +404,7 @@ async def required_implicit( # pylint: disable=inconsistent-return-statements """ @overload - async def required_implicit( # pylint: disable=inconsistent-return-statements + async def required_implicit( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """required_implicit. @@ -437,7 +420,7 @@ async def required_implicit( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def required_implicit( # pylint: disable=inconsistent-return-statements + async def required_implicit( self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, **kwargs: Any ) -> None: """required_implicit. @@ -450,7 +433,7 @@ async def required_implicit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/models/_models.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/models/_models.py index faa01103044..0616cc377e3 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/models/_models.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/operations/_operations.py index f977386e958..5518c5ced0b 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -116,7 +115,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def set( # pylint: disable=inconsistent-return-statements + def set( self, body: Optional[_models.BodyModel] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """set. @@ -132,9 +131,7 @@ def set( # pylint: disable=inconsistent-return-statements """ @overload - def set( # pylint: disable=inconsistent-return-statements - self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def set(self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """set. :param body: Default value is None. @@ -148,9 +145,7 @@ def set( # pylint: disable=inconsistent-return-statements """ @overload - def set( # pylint: disable=inconsistent-return-statements - self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def set(self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """set. :param body: Default value is None. @@ -175,7 +170,7 @@ def set( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,7 +220,7 @@ def set( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def omit( # pylint: disable=inconsistent-return-statements + def omit( self, body: Optional[_models.BodyModel] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """omit. @@ -241,9 +236,7 @@ def omit( # pylint: disable=inconsistent-return-statements """ @overload - def omit( # pylint: disable=inconsistent-return-statements - self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def omit(self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """omit. :param body: Default value is None. @@ -257,9 +250,7 @@ def omit( # pylint: disable=inconsistent-return-statements """ @overload - def omit( # pylint: disable=inconsistent-return-statements - self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def omit(self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """omit. :param body: Default value is None. @@ -284,7 +275,7 @@ def omit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -337,7 +328,7 @@ def omit( # pylint: disable=inconsistent-return-statements class BodyOptionalityClientOperationsMixin(BodyOptionalityClientMixinABC): @overload - def required_explicit( # pylint: disable=inconsistent-return-statements + def required_explicit( self, body: _models.BodyModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """required_explicit. @@ -353,9 +344,7 @@ def required_explicit( # pylint: disable=inconsistent-return-statements """ @overload - def required_explicit( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def required_explicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """required_explicit. :param body: Required. @@ -369,9 +358,7 @@ def required_explicit( # pylint: disable=inconsistent-return-statements """ @overload - def required_explicit( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def required_explicit(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """required_explicit. :param body: Required. @@ -396,7 +383,7 @@ def required_explicit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -443,9 +430,7 @@ def required_explicit( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def required_implicit( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def required_implicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """required_implicit. :param body: Required. @@ -459,9 +444,7 @@ def required_implicit( # pylint: disable=inconsistent-return-statements """ @overload - def required_implicit( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + def required_implicit(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """required_implicit. :keyword name: Required. @@ -475,9 +458,7 @@ def required_implicit( # pylint: disable=inconsistent-return-statements """ @overload - def required_implicit( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def required_implicit(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """required_implicit. :param body: Required. @@ -504,7 +485,7 @@ def required_implicit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_configuration.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_configuration.py index 78644946387..c82f9362a86 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_configuration.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class CollectionFormatClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class CollectionFormatClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for CollectionFormatClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_model_base.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_model_base.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_serialization.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_serialization.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/_configuration.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/_configuration.py index 3f26f2a18c1..5c8570e2568 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class CollectionFormatClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class CollectionFormatClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for CollectionFormatClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/operations/_operations.py index c064d1a7af6..2f4b985f9f9 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,9 +55,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def multi( # pylint: disable=inconsistent-return-statements - self, *, colors: List[str], **kwargs: Any - ) -> None: + async def multi(self, *, colors: List[str], **kwargs: Any) -> None: """multi. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -67,7 +64,7 @@ async def multi( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -105,7 +102,7 @@ async def multi( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def ssv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def ssv(self, *, colors: List[str], **kwargs: Any) -> None: """ssv. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -114,7 +111,7 @@ async def ssv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -152,7 +149,7 @@ async def ssv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def tsv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def tsv(self, *, colors: List[str], **kwargs: Any) -> None: """tsv. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -161,7 +158,7 @@ async def tsv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -199,9 +196,7 @@ async def tsv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def pipes( # pylint: disable=inconsistent-return-statements - self, *, colors: List[str], **kwargs: Any - ) -> None: + async def pipes(self, *, colors: List[str], **kwargs: Any) -> None: """pipes. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -210,7 +205,7 @@ async def pipes( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -248,7 +243,7 @@ async def pipes( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def csv(self, *, colors: List[str], **kwargs: Any) -> None: """csv. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -257,7 +252,7 @@ async def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -313,7 +308,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def csv(self, *, colors: List[str], **kwargs: Any) -> None: """csv. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -322,7 +317,7 @@ async def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/operations/_operations.py index 92d79cf5989..0a65c2da7fe 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -134,7 +133,7 @@ def multi(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -181,7 +180,7 @@ def ssv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -228,7 +227,7 @@ def tsv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -275,7 +274,7 @@ def pipes(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -322,7 +321,7 @@ def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -387,7 +386,7 @@ def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_model_base.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_model_base.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_serialization.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_serialization.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/_operations.py index e1799194e5b..17b86cf9088 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -42,7 +42,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -67,7 +67,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_body. @@ -83,9 +83,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme """ @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def spread_as_request_body(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :keyword name: Required. @@ -99,7 +97,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme """ @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_body. @@ -115,7 +113,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme """ @distributed_trace_async - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, **kwargs: Any ) -> None: """spread_as_request_body. @@ -128,7 +126,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -180,7 +178,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_only_with_body( self, body: _models.BodyParameter, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -196,7 +194,7 @@ async def spread_composite_request_only_with_body( # pylint: disable=inconsiste """ @overload - async def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_only_with_body( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -212,7 +210,7 @@ async def spread_composite_request_only_with_body( # pylint: disable=inconsiste """ @overload - async def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_only_with_body( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -228,7 +226,7 @@ async def spread_composite_request_only_with_body( # pylint: disable=inconsiste """ @distributed_trace_async - async def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_only_with_body( self, body: Union[_models.BodyParameter, JSON, IO[bytes]], **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -239,7 +237,7 @@ async def spread_composite_request_only_with_body( # pylint: disable=inconsiste :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -286,9 +284,7 @@ async def spread_composite_request_only_with_body( # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def spread_composite_request_without_body( # pylint: disable=inconsistent-return-statements - self, name: str, *, test_header: str, **kwargs: Any - ) -> None: + async def spread_composite_request_without_body(self, name: str, *, test_header: str, **kwargs: Any) -> None: """spread_composite_request_without_body. :param name: Required. @@ -299,7 +295,7 @@ async def spread_composite_request_without_body( # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -338,7 +334,7 @@ async def spread_composite_request_without_body( # pylint: disable=inconsistent return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_composite_request( # pylint: disable=inconsistent-return-statements + async def spread_composite_request( self, name: str, body: _models.BodyParameter, @@ -364,7 +360,7 @@ async def spread_composite_request( # pylint: disable=inconsistent-return-state """ @overload - async def spread_composite_request( # pylint: disable=inconsistent-return-statements + async def spread_composite_request( self, name: str, body: JSON, *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request. @@ -384,7 +380,7 @@ async def spread_composite_request( # pylint: disable=inconsistent-return-state """ @overload - async def spread_composite_request( # pylint: disable=inconsistent-return-statements + async def spread_composite_request( self, name: str, body: IO[bytes], *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request. @@ -404,7 +400,7 @@ async def spread_composite_request( # pylint: disable=inconsistent-return-state """ @distributed_trace_async - async def spread_composite_request( # pylint: disable=inconsistent-return-statements + async def spread_composite_request( self, name: str, body: Union[_models.BodyParameter, JSON, IO[bytes]], *, test_header: str, **kwargs: Any ) -> None: """spread_composite_request. @@ -419,7 +415,7 @@ async def spread_composite_request( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,7 +464,7 @@ async def spread_composite_request( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_mix( self, name: str, body: JSON, *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -488,7 +484,7 @@ async def spread_composite_request_mix( # pylint: disable=inconsistent-return-s """ @overload - async def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_mix( self, name: str, *, test_header: str, prop: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -508,7 +504,7 @@ async def spread_composite_request_mix( # pylint: disable=inconsistent-return-s """ @overload - async def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_mix( self, name: str, body: IO[bytes], *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -528,7 +524,7 @@ async def spread_composite_request_mix( # pylint: disable=inconsistent-return-s """ @distributed_trace_async - async def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_mix( self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, test_header: str, prop: str = _Unset, **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -545,7 +541,7 @@ async def spread_composite_request_mix( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -617,7 +613,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_body. @@ -633,9 +629,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme """ @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def spread_as_request_body(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :keyword name: Required. @@ -649,7 +643,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme """ @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_body. @@ -665,7 +659,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme """ @distributed_trace_async - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, **kwargs: Any ) -> None: """spread_as_request_body. @@ -678,7 +672,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -730,7 +724,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_model( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -750,7 +744,7 @@ async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-ret """ @overload - async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_model( self, id: str, *, x_ms_test_header: str, name: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -770,7 +764,7 @@ async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-ret """ @overload - async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_model( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -790,7 +784,7 @@ async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_model( self, id: str, body: Union[JSON, IO[bytes]] = _Unset, @@ -813,7 +807,7 @@ async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -867,7 +861,7 @@ async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-ret return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + async def spread_as_request_parameter( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -887,7 +881,7 @@ async def spread_as_request_parameter( # pylint: disable=inconsistent-return-st """ @overload - async def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + async def spread_as_request_parameter( self, id: str, *, x_ms_test_header: str, name: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -907,7 +901,7 @@ async def spread_as_request_parameter( # pylint: disable=inconsistent-return-st """ @overload - async def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + async def spread_as_request_parameter( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -927,7 +921,7 @@ async def spread_as_request_parameter( # pylint: disable=inconsistent-return-st """ @distributed_trace_async - async def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + async def spread_as_request_parameter( self, id: str, body: Union[JSON, IO[bytes]] = _Unset, @@ -950,7 +944,7 @@ async def spread_as_request_parameter( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1004,7 +998,7 @@ async def spread_as_request_parameter( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + async def spread_with_multiple_parameters( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_with_multiple_parameters. @@ -1024,7 +1018,7 @@ async def spread_with_multiple_parameters( # pylint: disable=inconsistent-retur """ @overload - async def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + async def spread_with_multiple_parameters( self, id: str, *, @@ -1059,7 +1053,7 @@ async def spread_with_multiple_parameters( # pylint: disable=inconsistent-retur """ @overload - async def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + async def spread_with_multiple_parameters( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_with_multiple_parameters. @@ -1079,7 +1073,7 @@ async def spread_with_multiple_parameters( # pylint: disable=inconsistent-retur """ @distributed_trace_async - async def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + async def spread_with_multiple_parameters( self, id: str, body: Union[JSON, IO[bytes]] = _Unset, @@ -1111,7 +1105,7 @@ async def spread_with_multiple_parameters( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1172,7 +1166,7 @@ async def spread_with_multiple_parameters( # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_alias( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread an alias with contains another alias property as body. @@ -1192,7 +1186,7 @@ async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-ret """ @overload - async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_alias( self, id: str, *, @@ -1221,7 +1215,7 @@ async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-ret """ @overload - async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_alias( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread an alias with contains another alias property as body. @@ -1241,7 +1235,7 @@ async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_alias( self, id: str, body: Union[JSON, IO[bytes]] = _Unset, @@ -1267,7 +1261,7 @@ async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/models/_models.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/models/_models.py index 9cc60f9f33a..f589482f9bb 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/models/_models.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/_operations.py index 7e7d50b58a2..22a2cfc704b 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -254,9 +254,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :param body: Required. @@ -270,9 +268,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements """ @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :keyword name: Required. @@ -286,9 +282,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements """ @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :param body: Required. @@ -315,7 +309,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -367,7 +361,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + def spread_composite_request_only_with_body( self, body: _models.BodyParameter, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -383,7 +377,7 @@ def spread_composite_request_only_with_body( # pylint: disable=inconsistent-ret """ @overload - def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + def spread_composite_request_only_with_body( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -399,7 +393,7 @@ def spread_composite_request_only_with_body( # pylint: disable=inconsistent-ret """ @overload - def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + def spread_composite_request_only_with_body( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -426,7 +420,7 @@ def spread_composite_request_only_with_body( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -486,7 +480,7 @@ def spread_composite_request_without_body( # pylint: disable=inconsistent-retur :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -525,7 +519,7 @@ def spread_composite_request_without_body( # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_composite_request( # pylint: disable=inconsistent-return-statements + def spread_composite_request( self, name: str, body: _models.BodyParameter, @@ -551,7 +545,7 @@ def spread_composite_request( # pylint: disable=inconsistent-return-statements """ @overload - def spread_composite_request( # pylint: disable=inconsistent-return-statements + def spread_composite_request( self, name: str, body: JSON, *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request. @@ -571,7 +565,7 @@ def spread_composite_request( # pylint: disable=inconsistent-return-statements """ @overload - def spread_composite_request( # pylint: disable=inconsistent-return-statements + def spread_composite_request( self, name: str, body: IO[bytes], *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request. @@ -606,7 +600,7 @@ def spread_composite_request( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -655,7 +649,7 @@ def spread_composite_request( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + def spread_composite_request_mix( self, name: str, body: JSON, *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -675,7 +669,7 @@ def spread_composite_request_mix( # pylint: disable=inconsistent-return-stateme """ @overload - def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + def spread_composite_request_mix( self, name: str, *, test_header: str, prop: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -695,7 +689,7 @@ def spread_composite_request_mix( # pylint: disable=inconsistent-return-stateme """ @overload - def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + def spread_composite_request_mix( self, name: str, body: IO[bytes], *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -732,7 +726,7 @@ def spread_composite_request_mix( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -804,9 +798,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :param body: Required. @@ -820,9 +812,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements """ @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :keyword name: Required. @@ -836,9 +826,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements """ @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :param body: Required. @@ -865,7 +853,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -917,7 +905,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_model( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -937,7 +925,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st """ @overload - def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_model( self, id: str, *, x_ms_test_header: str, name: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -957,7 +945,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st """ @overload - def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_model( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -1000,7 +988,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1054,7 +1042,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + def spread_as_request_parameter( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -1074,7 +1062,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen """ @overload - def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + def spread_as_request_parameter( self, id: str, *, x_ms_test_header: str, name: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -1094,7 +1082,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen """ @overload - def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + def spread_as_request_parameter( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -1137,7 +1125,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1191,7 +1179,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + def spread_with_multiple_parameters( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_with_multiple_parameters. @@ -1211,7 +1199,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat """ @overload - def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + def spread_with_multiple_parameters( self, id: str, *, @@ -1246,7 +1234,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat """ @overload - def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + def spread_with_multiple_parameters( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_with_multiple_parameters. @@ -1298,7 +1286,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1359,7 +1347,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_alias( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread an alias with contains another alias property as body. @@ -1379,7 +1367,7 @@ def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-st """ @overload - def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_alias( self, id: str, *, @@ -1408,7 +1396,7 @@ def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-st """ @overload - def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_alias( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread an alias with contains another alias property as body. @@ -1454,7 +1442,7 @@ def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_configuration.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_configuration.py index 9c39004be6a..489e574c361 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_configuration.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ContentNegotiationClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ContentNegotiationClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ContentNegotiationClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_serialization.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_serialization.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/_configuration.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/_configuration.py index 00393bc5d90..fde9868ffe3 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ContentNegotiationClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ContentNegotiationClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ContentNegotiationClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py index 09e235970ae..5b5aae2ca76 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterator, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, AsyncIterator, Callable, Dict, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ async def get_avatar_as_png(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -124,7 +123,7 @@ async def get_avatar_as_jpeg(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -200,7 +199,7 @@ async def get_avatar_as_png(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -258,7 +257,7 @@ async def get_avatar_as_json(self, **kwargs: Any) -> _models.PngImageAsJson: :rtype: ~payload.contentnegotiation.models.PngImageAsJson :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py index 494ca7fe6b9..d26adcfbfdd 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py index 603402a7196..1fb901312df 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterator, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterator, Literal, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -116,7 +115,7 @@ def get_avatar_as_png(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -174,7 +173,7 @@ def get_avatar_as_jpeg(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -250,7 +249,7 @@ def get_avatar_as_png(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -308,7 +307,7 @@ def get_avatar_as_json(self, **kwargs: Any) -> _models.PngImageAsJson: :rtype: ~payload.contentnegotiation.models.PngImageAsJson :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_configuration.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_configuration.py index 467fe18079e..d072e6e2869 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_configuration.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class JsonMergePatchClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class JsonMergePatchClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for JsonMergePatchClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/_operations.py index cd7ff053493..f1723c75eda 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -154,7 +153,7 @@ def create_resource(self, body: Union[_models.Resource, JSON, IO[bytes]], **kwar :rtype: ~payload.jsonmergepatch.models.Resource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,7 +269,7 @@ def update_resource(self, body: Union[_models.ResourcePatch, JSON, IO[bytes]], * :rtype: ~payload.jsonmergepatch.models.Resource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -393,7 +392,7 @@ def update_optional_resource( :rtype: ~payload.jsonmergepatch.models.Resource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_serialization.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_serialization.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_vendor.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_vendor.py index c0daee8ad62..fe248e82828 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_vendor.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import JsonMergePatchClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_configuration.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_configuration.py index 5607257cb2b..85e73bbd3d6 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class JsonMergePatchClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class JsonMergePatchClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for JsonMergePatchClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/_operations.py index bca3ff72c6f..76849082264 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -104,7 +103,7 @@ async def create_resource(self, body: Union[_models.Resource, JSON, IO[bytes]], :rtype: ~payload.jsonmergepatch.models.Resource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -222,7 +221,7 @@ async def update_resource( :rtype: ~payload.jsonmergepatch.models.Resource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -345,7 +344,7 @@ async def update_optional_resource( :rtype: ~payload.jsonmergepatch.models.Resource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_vendor.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_vendor.py index bdda80a39f4..48a6bf8b21a 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import JsonMergePatchClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/models/_models.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/models/_models.py index 8ccade078b4..3c4cfea5a84 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/models/_models.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_configuration.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_configuration.py index be562ab5707..ea3f301a76c 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_configuration.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class MediaTypeClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MediaTypeClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MediaTypeClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_model_base.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_serialization.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_serialization.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/_configuration.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/_configuration.py index d3e54d40a30..f65787c362f 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class MediaTypeClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MediaTypeClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MediaTypeClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/operations/_operations.py index b53e5022d1a..dca5b41ca90 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,7 +58,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def send_as_text(self, text: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def send_as_text(self, text: str, **kwargs: Any) -> None: """send_as_text. :param text: Required. @@ -68,7 +67,7 @@ async def send_as_text(self, text: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -117,7 +116,7 @@ async def get_as_text(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -169,7 +168,7 @@ async def get_as_text(self, **kwargs: Any) -> str: return deserialized # type: ignore @distributed_trace_async - async def send_as_json(self, text: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def send_as_json(self, text: str, **kwargs: Any) -> None: """send_as_json. :param text: Required. @@ -178,7 +177,7 @@ async def send_as_json(self, text: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -227,7 +226,7 @@ async def get_as_json(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/operations/_operations.py index 7bc8367451e..a4226dc86a8 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -120,7 +119,7 @@ def send_as_text(self, text: str, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -169,7 +168,7 @@ def get_as_text(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -230,7 +229,7 @@ def send_as_json(self, text: str, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -279,7 +278,7 @@ def get_as_json(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_configuration.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_configuration.py index 6903a91c1d1..586309bb77e 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_configuration.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class MultiPartClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiPartClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiPartClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_model_base.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_serialization.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_serialization.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/_configuration.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/_configuration.py index 4213478e675..996600217f9 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class MultiPartClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiPartClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiPartClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/_operations.py index 959201ca427..66f626db5d7 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -41,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -68,9 +68,7 @@ def __init__(self, *args, **kwargs) -> None: self.http_parts = FormDataHttpPartsOperations(self._client, self._config, self._serialize, self._deserialize) @overload - async def basic( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiPartRequest, **kwargs: Any - ) -> None: + async def basic(self, body: _models.MultiPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -81,7 +79,7 @@ async def basic( # pylint: disable=inconsistent-return-statements """ @overload - async def basic(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def basic(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -92,9 +90,7 @@ async def basic(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inc """ @distributed_trace_async - async def basic( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.MultiPartRequest, JSON], **kwargs: Any - ) -> None: + async def basic(self, body: Union[_models.MultiPartRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Is either a MultiPartRequest type or a JSON type. Required. @@ -103,7 +99,7 @@ async def basic( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -147,9 +143,7 @@ async def basic( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def file_array_and_basic( # pylint: disable=inconsistent-return-statements - self, body: _models.ComplexPartsRequest, **kwargs: Any - ) -> None: + async def file_array_and_basic(self, body: _models.ComplexPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -160,9 +154,7 @@ async def file_array_and_basic( # pylint: disable=inconsistent-return-statement """ @overload - async def file_array_and_basic( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def file_array_and_basic(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -173,9 +165,7 @@ async def file_array_and_basic( # pylint: disable=inconsistent-return-statement """ @distributed_trace_async - async def file_array_and_basic( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ComplexPartsRequest, JSON], **kwargs: Any - ) -> None: + async def file_array_and_basic(self, body: Union[_models.ComplexPartsRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Is either a ComplexPartsRequest type or a JSON type. Required. @@ -184,7 +174,7 @@ async def file_array_and_basic( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -228,9 +218,7 @@ async def file_array_and_basic( # pylint: disable=inconsistent-return-statement return cls(pipeline_response, None, {}) # type: ignore @overload - async def json_part( # pylint: disable=inconsistent-return-statements - self, body: _models.JsonPartRequest, **kwargs: Any - ) -> None: + async def json_part(self, body: _models.JsonPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains json part and binary part. :param body: Required. @@ -241,7 +229,7 @@ async def json_part( # pylint: disable=inconsistent-return-statements """ @overload - async def json_part(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def json_part(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains json part and binary part. :param body: Required. @@ -252,9 +240,7 @@ async def json_part(self, body: JSON, **kwargs: Any) -> None: # pylint: disable """ @distributed_trace_async - async def json_part( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.JsonPartRequest, JSON], **kwargs: Any - ) -> None: + async def json_part(self, body: Union[_models.JsonPartRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains json part and binary part. :param body: Is either a JsonPartRequest type or a JSON type. Required. @@ -263,7 +249,7 @@ async def json_part( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -307,9 +293,7 @@ async def json_part( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def binary_array_parts( # pylint: disable=inconsistent-return-statements - self, body: _models.BinaryArrayPartsRequest, **kwargs: Any - ) -> None: + async def binary_array_parts(self, body: _models.BinaryArrayPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -320,9 +304,7 @@ async def binary_array_parts( # pylint: disable=inconsistent-return-statements """ @overload - async def binary_array_parts( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def binary_array_parts(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -333,9 +315,7 @@ async def binary_array_parts( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def binary_array_parts( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BinaryArrayPartsRequest, JSON], **kwargs: Any - ) -> None: + async def binary_array_parts(self, body: Union[_models.BinaryArrayPartsRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Is either a BinaryArrayPartsRequest type or a JSON type. Required. @@ -344,7 +324,7 @@ async def binary_array_parts( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -388,9 +368,7 @@ async def binary_array_parts( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def multi_binary_parts( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiBinaryPartsRequest, **kwargs: Any - ) -> None: + async def multi_binary_parts(self, body: _models.MultiBinaryPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -401,9 +379,7 @@ async def multi_binary_parts( # pylint: disable=inconsistent-return-statements """ @overload - async def multi_binary_parts( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def multi_binary_parts(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -414,9 +390,7 @@ async def multi_binary_parts( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def multi_binary_parts( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.MultiBinaryPartsRequest, JSON], **kwargs: Any - ) -> None: + async def multi_binary_parts(self, body: Union[_models.MultiBinaryPartsRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Is either a MultiBinaryPartsRequest type or a JSON type. Required. @@ -425,7 +399,7 @@ async def multi_binary_parts( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -469,9 +443,7 @@ async def multi_binary_parts( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def check_file_name_and_content_type( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiPartRequest, **kwargs: Any - ) -> None: + async def check_file_name_and_content_type(self, body: _models.MultiPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -482,9 +454,7 @@ async def check_file_name_and_content_type( # pylint: disable=inconsistent-retu """ @overload - async def check_file_name_and_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def check_file_name_and_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -495,7 +465,7 @@ async def check_file_name_and_content_type( # pylint: disable=inconsistent-retu """ @distributed_trace_async - async def check_file_name_and_content_type( # pylint: disable=inconsistent-return-statements + async def check_file_name_and_content_type( self, body: Union[_models.MultiPartRequest, JSON], **kwargs: Any ) -> None: """Test content-type: multipart/form-data. @@ -506,7 +476,7 @@ async def check_file_name_and_content_type( # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -550,9 +520,7 @@ async def check_file_name_and_content_type( # pylint: disable=inconsistent-retu return cls(pipeline_response, None, {}) # type: ignore @overload - async def anonymous_model( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def anonymous_model(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -563,9 +531,7 @@ async def anonymous_model( # pylint: disable=inconsistent-return-statements """ @overload - async def anonymous_model( # pylint: disable=inconsistent-return-statements - self, *, profile_image: FileType, **kwargs: Any - ) -> None: + async def anonymous_model(self, *, profile_image: FileType, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :keyword profile_image: Required. @@ -576,9 +542,7 @@ async def anonymous_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def anonymous_model( # pylint: disable=inconsistent-return-statements - self, body: JSON = _Unset, *, profile_image: FileType = _Unset, **kwargs: Any - ) -> None: + async def anonymous_model(self, body: JSON = _Unset, *, profile_image: FileType = _Unset, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Is one of the following types: JSON Required. @@ -589,7 +553,7 @@ async def anonymous_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -663,9 +627,7 @@ def __init__(self, *args, **kwargs) -> None: ) @overload - async def json_array_and_file_array( # pylint: disable=inconsistent-return-statements - self, body: _models.ComplexHttpPartsModelRequest, **kwargs: Any - ) -> None: + async def json_array_and_file_array(self, body: _models.ComplexHttpPartsModelRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -676,9 +638,7 @@ async def json_array_and_file_array( # pylint: disable=inconsistent-return-stat """ @overload - async def json_array_and_file_array( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def json_array_and_file_array(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -689,7 +649,7 @@ async def json_array_and_file_array( # pylint: disable=inconsistent-return-stat """ @distributed_trace_async - async def json_array_and_file_array( # pylint: disable=inconsistent-return-statements + async def json_array_and_file_array( self, body: Union[_models.ComplexHttpPartsModelRequest, JSON], **kwargs: Any ) -> None: """Test content-type: multipart/form-data for mixed scenarios. @@ -700,7 +660,7 @@ async def json_array_and_file_array( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -762,7 +722,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements + async def image_jpeg_content_type( self, body: _models.FileWithHttpPartSpecificContentTypeRequest, **kwargs: Any ) -> None: """Test content-type: multipart/form-data. @@ -775,9 +735,7 @@ async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statem """ @overload - async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def image_jpeg_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -788,7 +746,7 @@ async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statem """ @distributed_trace_async - async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements + async def image_jpeg_content_type( self, body: Union[_models.FileWithHttpPartSpecificContentTypeRequest, JSON], **kwargs: Any ) -> None: """Test content-type: multipart/form-data. @@ -800,7 +758,7 @@ async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -844,7 +802,7 @@ async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @overload - async def required_content_type( # pylint: disable=inconsistent-return-statements + async def required_content_type( self, body: _models.FileWithHttpPartRequiredContentTypeRequest, **kwargs: Any ) -> None: """Test content-type: multipart/form-data. @@ -857,9 +815,7 @@ async def required_content_type( # pylint: disable=inconsistent-return-statemen """ @overload - async def required_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def required_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -870,7 +826,7 @@ async def required_content_type( # pylint: disable=inconsistent-return-statemen """ @distributed_trace_async - async def required_content_type( # pylint: disable=inconsistent-return-statements + async def required_content_type( self, body: Union[_models.FileWithHttpPartRequiredContentTypeRequest, JSON], **kwargs: Any ) -> None: """Test content-type: multipart/form-data. @@ -882,7 +838,7 @@ async def required_content_type( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -926,7 +882,7 @@ async def required_content_type( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @overload - async def optional_content_type( # pylint: disable=inconsistent-return-statements + async def optional_content_type( self, body: _models.FileWithHttpPartOptionalContentTypeRequest, **kwargs: Any ) -> None: """Test content-type: multipart/form-data for optional content type. @@ -939,9 +895,7 @@ async def optional_content_type( # pylint: disable=inconsistent-return-statemen """ @overload - async def optional_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def optional_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for optional content type. :param body: Required. @@ -952,7 +906,7 @@ async def optional_content_type( # pylint: disable=inconsistent-return-statemen """ @distributed_trace_async - async def optional_content_type( # pylint: disable=inconsistent-return-statements + async def optional_content_type( self, body: Union[_models.FileWithHttpPartOptionalContentTypeRequest, JSON], **kwargs: Any ) -> None: """Test content-type: multipart/form-data for optional content type. @@ -964,7 +918,7 @@ async def optional_content_type( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1026,9 +980,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def float( # pylint: disable=inconsistent-return-statements - self, body: _models.FloatRequest, **kwargs: Any - ) -> None: + async def float(self, body: _models.FloatRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for non string. :param body: Required. @@ -1039,7 +991,7 @@ async def float( # pylint: disable=inconsistent-return-statements """ @overload - async def float(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def float(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for non string. :param body: Required. @@ -1050,9 +1002,7 @@ async def float(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inc """ @distributed_trace_async - async def float( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FloatRequest, JSON], **kwargs: Any - ) -> None: + async def float(self, body: Union[_models.FloatRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data for non string. :param body: Is either a FloatRequest type or a JSON type. Required. @@ -1061,7 +1011,7 @@ async def float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/models/_models.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/models/_models.py index fd7c8e463af..dfeca6f3a62 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/models/_models.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +13,6 @@ from .._vendor import FileType if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/_operations.py index 0591c5b5f61..df8ae174dfd 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -177,9 +177,7 @@ def __init__(self, *args, **kwargs): self.http_parts = FormDataHttpPartsOperations(self._client, self._config, self._serialize, self._deserialize) @overload - def basic( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiPartRequest, **kwargs: Any - ) -> None: + def basic(self, body: _models.MultiPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -190,7 +188,7 @@ def basic( # pylint: disable=inconsistent-return-statements """ @overload - def basic(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def basic(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -212,7 +210,7 @@ def basic( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -256,9 +254,7 @@ def basic( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def file_array_and_basic( # pylint: disable=inconsistent-return-statements - self, body: _models.ComplexPartsRequest, **kwargs: Any - ) -> None: + def file_array_and_basic(self, body: _models.ComplexPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -269,7 +265,7 @@ def file_array_and_basic( # pylint: disable=inconsistent-return-statements """ @overload - def file_array_and_basic(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def file_array_and_basic(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -291,7 +287,7 @@ def file_array_and_basic( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -335,9 +331,7 @@ def file_array_and_basic( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def json_part( # pylint: disable=inconsistent-return-statements - self, body: _models.JsonPartRequest, **kwargs: Any - ) -> None: + def json_part(self, body: _models.JsonPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains json part and binary part. :param body: Required. @@ -348,7 +342,7 @@ def json_part( # pylint: disable=inconsistent-return-statements """ @overload - def json_part(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def json_part(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains json part and binary part. :param body: Required. @@ -370,7 +364,7 @@ def json_part( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -414,9 +408,7 @@ def json_part( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def binary_array_parts( # pylint: disable=inconsistent-return-statements - self, body: _models.BinaryArrayPartsRequest, **kwargs: Any - ) -> None: + def binary_array_parts(self, body: _models.BinaryArrayPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -427,7 +419,7 @@ def binary_array_parts( # pylint: disable=inconsistent-return-statements """ @overload - def binary_array_parts(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def binary_array_parts(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -449,7 +441,7 @@ def binary_array_parts( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -493,9 +485,7 @@ def binary_array_parts( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def multi_binary_parts( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiBinaryPartsRequest, **kwargs: Any - ) -> None: + def multi_binary_parts(self, body: _models.MultiBinaryPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -506,7 +496,7 @@ def multi_binary_parts( # pylint: disable=inconsistent-return-statements """ @overload - def multi_binary_parts(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def multi_binary_parts(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -528,7 +518,7 @@ def multi_binary_parts( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -572,9 +562,7 @@ def multi_binary_parts( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def check_file_name_and_content_type( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiPartRequest, **kwargs: Any - ) -> None: + def check_file_name_and_content_type(self, body: _models.MultiPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -585,9 +573,7 @@ def check_file_name_and_content_type( # pylint: disable=inconsistent-return-sta """ @overload - def check_file_name_and_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + def check_file_name_and_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -609,7 +595,7 @@ def check_file_name_and_content_type( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -653,7 +639,7 @@ def check_file_name_and_content_type( # pylint: disable=inconsistent-return-sta return cls(pipeline_response, None, {}) # type: ignore @overload - def anonymous_model(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def anonymous_model(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -664,9 +650,7 @@ def anonymous_model(self, body: JSON, **kwargs: Any) -> None: # pylint: disable """ @overload - def anonymous_model( # pylint: disable=inconsistent-return-statements - self, *, profile_image: FileType, **kwargs: Any - ) -> None: + def anonymous_model(self, *, profile_image: FileType, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :keyword profile_image: Required. @@ -690,7 +674,7 @@ def anonymous_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -764,9 +748,7 @@ def __init__(self, *args, **kwargs): ) @overload - def json_array_and_file_array( # pylint: disable=inconsistent-return-statements - self, body: _models.ComplexHttpPartsModelRequest, **kwargs: Any - ) -> None: + def json_array_and_file_array(self, body: _models.ComplexHttpPartsModelRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -777,9 +759,7 @@ def json_array_and_file_array( # pylint: disable=inconsistent-return-statements """ @overload - def json_array_and_file_array( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + def json_array_and_file_array(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -801,7 +781,7 @@ def json_array_and_file_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -863,9 +843,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements - self, body: _models.FileWithHttpPartSpecificContentTypeRequest, **kwargs: Any - ) -> None: + def image_jpeg_content_type(self, body: _models.FileWithHttpPartSpecificContentTypeRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -876,9 +854,7 @@ def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements """ @overload - def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + def image_jpeg_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -901,7 +877,7 @@ def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -945,9 +921,7 @@ def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def required_content_type( # pylint: disable=inconsistent-return-statements - self, body: _models.FileWithHttpPartRequiredContentTypeRequest, **kwargs: Any - ) -> None: + def required_content_type(self, body: _models.FileWithHttpPartRequiredContentTypeRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -958,9 +932,7 @@ def required_content_type( # pylint: disable=inconsistent-return-statements """ @overload - def required_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + def required_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -983,7 +955,7 @@ def required_content_type( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1027,9 +999,7 @@ def required_content_type( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def optional_content_type( # pylint: disable=inconsistent-return-statements - self, body: _models.FileWithHttpPartOptionalContentTypeRequest, **kwargs: Any - ) -> None: + def optional_content_type(self, body: _models.FileWithHttpPartOptionalContentTypeRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for optional content type. :param body: Required. @@ -1040,9 +1010,7 @@ def optional_content_type( # pylint: disable=inconsistent-return-statements """ @overload - def optional_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + def optional_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for optional content type. :param body: Required. @@ -1065,7 +1033,7 @@ def optional_content_type( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1127,9 +1095,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def float( # pylint: disable=inconsistent-return-statements - self, body: _models.FloatRequest, **kwargs: Any - ) -> None: + def float(self, body: _models.FloatRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for non string. :param body: Required. @@ -1140,7 +1106,7 @@ def float( # pylint: disable=inconsistent-return-statements """ @overload - def float(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def float(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for non string. :param body: Required. @@ -1162,7 +1128,7 @@ def float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_model_base.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_operations/_operations.py index a8b6ae93fd6..e280ac5a2e1 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -78,7 +77,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.User"]: maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_serialization.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_serialization.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_vendor.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_vendor.py index 41275fc4523..48587d02498 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_vendor.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import PageableClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_operations/_operations.py index 49f29e24f27..f1509c1bcad 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +54,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.User"]: maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_vendor.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_vendor.py index ea3fa625f8f..3c28688d845 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import PageableClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/models/_models.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/models/_models.py index 049927c4388..7290b2c754d 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/models/_models.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_model_base.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_model_base.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_serialization.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_serialization.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/_operations.py index cbfcba5ffce..2c0e68efbdb 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -56,7 +56,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,7 +86,7 @@ async def get(self, **kwargs: Any) -> _models.SimpleModel: :rtype: ~payload.xml.models.SimpleModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -138,9 +138,7 @@ async def get(self, **kwargs: Any) -> _models.SimpleModel: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.SimpleModel, **kwargs: Any - ) -> None: + async def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: """put. :param input: Required. @@ -149,7 +147,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -216,7 +214,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithSimpleArrays: :rtype: ~payload.xml.models.ModelWithSimpleArrays :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,9 +266,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithSimpleArrays: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithSimpleArrays, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithSimpleArrays, **kwargs: Any) -> None: """put. :param input: Required. @@ -279,7 +275,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -346,7 +342,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithArrayOfModel: :rtype: ~payload.xml.models.ModelWithArrayOfModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -398,9 +394,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithArrayOfModel: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithArrayOfModel, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithArrayOfModel, **kwargs: Any) -> None: """put. :param input: Required. @@ -409,7 +403,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +470,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithOptionalField: :rtype: ~payload.xml.models.ModelWithOptionalField :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -528,9 +522,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithOptionalField: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithOptionalField, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithOptionalField, **kwargs: Any) -> None: """put. :param input: Required. @@ -539,7 +531,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -606,7 +598,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithAttributes: :rtype: ~payload.xml.models.ModelWithAttributes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -658,9 +650,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithAttributes: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithAttributes, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithAttributes, **kwargs: Any) -> None: """put. :param input: Required. @@ -669,7 +659,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -736,7 +726,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithUnwrappedArray: :rtype: ~payload.xml.models.ModelWithUnwrappedArray :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -788,9 +778,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithUnwrappedArray: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithUnwrappedArray, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithUnwrappedArray, **kwargs: Any) -> None: """put. :param input: Required. @@ -799,7 +787,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -866,7 +854,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedArrays: :rtype: ~payload.xml.models.ModelWithRenamedArrays :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -918,9 +906,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedArrays: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithRenamedArrays, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithRenamedArrays, **kwargs: Any) -> None: """put. :param input: Required. @@ -929,7 +915,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -996,7 +982,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedFields: :rtype: ~payload.xml.models.ModelWithRenamedFields :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1048,9 +1034,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedFields: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithRenamedFields, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithRenamedFields, **kwargs: Any) -> None: """put. :param input: Required. @@ -1059,7 +1043,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1126,7 +1110,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEmptyArray: :rtype: ~payload.xml.models.ModelWithEmptyArray :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1178,9 +1162,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEmptyArray: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithEmptyArray, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithEmptyArray, **kwargs: Any) -> None: """put. :param input: Required. @@ -1189,7 +1171,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1256,7 +1238,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithText: :rtype: ~payload.xml.models.ModelWithText :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1308,9 +1290,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithText: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithText, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithText, **kwargs: Any) -> None: """put. :param input: Required. @@ -1319,7 +1299,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1386,7 +1366,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithDictionary: :rtype: ~payload.xml.models.ModelWithDictionary :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1438,9 +1418,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithDictionary: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithDictionary, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithDictionary, **kwargs: Any) -> None: """put. :param input: Required. @@ -1449,7 +1427,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1516,7 +1494,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEncodedNames: :rtype: ~payload.xml.models.ModelWithEncodedNames :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1568,9 +1546,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEncodedNames: return deserialized # type: ignore @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithEncodedNames, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithEncodedNames, **kwargs: Any) -> None: """put. :param input: Required. @@ -1579,7 +1555,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/_models.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/_models.py index b47874f55e8..bd0fd24b996 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/_models.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/_operations.py index b21fbd3cd2a..a9591d5d3d2 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -388,7 +388,7 @@ def get(self, **kwargs: Any) -> _models.SimpleModel: :rtype: ~payload.xml.models.SimpleModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -449,7 +449,7 @@ def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -516,7 +516,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithSimpleArrays: :rtype: ~payload.xml.models.ModelWithSimpleArrays :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -579,7 +579,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -646,7 +646,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithArrayOfModel: :rtype: ~payload.xml.models.ModelWithArrayOfModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -709,7 +709,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +776,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithOptionalField: :rtype: ~payload.xml.models.ModelWithOptionalField :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -839,7 +839,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -906,7 +906,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithAttributes: :rtype: ~payload.xml.models.ModelWithAttributes :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -969,7 +969,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1036,7 +1036,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithUnwrappedArray: :rtype: ~payload.xml.models.ModelWithUnwrappedArray :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1099,7 +1099,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1166,7 +1166,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithRenamedArrays: :rtype: ~payload.xml.models.ModelWithRenamedArrays :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1229,7 +1229,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1296,7 +1296,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithRenamedFields: :rtype: ~payload.xml.models.ModelWithRenamedFields :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1359,7 +1359,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1426,7 +1426,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithEmptyArray: :rtype: ~payload.xml.models.ModelWithEmptyArray :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1489,7 +1489,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1556,7 +1556,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithText: :rtype: ~payload.xml.models.ModelWithText :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1619,7 +1619,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1686,7 +1686,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithDictionary: :rtype: ~payload.xml.models.ModelWithDictionary :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1749,7 +1749,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1816,7 +1816,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithEncodedNames: :rtype: ~payload.xml.models.ModelWithEncodedNames :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1879,7 +1879,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py index a41eb73c27b..947e75fe47c 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py @@ -19,9 +19,7 @@ from ._serialization import Deserializer, Serializer -class ResiliencyServiceDrivenClient( - ResiliencyServiceDrivenClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class ResiliencyServiceDrivenClient(ResiliencyServiceDrivenClientOperationsMixin): """Test that we can grow up a service spec and service deployment into a multi-versioned service with full client support. diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/_operations.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/_operations.py index ec584bc6cbb..28098527c83 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -85,7 +84,7 @@ def from_none(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -139,7 +138,7 @@ def from_one_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -193,7 +192,7 @@ def from_one_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_serialization.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_serialization.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_vendor.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_vendor.py index a0993783ded..7bcc56a09c5 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_vendor.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ResiliencyServiceDrivenClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py index 4458c06f90e..7805ec20cd5 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py @@ -19,9 +19,7 @@ from ._operations import ResiliencyServiceDrivenClientOperationsMixin -class ResiliencyServiceDrivenClient( - ResiliencyServiceDrivenClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class ResiliencyServiceDrivenClient(ResiliencyServiceDrivenClientOperationsMixin): """Test that we can grow up a service spec and service deployment into a multi-versioned service with full client support. diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/_operations.py index 7e01bc9b2c0..aa57ffd7d3c 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +48,7 @@ async def from_none(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -91,9 +90,7 @@ async def from_none(self, **kwargs: Any) -> bool: return 200 <= response.status_code <= 299 @distributed_trace_async - async def from_one_required( # pylint: disable=inconsistent-return-statements - self, *, parameter: str, **kwargs: Any - ) -> None: + async def from_one_required(self, *, parameter: str, **kwargs: Any) -> None: """Test that currently accepts one required parameter, will be updated in next spec to accept a new optional parameter as well. @@ -103,7 +100,7 @@ async def from_one_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -145,9 +142,7 @@ async def from_one_required( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def from_one_optional( # pylint: disable=inconsistent-return-statements - self, *, parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def from_one_optional(self, *, parameter: Optional[str] = None, **kwargs: Any) -> None: """Test that currently accepts one optional parameter, will be updated in next spec to accept a new optional parameter as well. @@ -157,7 +152,7 @@ async def from_one_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_vendor.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_vendor.py index 37ea205a8d1..f673ada5d49 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ResiliencyServiceDrivenClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py index 66856ae2c5e..cb38121494d 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py @@ -19,9 +19,7 @@ from ._serialization import Deserializer, Serializer -class ResiliencyServiceDrivenClient( - ResiliencyServiceDrivenClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class ResiliencyServiceDrivenClient(ResiliencyServiceDrivenClientOperationsMixin): """Test that we can grow up a service spec and service deployment into a multi-versioned service with full client support. diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/_operations.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/_operations.py index 912830554ef..c833c467418 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -109,7 +108,7 @@ def add_operation(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -162,7 +161,7 @@ def from_none(self, *, new_parameter: Optional[str] = None, **kwargs: Any) -> bo :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -222,7 +221,7 @@ def from_one_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -282,7 +281,7 @@ def from_one_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_serialization.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_serialization.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_vendor.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_vendor.py index a0993783ded..7bcc56a09c5 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_vendor.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ResiliencyServiceDrivenClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py index 963c3d6b71e..07b0dea4b1a 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py @@ -19,9 +19,7 @@ from ._operations import ResiliencyServiceDrivenClientOperationsMixin -class ResiliencyServiceDrivenClient( - ResiliencyServiceDrivenClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class ResiliencyServiceDrivenClient(ResiliencyServiceDrivenClientOperationsMixin): """Test that we can grow up a service spec and service deployment into a multi-versioned service with full client support. diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/_operations.py index 918059f907c..279cac29521 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -45,15 +44,15 @@ class ResiliencyServiceDrivenClientOperationsMixin( # pylint: disable=name-too- @distributed_trace_async @api_version_validation( method_added_on="v2", - ) # pylint: disable=inconsistent-return-statements - async def add_operation(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + ) + async def add_operation(self, **kwargs: Any) -> None: """Added operation. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,7 +105,7 @@ async def from_none(self, *, new_parameter: Optional[str] = None, **kwargs: Any) :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -151,10 +150,8 @@ async def from_none(self, *, new_parameter: Optional[str] = None, **kwargs: Any) @distributed_trace_async @api_version_validation( params_added_on={"v2": ["new_parameter"]}, - ) # pylint: disable=inconsistent-return-statements - async def from_one_required( # pylint: disable=inconsistent-return-statements - self, *, parameter: str, new_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + ) + async def from_one_required(self, *, parameter: str, new_parameter: Optional[str] = None, **kwargs: Any) -> None: """Operation that grew up from accepting one required parameter to accepting a required parameter and an optional parameter. @@ -166,7 +163,7 @@ async def from_one_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -211,8 +208,8 @@ async def from_one_required( # pylint: disable=inconsistent-return-statements @distributed_trace_async @api_version_validation( params_added_on={"v2": ["new_parameter"]}, - ) # pylint: disable=inconsistent-return-statements - async def from_one_optional( # pylint: disable=inconsistent-return-statements + ) + async def from_one_optional( self, *, parameter: Optional[str] = None, new_parameter: Optional[str] = None, **kwargs: Any ) -> None: """Tests that we can grow up an operation from accepting one optional parameter to accepting two @@ -226,7 +223,7 @@ async def from_one_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_vendor.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_vendor.py index 37ea205a8d1..f673ada5d49 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ResiliencyServiceDrivenClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/routes/routes/_model_base.py b/packages/typespec-python/test/azure/generated/routes/routes/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/_model_base.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/_serialization.py b/packages/typespec-python/test/azure/generated/routes/routes/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/_serialization.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/routes/routes/_vendor.py b/packages/typespec-python/test/azure/generated/routes/routes/_vendor.py index 4c2c79a23d2..c3e13092d70 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/_vendor.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RoutesClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/routes/routes/aio/_vendor.py b/packages/typespec-python/test/azure/generated/routes/routes/aio/_vendor.py index 726acb9af01..8c4c586c7b5 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RoutesClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/_operations.py index 207c0759fc2..8f9b2f02197 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -74,7 +74,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -113,7 +113,7 @@ def __init__(self, *args, **kwargs) -> None: ) @distributed_trace_async - async def template_only(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def template_only(self, param: str, **kwargs: Any) -> None: """template_only. :param param: Required. @@ -122,7 +122,7 @@ async def template_only(self, param: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,7 +160,7 @@ async def template_only(self, param: str, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def explicit(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def explicit(self, param: str, **kwargs: Any) -> None: """explicit. :param param: Required. @@ -169,7 +169,7 @@ async def explicit(self, param: str, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -207,9 +207,7 @@ async def explicit(self, param: str, **kwargs: Any) -> None: # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def annotation_only( # pylint: disable=inconsistent-return-statements - self, param: str, **kwargs: Any - ) -> None: + async def annotation_only(self, param: str, **kwargs: Any) -> None: """annotation_only. :param param: Required. @@ -218,7 +216,7 @@ async def annotation_only( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -281,9 +279,7 @@ def __init__(self, *args, **kwargs) -> None: ) @distributed_trace_async - async def template_only( # pylint: disable=inconsistent-return-statements - self, *, param: str, **kwargs: Any - ) -> None: + async def template_only(self, *, param: str, **kwargs: Any) -> None: """template_only. :keyword param: Required. @@ -292,7 +288,7 @@ async def template_only( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -330,7 +326,7 @@ async def template_only( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def explicit(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def explicit(self, *, param: str, **kwargs: Any) -> None: """explicit. :keyword param: Required. @@ -339,7 +335,7 @@ async def explicit(self, *, param: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -377,9 +373,7 @@ async def explicit(self, *, param: str, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def annotation_only( # pylint: disable=inconsistent-return-statements - self, *, param: str, **kwargs: Any - ) -> None: + async def annotation_only(self, *, param: str, **kwargs: Any) -> None: """annotation_only. :keyword param: Required. @@ -388,7 +382,7 @@ async def annotation_only( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -444,14 +438,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def fixed(self, **kwargs: Any) -> None: """fixed. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -491,14 +485,14 @@ async def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re class RoutesClientOperationsMixin(RoutesClientMixinABC): @distributed_trace_async - async def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def fixed(self, **kwargs: Any) -> None: """fixed. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -553,7 +547,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def template(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def template(self, param: str, **kwargs: Any) -> None: """template. :param param: Required. @@ -562,7 +556,7 @@ async def template(self, param: str, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -600,7 +594,7 @@ async def template(self, param: str, **kwargs: Any) -> None: # pylint: disable= return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def annotation(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def annotation(self, param: str, **kwargs: Any) -> None: """annotation. :param param: Required. @@ -609,7 +603,7 @@ async def annotation(self, param: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -815,7 +809,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -824,7 +818,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -862,7 +856,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -871,7 +865,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -909,9 +903,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -920,7 +912,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -976,7 +968,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -985,7 +977,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1023,7 +1015,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1032,7 +1024,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1070,9 +1062,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1081,7 +1071,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1137,7 +1127,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1146,7 +1136,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1184,7 +1174,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1193,7 +1183,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1231,9 +1221,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1242,7 +1230,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1298,7 +1286,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1307,7 +1295,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1345,7 +1333,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1354,7 +1342,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1392,9 +1380,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1403,7 +1389,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1459,7 +1445,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1468,7 +1454,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1506,7 +1492,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1515,7 +1501,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1553,9 +1539,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1564,7 +1548,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1620,7 +1604,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1629,7 +1613,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1667,7 +1651,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1676,7 +1660,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1714,9 +1698,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1725,7 +1707,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1781,7 +1763,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1790,7 +1772,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1828,7 +1810,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1837,7 +1819,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1875,9 +1857,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1886,7 +1866,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1942,7 +1922,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1951,7 +1931,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1989,7 +1969,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1998,7 +1978,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2036,9 +2016,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -2047,7 +2025,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2103,7 +2081,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, *, param: str, **kwargs: Any) -> None: """primitive. :keyword param: Required. @@ -2112,7 +2090,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2150,7 +2128,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, *, param: List[str], **kwargs: Any) -> None: """array. :keyword param: Required. @@ -2159,7 +2137,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2197,9 +2175,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, *, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: """record. :keyword param: Required. @@ -2208,7 +2184,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2264,7 +2240,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, *, param: str, **kwargs: Any) -> None: """primitive. :keyword param: Required. @@ -2273,7 +2249,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2311,7 +2287,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, *, param: List[str], **kwargs: Any) -> None: """array. :keyword param: Required. @@ -2320,7 +2296,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2358,9 +2334,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, *, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: """record. :keyword param: Required. @@ -2369,7 +2343,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2425,7 +2399,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, *, param: str, **kwargs: Any) -> None: """primitive. :keyword param: Required. @@ -2434,7 +2408,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2472,7 +2446,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, *, param: List[str], **kwargs: Any) -> None: """array. :keyword param: Required. @@ -2481,7 +2455,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2519,9 +2493,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, *, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: """record. :keyword param: Required. @@ -2530,7 +2502,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2586,7 +2558,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, *, param: str, **kwargs: Any) -> None: """primitive. :keyword param: Required. @@ -2595,7 +2567,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2633,7 +2605,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, *, param: List[str], **kwargs: Any) -> None: """array. :keyword param: Required. @@ -2642,7 +2614,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2680,9 +2652,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def record( # pylint: disable=inconsistent-return-statements - self, *, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: """record. :keyword param: Required. @@ -2691,7 +2661,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/operations/_operations.py index 3386aa0db84..0cddb2b8b0d 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -705,7 +705,7 @@ def template_only(self, param: str, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -752,7 +752,7 @@ def explicit(self, param: str, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -799,7 +799,7 @@ def annotation_only(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -871,7 +871,7 @@ def template_only(self, *, param: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -918,7 +918,7 @@ def explicit(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -965,7 +965,7 @@ def annotation_only(self, *, param: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1028,7 +1028,7 @@ def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1075,7 +1075,7 @@ def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1139,7 +1139,7 @@ def template(self, param: str, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1186,7 +1186,7 @@ def annotation(self, param: str, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1401,7 +1401,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1448,7 +1448,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1495,7 +1495,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1560,7 +1560,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1607,7 +1607,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1654,7 +1654,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1719,7 +1719,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1766,7 +1766,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1813,7 +1813,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1878,7 +1878,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1925,7 +1925,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1972,7 +1972,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2037,7 +2037,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2084,7 +2084,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2131,7 +2131,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2196,7 +2196,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2243,7 +2243,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2290,7 +2290,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2355,7 +2355,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2402,7 +2402,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2449,7 +2449,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2514,7 +2514,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2561,7 +2561,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2608,7 +2608,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2673,7 +2673,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2720,7 @@ def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2767,7 +2767,7 @@ def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2832,7 +2832,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2879,7 +2879,7 @@ def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2926,7 +2926,7 @@ def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2991,7 +2991,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3038,7 @@ def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3085,7 +3085,7 @@ def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3150,7 +3150,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3197,7 +3197,7 @@ def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3244,7 +3244,7 @@ def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_serialization.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_serialization.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py index ff3e6128958..63b0db355c7 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: _models.JsonEncodedNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -73,9 +72,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -89,9 +86,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -105,9 +100,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.JsonEncodedNameModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def send(self, body: Union[_models.JsonEncodedNameModel, JSON, IO[bytes]], **kwargs: Any) -> None: """send. :param body: Is one of the following types: JsonEncodedNameModel, JSON, IO[bytes] Required. @@ -116,7 +109,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -170,7 +163,7 @@ async def get(self, **kwargs: Any) -> _models.JsonEncodedNameModel: :rtype: ~serialization.encodedname.json.models.JsonEncodedNameModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/models/_models.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/models/_models.py index 6b44f0f811d..d2d23b582e3 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/models/_models.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py index e71d80d355a..d87d28be99a 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -88,7 +87,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def send( # pylint: disable=inconsistent-return-statements + def send( self, body: _models.JsonEncodedNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -104,9 +103,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -120,9 +117,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -147,7 +142,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -201,7 +196,7 @@ def get(self, **kwargs: Any) -> _models.JsonEncodedNameModel: :rtype: ~serialization.encodedname.json.models.JsonEncodedNameModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_configuration.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_configuration.py index d5d4d330b2d..862ddd55007 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_configuration.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class NotDefinedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotDefinedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotDefinedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/_operations.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/_operations.py index dd2a76f458f..eef77448740 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def valid(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_serialization.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_serialization.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_vendor.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_vendor.py index 255a7102b86..09fb220b63e 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_vendor.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotDefinedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_configuration.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_configuration.py index 04721ce9e6c..5b5e297c35f 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class NotDefinedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotDefinedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotDefinedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/_operations.py index 29ebf82d44e..3a7badb371d 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +41,7 @@ async def valid(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_vendor.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_vendor.py index 9d570aa5bbd..19564973a65 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotDefinedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_client.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_client.py index d63beb2641a..7d4d5f5eb75 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_client.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_client.py @@ -19,7 +19,7 @@ from ._serialization import Deserializer, Serializer -class MultipleClient(MultipleClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultipleClient(MultipleClientOperationsMixin): """MultipleClient. :param endpoint: Pass in http://localhost:3000 for endpoint. Required. diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_model_base.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_model_base.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_operations/_operations.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_operations/_operations.py index b4998802b59..0ac655cc39d 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ def no_operation_params(self, **kwargs: Any) -> None: # pylint: disable=inconsi :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -115,7 +114,7 @@ def with_operation_path_param( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_serialization.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_serialization.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_vendor.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_vendor.py index da0eec7214a..1fc0062beca 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_vendor.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultipleClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_client.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_client.py index 606b1b1f3f9..1de5b2790e4 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_client.py @@ -19,7 +19,7 @@ from ._operations import MultipleClientOperationsMixin -class MultipleClient(MultipleClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultipleClient(MultipleClientOperationsMixin): """MultipleClient. :param endpoint: Pass in http://localhost:3000 for endpoint. Required. diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_operations/_operations.py index 884e32f9435..a91a93ecf28 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -38,14 +37,14 @@ class MultipleClientOperationsMixin(MultipleClientMixinABC): @distributed_trace_async - async def no_operation_params(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def no_operation_params(self, **kwargs: Any) -> None: """no_operation_params. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83,9 +82,7 @@ async def no_operation_params(self, **kwargs: Any) -> None: # pylint: disable=i return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_operation_path_param( # pylint: disable=inconsistent-return-statements - self, keyword: str, **kwargs: Any - ) -> None: + async def with_operation_path_param(self, keyword: str, **kwargs: Any) -> None: """with_operation_path_param. :param keyword: Required. @@ -94,7 +91,7 @@ async def with_operation_path_param( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_vendor.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_vendor.py index 0ad32f9d347..4396d4e7625 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultipleClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_model_base.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_model_base.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_operations/_operations.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_operations/_operations.py index 9a5be76ec84..40cd333b594 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def my_op(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_serialization.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_serialization.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_vendor.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_vendor.py index 5764d3e4e2a..35434b3b12e 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_vendor.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SingleClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_operations/_operations.py index b5a7543fb12..4f09e3f447e 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +41,7 @@ async def my_op(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_vendor.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_vendor.py index 1fdabc1685d..ffa3fe62028 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SingleClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_configuration.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_configuration.py index 0f8bccb5d8f..edc0fefad42 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_configuration.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class NotVersionedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotVersionedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotVersionedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_operations/_operations.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_operations/_operations.py index 1d7c09eae0d..a8ec0090e9b 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +80,7 @@ def without_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -126,7 +125,7 @@ def with_query_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -172,7 +171,7 @@ def with_path_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_serialization.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_serialization.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_vendor.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_vendor.py index 1cb757bd884..224bf8d1e3a 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_vendor.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotVersionedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_configuration.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_configuration.py index f8a2f369626..0dd1529204b 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class NotVersionedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotVersionedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotVersionedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/_operations.py index c442ba6ab9c..c1086b99b93 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +45,7 @@ async def without_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -91,7 +90,7 @@ async def with_query_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -137,7 +136,7 @@ async def with_path_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_vendor.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_vendor.py index 151a909892a..6c85bf15bcd 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotVersionedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_client.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_client.py index 1dae2f3c872..616b7a38eeb 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_client.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_client.py @@ -19,7 +19,7 @@ from ._serialization import Deserializer, Serializer -class VersionedClient(VersionedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class VersionedClient(VersionedClientOperationsMixin): """Illustrates versioned server. :param endpoint: Need to be set as 'http://localhost:3000' in client. Required. diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_configuration.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_configuration.py index dc76114037d..7e959451157 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_configuration.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class VersionedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VersionedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VersionedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_model_base.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_model_base.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_operations/_operations.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_operations/_operations.py index 7516ddb7ba3..5cf481a18b1 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -92,7 +91,7 @@ def without_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -137,7 +136,7 @@ def with_query_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -183,7 +182,7 @@ def with_path_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -229,7 +228,7 @@ def with_query_old_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_serialization.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_serialization.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_vendor.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_vendor.py index 051cb962927..851b7e6cfb4 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_vendor.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VersionedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_client.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_client.py index c6832f34355..5e124c6dfda 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_client.py @@ -19,7 +19,7 @@ from ._operations import VersionedClientOperationsMixin -class VersionedClient(VersionedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class VersionedClient(VersionedClientOperationsMixin): """Illustrates versioned server. :param endpoint: Need to be set as 'http://localhost:3000' in client. Required. diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_configuration.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_configuration.py index 3bc387c62f6..917b79d9df9 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class VersionedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VersionedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VersionedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_operations/_operations.py index 9661b255458..553f14b3cc2 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +46,7 @@ async def without_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -92,7 +91,7 @@ async def with_query_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -138,7 +137,7 @@ async def with_path_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -184,7 +183,7 @@ async def with_query_old_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_vendor.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_vendor.py index f1a63b311f9..e6d60001282 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VersionedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_configuration.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_configuration.py index eebc2746bc6..e7c0685a5ec 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_configuration.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ConditionalRequestClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ConditionalRequestClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ConditionalRequestClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/_operations.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/_operations.py index 41addccc7b0..c3558d8d146 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core import MatchConditions from azure.core.exceptions import ( @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -124,7 +123,7 @@ def post_if_match( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -183,7 +182,7 @@ def post_if_none_match( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -240,7 +239,7 @@ def head_if_modified_since(self, *, if_modified_since: Optional[datetime.datetim :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -293,7 +292,7 @@ def post_if_unmodified_since( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_serialization.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_serialization.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_vendor.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_vendor.py index 9babe8a0274..bf469e2b080 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_vendor.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_vendor.py @@ -13,7 +13,6 @@ from ._configuration import ConditionalRequestClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_configuration.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_configuration.py index bdc257f2867..bb841bfd10b 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ConditionalRequestClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ConditionalRequestClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ConditionalRequestClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/_operations.py index 74800167c55..28bc16e49ec 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core import MatchConditions from azure.core.exceptions import ( @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +42,7 @@ class ConditionalRequestClientOperationsMixin(ConditionalRequestClientMixinABC): @distributed_trace_async - async def post_if_match( # pylint: disable=inconsistent-return-statements + async def post_if_match( self, *, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any ) -> None: """Check when only If-Match in header is defined. @@ -57,7 +56,7 @@ async def post_if_match( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -102,7 +101,7 @@ async def post_if_match( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def post_if_none_match( # pylint: disable=inconsistent-return-statements + async def post_if_none_match( self, *, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any ) -> None: """Check when only If-None-Match in header is defined. @@ -116,7 +115,7 @@ async def post_if_none_match( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -175,7 +174,7 @@ async def head_if_modified_since( :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -214,7 +213,7 @@ async def head_if_modified_since( return 200 <= response.status_code <= 299 @distributed_trace_async - async def post_if_unmodified_since( # pylint: disable=inconsistent-return-statements + async def post_if_unmodified_since( self, *, if_unmodified_since: Optional[datetime.datetime] = None, **kwargs: Any ) -> None: """Check when only If-Unmodified-Since in header is defined. @@ -228,7 +227,7 @@ async def post_if_unmodified_since( # pylint: disable=inconsistent-return-state :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_vendor.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_vendor.py index 48c7de9f1f0..6009e9c327e 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_vendor.py @@ -13,7 +13,6 @@ from ._configuration import ConditionalRequestClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_configuration.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_configuration.py index f6a28c2df29..9624079c59d 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_configuration.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class RepeatabilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RepeatabilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RepeatabilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_operations/_operations.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_operations/_operations.py index 513ec0faa4c..f8fb216c1d3 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar import uuid from azure.core.exceptions import ( @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -65,7 +64,7 @@ def immediate_success(self, **kwargs: Any) -> None: # pylint: disable=inconsist :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_serialization.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_serialization.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_vendor.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_vendor.py index 016ea894e21..9cc3504bf35 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_vendor.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RepeatabilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_configuration.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_configuration.py index 930fb1b5c3f..8777309481d 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class RepeatabilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RepeatabilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RepeatabilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/_operations.py index c94dd538026..3943a24a90a 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,14 +34,14 @@ class RepeatabilityClientOperationsMixin(RepeatabilityClientMixinABC): @distributed_trace_async - async def immediate_success(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def immediate_success(self, **kwargs: Any) -> None: """Check we recognize Repeatability-Request-ID and Repeatability-First-Sent. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_vendor.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_vendor.py index fca530ba089..096b77265ed 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RepeatabilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/_configuration.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/_configuration.py index f2bf64c8720..ec150de191b 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/_configuration.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class SpecialWordsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class SpecialWordsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for SpecialWordsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/_model_base.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/_model_base.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/_serialization.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/_serialization.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_configuration.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_configuration.py index 841ab2c3475..730d6f3089f 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class SpecialWordsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class SpecialWordsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for SpecialWordsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/_operations.py index 7a87a83e4f7..b485d575f7f 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -133,7 +133,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -157,9 +157,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def with_and( # pylint: disable=inconsistent-return-statements - self, body: _models.AndModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_and(self, body: _models.AndModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -173,9 +171,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements """ @overload - async def with_and( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_and(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -189,9 +185,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements """ @overload - async def with_and( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_and(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -205,9 +199,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_and( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.AndModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_and(self, body: Union[_models.AndModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_and. :param body: Is one of the following types: AndModel, JSON, IO[bytes] Required. @@ -216,7 +208,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -263,9 +255,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_as( # pylint: disable=inconsistent-return-statements - self, body: _models.AsModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_as(self, body: _models.AsModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -279,9 +269,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements """ @overload - async def with_as( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_as(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -295,9 +283,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements """ @overload - async def with_as( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_as(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -311,9 +297,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_as( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.AsModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_as(self, body: Union[_models.AsModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_as. :param body: Is one of the following types: AsModel, JSON, IO[bytes] Required. @@ -322,7 +306,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +353,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_assert( # pylint: disable=inconsistent-return-statements + async def with_assert( self, body: _models.AssertModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_assert. @@ -385,9 +369,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements """ @overload - async def with_assert( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_assert(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_assert. :param body: Required. @@ -401,9 +383,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements """ @overload - async def with_assert( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_assert(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_assert. :param body: Required. @@ -417,9 +397,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_assert( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.AssertModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_assert(self, body: Union[_models.AssertModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_assert. :param body: Is one of the following types: AssertModel, JSON, IO[bytes] Required. @@ -428,7 +406,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -475,7 +453,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_async( # pylint: disable=inconsistent-return-statements + async def with_async( self, body: _models.AsyncModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_async. @@ -491,9 +469,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements """ @overload - async def with_async( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_async(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_async. :param body: Required. @@ -507,9 +483,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements """ @overload - async def with_async( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_async(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_async. :param body: Required. @@ -523,9 +497,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_async( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.AsyncModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_async(self, body: Union[_models.AsyncModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_async. :param body: Is one of the following types: AsyncModel, JSON, IO[bytes] Required. @@ -534,7 +506,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -581,7 +553,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_await( # pylint: disable=inconsistent-return-statements + async def with_await( self, body: _models.AwaitModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_await. @@ -597,9 +569,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements """ @overload - async def with_await( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_await(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_await. :param body: Required. @@ -613,9 +583,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements """ @overload - async def with_await( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_await(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_await. :param body: Required. @@ -629,9 +597,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_await( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.AwaitModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_await(self, body: Union[_models.AwaitModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_await. :param body: Is one of the following types: AwaitModel, JSON, IO[bytes] Required. @@ -640,7 +606,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -687,7 +653,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_break( # pylint: disable=inconsistent-return-statements + async def with_break( self, body: _models.BreakModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_break. @@ -703,9 +669,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements """ @overload - async def with_break( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_break(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_break. :param body: Required. @@ -719,9 +683,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements """ @overload - async def with_break( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_break(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_break. :param body: Required. @@ -735,9 +697,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_break( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BreakModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_break(self, body: Union[_models.BreakModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_break. :param body: Is one of the following types: BreakModel, JSON, IO[bytes] Required. @@ -746,7 +706,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -793,7 +753,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_class( # pylint: disable=inconsistent-return-statements + async def with_class( self, body: _models.ClassModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_class. @@ -809,9 +769,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements """ @overload - async def with_class( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_class(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_class. :param body: Required. @@ -825,9 +783,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements """ @overload - async def with_class( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_class(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_class. :param body: Required. @@ -841,9 +797,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_class( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ClassModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_class(self, body: Union[_models.ClassModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_class. :param body: Is one of the following types: ClassModel, JSON, IO[bytes] Required. @@ -852,7 +806,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -899,7 +853,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_constructor( # pylint: disable=inconsistent-return-statements + async def with_constructor( self, body: _models.Constructor, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_constructor. @@ -915,9 +869,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements """ @overload - async def with_constructor( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_constructor(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_constructor. :param body: Required. @@ -931,9 +883,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements """ @overload - async def with_constructor( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_constructor(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_constructor. :param body: Required. @@ -947,9 +897,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_constructor( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.Constructor, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_constructor(self, body: Union[_models.Constructor, JSON, IO[bytes]], **kwargs: Any) -> None: """with_constructor. :param body: Is one of the following types: Constructor, JSON, IO[bytes] Required. @@ -958,7 +906,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1005,7 +953,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_continue( # pylint: disable=inconsistent-return-statements + async def with_continue( self, body: _models.ContinueModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_continue. @@ -1021,9 +969,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements """ @overload - async def with_continue( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_continue(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_continue. :param body: Required. @@ -1037,9 +983,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements """ @overload - async def with_continue( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_continue(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_continue. :param body: Required. @@ -1053,9 +997,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_continue( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ContinueModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_continue(self, body: Union[_models.ContinueModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_continue. :param body: Is one of the following types: ContinueModel, JSON, IO[bytes] Required. @@ -1064,7 +1006,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1111,9 +1053,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_def( # pylint: disable=inconsistent-return-statements - self, body: _models.DefModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_def(self, body: _models.DefModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -1127,9 +1067,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements """ @overload - async def with_def( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_def(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -1143,9 +1081,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements """ @overload - async def with_def( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_def(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -1159,9 +1095,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_def( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DefModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_def(self, body: Union[_models.DefModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_def. :param body: Is one of the following types: DefModel, JSON, IO[bytes] Required. @@ -1170,7 +1104,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1217,9 +1151,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_del( # pylint: disable=inconsistent-return-statements - self, body: _models.DelModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_del(self, body: _models.DelModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -1233,9 +1165,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements """ @overload - async def with_del( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_del(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -1249,9 +1179,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements """ @overload - async def with_del( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_del(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -1265,9 +1193,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_del( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DelModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_del(self, body: Union[_models.DelModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_del. :param body: Is one of the following types: DelModel, JSON, IO[bytes] Required. @@ -1276,7 +1202,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1323,7 +1249,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_elif( # pylint: disable=inconsistent-return-statements + async def with_elif( self, body: _models.ElifModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_elif. @@ -1339,9 +1265,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements """ @overload - async def with_elif( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_elif(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_elif. :param body: Required. @@ -1355,9 +1279,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements """ @overload - async def with_elif( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_elif(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_elif. :param body: Required. @@ -1371,9 +1293,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_elif( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ElifModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_elif(self, body: Union[_models.ElifModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_elif. :param body: Is one of the following types: ElifModel, JSON, IO[bytes] Required. @@ -1382,7 +1302,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1429,7 +1349,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_else( # pylint: disable=inconsistent-return-statements + async def with_else( self, body: _models.ElseModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_else. @@ -1445,9 +1365,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements """ @overload - async def with_else( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_else(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_else. :param body: Required. @@ -1461,9 +1379,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements """ @overload - async def with_else( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_else(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_else. :param body: Required. @@ -1477,9 +1393,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_else( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ElseModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_else(self, body: Union[_models.ElseModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_else. :param body: Is one of the following types: ElseModel, JSON, IO[bytes] Required. @@ -1488,7 +1402,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1535,7 +1449,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_except( # pylint: disable=inconsistent-return-statements + async def with_except( self, body: _models.ExceptModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_except. @@ -1551,9 +1465,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements """ @overload - async def with_except( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_except(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_except. :param body: Required. @@ -1567,9 +1479,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements """ @overload - async def with_except( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_except(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_except. :param body: Required. @@ -1583,9 +1493,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_except( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExceptModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_except(self, body: Union[_models.ExceptModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_except. :param body: Is one of the following types: ExceptModel, JSON, IO[bytes] Required. @@ -1594,7 +1502,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1641,7 +1549,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_exec( # pylint: disable=inconsistent-return-statements + async def with_exec( self, body: _models.ExecModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_exec. @@ -1657,9 +1565,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements """ @overload - async def with_exec( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_exec(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_exec. :param body: Required. @@ -1673,9 +1579,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements """ @overload - async def with_exec( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_exec(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_exec. :param body: Required. @@ -1689,9 +1593,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_exec( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExecModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_exec(self, body: Union[_models.ExecModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_exec. :param body: Is one of the following types: ExecModel, JSON, IO[bytes] Required. @@ -1700,7 +1602,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1747,7 +1649,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_finally( # pylint: disable=inconsistent-return-statements + async def with_finally( self, body: _models.FinallyModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_finally. @@ -1763,9 +1665,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements """ @overload - async def with_finally( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_finally(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_finally. :param body: Required. @@ -1779,9 +1679,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements """ @overload - async def with_finally( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_finally(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_finally. :param body: Required. @@ -1795,9 +1693,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_finally( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FinallyModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_finally(self, body: Union[_models.FinallyModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_finally. :param body: Is one of the following types: FinallyModel, JSON, IO[bytes] Required. @@ -1806,7 +1702,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1853,9 +1749,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_for( # pylint: disable=inconsistent-return-statements - self, body: _models.ForModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_for(self, body: _models.ForModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -1869,9 +1763,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements """ @overload - async def with_for( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_for(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -1885,9 +1777,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements """ @overload - async def with_for( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_for(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -1901,9 +1791,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_for( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ForModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_for(self, body: Union[_models.ForModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_for. :param body: Is one of the following types: ForModel, JSON, IO[bytes] Required. @@ -1912,7 +1800,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1959,7 +1847,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_from( # pylint: disable=inconsistent-return-statements + async def with_from( self, body: _models.FromModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_from. @@ -1975,9 +1863,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements """ @overload - async def with_from( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_from(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_from. :param body: Required. @@ -1991,9 +1877,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements """ @overload - async def with_from( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_from(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_from. :param body: Required. @@ -2007,9 +1891,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_from( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FromModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_from(self, body: Union[_models.FromModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_from. :param body: Is one of the following types: FromModel, JSON, IO[bytes] Required. @@ -2018,7 +1900,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2065,7 +1947,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_global( # pylint: disable=inconsistent-return-statements + async def with_global( self, body: _models.GlobalModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_global. @@ -2081,9 +1963,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements """ @overload - async def with_global( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_global(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_global. :param body: Required. @@ -2097,9 +1977,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements """ @overload - async def with_global( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_global(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_global. :param body: Required. @@ -2113,9 +1991,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_global( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.GlobalModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_global(self, body: Union[_models.GlobalModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_global. :param body: Is one of the following types: GlobalModel, JSON, IO[bytes] Required. @@ -2124,7 +2000,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2171,9 +2047,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_if( # pylint: disable=inconsistent-return-statements - self, body: _models.IfModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_if(self, body: _models.IfModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -2187,9 +2061,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements """ @overload - async def with_if( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_if(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -2203,9 +2075,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements """ @overload - async def with_if( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_if(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -2219,9 +2089,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_if( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IfModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_if(self, body: Union[_models.IfModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_if. :param body: Is one of the following types: IfModel, JSON, IO[bytes] Required. @@ -2230,7 +2098,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2277,7 +2145,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_import( # pylint: disable=inconsistent-return-statements + async def with_import( self, body: _models.ImportModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_import. @@ -2293,9 +2161,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements """ @overload - async def with_import( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_import(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_import. :param body: Required. @@ -2309,9 +2175,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements """ @overload - async def with_import( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_import(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_import. :param body: Required. @@ -2325,9 +2189,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_import( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ImportModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_import(self, body: Union[_models.ImportModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_import. :param body: Is one of the following types: ImportModel, JSON, IO[bytes] Required. @@ -2336,7 +2198,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2383,9 +2245,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_in( # pylint: disable=inconsistent-return-statements - self, body: _models.InModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_in(self, body: _models.InModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -2399,9 +2259,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements """ @overload - async def with_in( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_in(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -2415,9 +2273,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements """ @overload - async def with_in( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_in(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -2431,9 +2287,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_in( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.InModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_in(self, body: Union[_models.InModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_in. :param body: Is one of the following types: InModel, JSON, IO[bytes] Required. @@ -2442,7 +2296,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2489,9 +2343,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_is( # pylint: disable=inconsistent-return-statements - self, body: _models.IsModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_is(self, body: _models.IsModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -2505,9 +2357,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements """ @overload - async def with_is( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_is(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -2521,9 +2371,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements """ @overload - async def with_is( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_is(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -2537,9 +2385,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_is( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_is(self, body: Union[_models.IsModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_is. :param body: Is one of the following types: IsModel, JSON, IO[bytes] Required. @@ -2548,7 +2394,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2595,7 +2441,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_lambda( # pylint: disable=inconsistent-return-statements + async def with_lambda( self, body: _models.LambdaModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_lambda. @@ -2611,9 +2457,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements """ @overload - async def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_lambda(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_lambda. :param body: Required. @@ -2627,9 +2471,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements """ @overload - async def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_lambda(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_lambda. :param body: Required. @@ -2643,9 +2485,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.LambdaModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_lambda(self, body: Union[_models.LambdaModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_lambda. :param body: Is one of the following types: LambdaModel, JSON, IO[bytes] Required. @@ -2654,7 +2494,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2701,9 +2541,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_not( # pylint: disable=inconsistent-return-statements - self, body: _models.NotModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_not(self, body: _models.NotModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -2717,9 +2555,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements """ @overload - async def with_not( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_not(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -2733,9 +2569,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements """ @overload - async def with_not( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_not(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -2749,9 +2583,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_not( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.NotModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_not(self, body: Union[_models.NotModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_not. :param body: Is one of the following types: NotModel, JSON, IO[bytes] Required. @@ -2760,7 +2592,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2807,9 +2639,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_or( # pylint: disable=inconsistent-return-statements - self, body: _models.OrModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_or(self, body: _models.OrModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -2823,9 +2653,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements """ @overload - async def with_or( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_or(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -2839,9 +2667,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements """ @overload - async def with_or( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_or(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -2855,9 +2681,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_or( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.OrModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_or(self, body: Union[_models.OrModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_or. :param body: Is one of the following types: OrModel, JSON, IO[bytes] Required. @@ -2866,7 +2690,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2913,7 +2737,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_pass( # pylint: disable=inconsistent-return-statements + async def with_pass( self, body: _models.PassModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_pass. @@ -2929,9 +2753,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements """ @overload - async def with_pass( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_pass(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_pass. :param body: Required. @@ -2945,9 +2767,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements """ @overload - async def with_pass( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_pass(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_pass. :param body: Required. @@ -2961,9 +2781,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_pass( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PassModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_pass(self, body: Union[_models.PassModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_pass. :param body: Is one of the following types: PassModel, JSON, IO[bytes] Required. @@ -2972,7 +2790,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3019,7 +2837,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_raise( # pylint: disable=inconsistent-return-statements + async def with_raise( self, body: _models.RaiseModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_raise. @@ -3035,9 +2853,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements """ @overload - async def with_raise( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_raise(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_raise. :param body: Required. @@ -3051,9 +2867,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements """ @overload - async def with_raise( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_raise(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_raise. :param body: Required. @@ -3067,9 +2881,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_raise( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.RaiseModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_raise(self, body: Union[_models.RaiseModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_raise. :param body: Is one of the following types: RaiseModel, JSON, IO[bytes] Required. @@ -3078,7 +2890,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3125,7 +2937,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_return( # pylint: disable=inconsistent-return-statements + async def with_return( self, body: _models.ReturnModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_return. @@ -3141,9 +2953,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements """ @overload - async def with_return( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_return(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_return. :param body: Required. @@ -3157,9 +2967,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements """ @overload - async def with_return( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_return(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_return. :param body: Required. @@ -3173,9 +2981,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_return( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ReturnModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_return(self, body: Union[_models.ReturnModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_return. :param body: Is one of the following types: ReturnModel, JSON, IO[bytes] Required. @@ -3184,7 +2990,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3231,9 +3037,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_try( # pylint: disable=inconsistent-return-statements - self, body: _models.TryModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_try(self, body: _models.TryModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -3247,9 +3051,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements """ @overload - async def with_try( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_try(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -3263,9 +3065,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements """ @overload - async def with_try( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_try(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -3279,9 +3079,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_try( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.TryModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_try(self, body: Union[_models.TryModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_try. :param body: Is one of the following types: TryModel, JSON, IO[bytes] Required. @@ -3290,7 +3088,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3337,7 +3135,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_while( # pylint: disable=inconsistent-return-statements + async def with_while( self, body: _models.WhileModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_while. @@ -3353,9 +3151,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements """ @overload - async def with_while( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_while(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_while. :param body: Required. @@ -3369,9 +3165,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements """ @overload - async def with_while( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_while(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_while. :param body: Required. @@ -3385,9 +3179,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_while( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.WhileModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_while(self, body: Union[_models.WhileModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_while. :param body: Is one of the following types: WhileModel, JSON, IO[bytes] Required. @@ -3396,7 +3188,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3235,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_with( # pylint: disable=inconsistent-return-statements + async def with_with( self, body: _models.WithModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_with. @@ -3459,9 +3251,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements """ @overload - async def with_with( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_with(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_with. :param body: Required. @@ -3475,9 +3265,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements """ @overload - async def with_with( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_with(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_with. :param body: Required. @@ -3491,9 +3279,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_with( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.WithModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_with(self, body: Union[_models.WithModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_with. :param body: Is one of the following types: WithModel, JSON, IO[bytes] Required. @@ -3502,7 +3288,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3549,7 +3335,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_yield( # pylint: disable=inconsistent-return-statements + async def with_yield( self, body: _models.YieldModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_yield. @@ -3565,9 +3351,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements """ @overload - async def with_yield( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_yield(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_yield. :param body: Required. @@ -3581,9 +3365,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements """ @overload - async def with_yield( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_yield(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_yield. :param body: Required. @@ -3597,9 +3379,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def with_yield( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.YieldModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_yield(self, body: Union[_models.YieldModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_yield. :param body: Is one of the following types: YieldModel, JSON, IO[bytes] Required. @@ -3608,7 +3388,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3673,7 +3453,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def same_as_model( # pylint: disable=inconsistent-return-statements + async def same_as_model( self, body: _models.SameAsModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """same_as_model. @@ -3689,9 +3469,7 @@ async def same_as_model( # pylint: disable=inconsistent-return-statements """ @overload - async def same_as_model( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def same_as_model(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """same_as_model. :param body: Required. @@ -3705,9 +3483,7 @@ async def same_as_model( # pylint: disable=inconsistent-return-statements """ @overload - async def same_as_model( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def same_as_model(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """same_as_model. :param body: Required. @@ -3721,9 +3497,7 @@ async def same_as_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def same_as_model( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SameAsModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def same_as_model(self, body: Union[_models.SameAsModel, JSON, IO[bytes]], **kwargs: Any) -> None: """same_as_model. :param body: Is one of the following types: SameAsModel, JSON, IO[bytes] Required. @@ -3732,7 +3506,7 @@ async def same_as_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3797,14 +3571,14 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def and_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def and_method(self, **kwargs: Any) -> None: """and_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3841,14 +3615,14 @@ async def and_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def as_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def as_method(self, **kwargs: Any) -> None: """as_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3885,14 +3659,14 @@ async def as_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def assert_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def assert_method(self, **kwargs: Any) -> None: """assert_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3929,14 +3703,14 @@ async def assert_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def async_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def async_method(self, **kwargs: Any) -> None: """async_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3973,14 +3747,14 @@ async def async_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def await_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def await_method(self, **kwargs: Any) -> None: """await_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4017,14 +3791,14 @@ async def await_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def break_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def break_method(self, **kwargs: Any) -> None: """break_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4061,14 +3835,14 @@ async def break_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def class_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def class_method(self, **kwargs: Any) -> None: """class_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4105,14 +3879,14 @@ async def class_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def constructor(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def constructor(self, **kwargs: Any) -> None: """constructor. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4149,14 +3923,14 @@ async def constructor(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def continue_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def continue_method(self, **kwargs: Any) -> None: """continue_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4193,14 +3967,14 @@ async def continue_method(self, **kwargs: Any) -> None: # pylint: disable=incon return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def def_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def def_method(self, **kwargs: Any) -> None: """def_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4237,14 +4011,14 @@ async def def_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def del_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def del_method(self, **kwargs: Any) -> None: """del_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4281,14 +4055,14 @@ async def del_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def elif_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def elif_method(self, **kwargs: Any) -> None: """elif_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4325,14 +4099,14 @@ async def elif_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def else_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def else_method(self, **kwargs: Any) -> None: """else_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4369,14 +4143,14 @@ async def else_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def except_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def except_method(self, **kwargs: Any) -> None: """except_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4413,14 +4187,14 @@ async def except_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def exec_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def exec_method(self, **kwargs: Any) -> None: """exec_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4457,14 +4231,14 @@ async def exec_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def finally_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def finally_method(self, **kwargs: Any) -> None: """finally_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4501,14 +4275,14 @@ async def finally_method(self, **kwargs: Any) -> None: # pylint: disable=incons return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def for_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def for_method(self, **kwargs: Any) -> None: """for_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4545,14 +4319,14 @@ async def for_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def from_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def from_method(self, **kwargs: Any) -> None: """from_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4589,14 +4363,14 @@ async def from_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def global_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def global_method(self, **kwargs: Any) -> None: """global_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4633,14 +4407,14 @@ async def global_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def if_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def if_method(self, **kwargs: Any) -> None: """if_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4677,14 +4451,14 @@ async def if_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def import_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def import_method(self, **kwargs: Any) -> None: """import_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4721,14 +4495,14 @@ async def import_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def in_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def in_method(self, **kwargs: Any) -> None: """in_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4765,14 +4539,14 @@ async def in_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def is_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def is_method(self, **kwargs: Any) -> None: """is_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4809,14 +4583,14 @@ async def is_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def lambda_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def lambda_method(self, **kwargs: Any) -> None: """lambda_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4853,14 +4627,14 @@ async def lambda_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def not_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def not_method(self, **kwargs: Any) -> None: """not_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4897,14 +4671,14 @@ async def not_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def or_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def or_method(self, **kwargs: Any) -> None: """or_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4941,14 +4715,14 @@ async def or_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def pass_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def pass_method(self, **kwargs: Any) -> None: """pass_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4985,14 +4759,14 @@ async def pass_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def raise_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def raise_method(self, **kwargs: Any) -> None: """raise_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5029,14 +4803,14 @@ async def raise_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def return_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def return_method(self, **kwargs: Any) -> None: """return_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5073,14 +4847,14 @@ async def return_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def try_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def try_method(self, **kwargs: Any) -> None: """try_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5117,14 +4891,14 @@ async def try_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def while_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def while_method(self, **kwargs: Any) -> None: """while_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5161,14 +4935,14 @@ async def while_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def with_method(self, **kwargs: Any) -> None: """with_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5205,14 +4979,14 @@ async def with_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def yield_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def yield_method(self, **kwargs: Any) -> None: """yield_method. :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5267,9 +5041,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def with_and( # pylint: disable=inconsistent-return-statements - self, *, and_parameter: str, **kwargs: Any - ) -> None: + async def with_and(self, *, and_parameter: str, **kwargs: Any) -> None: """with_and. :keyword and_parameter: Required. @@ -5278,7 +5050,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5316,9 +5088,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_as( # pylint: disable=inconsistent-return-statements - self, *, as_parameter: str, **kwargs: Any - ) -> None: + async def with_as(self, *, as_parameter: str, **kwargs: Any) -> None: """with_as. :keyword as_parameter: Required. @@ -5327,7 +5097,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5365,9 +5135,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_assert( # pylint: disable=inconsistent-return-statements - self, *, assert_parameter: str, **kwargs: Any - ) -> None: + async def with_assert(self, *, assert_parameter: str, **kwargs: Any) -> None: """with_assert. :keyword assert_parameter: Required. @@ -5376,7 +5144,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5414,9 +5182,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_async( # pylint: disable=inconsistent-return-statements - self, *, async_parameter: str, **kwargs: Any - ) -> None: + async def with_async(self, *, async_parameter: str, **kwargs: Any) -> None: """with_async. :keyword async_parameter: Required. @@ -5425,7 +5191,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5463,9 +5229,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_await( # pylint: disable=inconsistent-return-statements - self, *, await_parameter: str, **kwargs: Any - ) -> None: + async def with_await(self, *, await_parameter: str, **kwargs: Any) -> None: """with_await. :keyword await_parameter: Required. @@ -5474,7 +5238,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5512,9 +5276,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_break( # pylint: disable=inconsistent-return-statements - self, *, break_parameter: str, **kwargs: Any - ) -> None: + async def with_break(self, *, break_parameter: str, **kwargs: Any) -> None: """with_break. :keyword break_parameter: Required. @@ -5523,7 +5285,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5561,9 +5323,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_class( # pylint: disable=inconsistent-return-statements - self, *, class_parameter: str, **kwargs: Any - ) -> None: + async def with_class(self, *, class_parameter: str, **kwargs: Any) -> None: """with_class. :keyword class_parameter: Required. @@ -5572,7 +5332,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5610,9 +5370,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_constructor( # pylint: disable=inconsistent-return-statements - self, *, constructor: str, **kwargs: Any - ) -> None: + async def with_constructor(self, *, constructor: str, **kwargs: Any) -> None: """with_constructor. :keyword constructor: Required. @@ -5621,7 +5379,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5659,9 +5417,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_continue( # pylint: disable=inconsistent-return-statements - self, *, continue_parameter: str, **kwargs: Any - ) -> None: + async def with_continue(self, *, continue_parameter: str, **kwargs: Any) -> None: """with_continue. :keyword continue_parameter: Required. @@ -5670,7 +5426,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5708,9 +5464,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_def( # pylint: disable=inconsistent-return-statements - self, *, def_parameter: str, **kwargs: Any - ) -> None: + async def with_def(self, *, def_parameter: str, **kwargs: Any) -> None: """with_def. :keyword def_parameter: Required. @@ -5719,7 +5473,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5757,9 +5511,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_del( # pylint: disable=inconsistent-return-statements - self, *, del_parameter: str, **kwargs: Any - ) -> None: + async def with_del(self, *, del_parameter: str, **kwargs: Any) -> None: """with_del. :keyword del_parameter: Required. @@ -5768,7 +5520,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5806,9 +5558,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_elif( # pylint: disable=inconsistent-return-statements - self, *, elif_parameter: str, **kwargs: Any - ) -> None: + async def with_elif(self, *, elif_parameter: str, **kwargs: Any) -> None: """with_elif. :keyword elif_parameter: Required. @@ -5817,7 +5567,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5855,9 +5605,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_else( # pylint: disable=inconsistent-return-statements - self, *, else_parameter: str, **kwargs: Any - ) -> None: + async def with_else(self, *, else_parameter: str, **kwargs: Any) -> None: """with_else. :keyword else_parameter: Required. @@ -5866,7 +5614,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5904,9 +5652,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_except( # pylint: disable=inconsistent-return-statements - self, *, except_parameter: str, **kwargs: Any - ) -> None: + async def with_except(self, *, except_parameter: str, **kwargs: Any) -> None: """with_except. :keyword except_parameter: Required. @@ -5915,7 +5661,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5953,9 +5699,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_exec( # pylint: disable=inconsistent-return-statements - self, *, exec_parameter: str, **kwargs: Any - ) -> None: + async def with_exec(self, *, exec_parameter: str, **kwargs: Any) -> None: """with_exec. :keyword exec_parameter: Required. @@ -5964,7 +5708,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6002,9 +5746,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_finally( # pylint: disable=inconsistent-return-statements - self, *, finally_parameter: str, **kwargs: Any - ) -> None: + async def with_finally(self, *, finally_parameter: str, **kwargs: Any) -> None: """with_finally. :keyword finally_parameter: Required. @@ -6013,7 +5755,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6051,9 +5793,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_for( # pylint: disable=inconsistent-return-statements - self, *, for_parameter: str, **kwargs: Any - ) -> None: + async def with_for(self, *, for_parameter: str, **kwargs: Any) -> None: """with_for. :keyword for_parameter: Required. @@ -6062,7 +5802,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6100,9 +5840,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_from( # pylint: disable=inconsistent-return-statements - self, *, from_parameter: str, **kwargs: Any - ) -> None: + async def with_from(self, *, from_parameter: str, **kwargs: Any) -> None: """with_from. :keyword from_parameter: Required. @@ -6111,7 +5849,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6149,9 +5887,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_global( # pylint: disable=inconsistent-return-statements - self, *, global_parameter: str, **kwargs: Any - ) -> None: + async def with_global(self, *, global_parameter: str, **kwargs: Any) -> None: """with_global. :keyword global_parameter: Required. @@ -6160,7 +5896,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6198,9 +5934,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_if( # pylint: disable=inconsistent-return-statements - self, *, if_parameter: str, **kwargs: Any - ) -> None: + async def with_if(self, *, if_parameter: str, **kwargs: Any) -> None: """with_if. :keyword if_parameter: Required. @@ -6209,7 +5943,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6247,9 +5981,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_import( # pylint: disable=inconsistent-return-statements - self, *, import_parameter: str, **kwargs: Any - ) -> None: + async def with_import(self, *, import_parameter: str, **kwargs: Any) -> None: """with_import. :keyword import_parameter: Required. @@ -6258,7 +5990,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6296,9 +6028,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_in( # pylint: disable=inconsistent-return-statements - self, *, in_parameter: str, **kwargs: Any - ) -> None: + async def with_in(self, *, in_parameter: str, **kwargs: Any) -> None: """with_in. :keyword in_parameter: Required. @@ -6307,7 +6037,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6345,9 +6075,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_is( # pylint: disable=inconsistent-return-statements - self, *, is_parameter: str, **kwargs: Any - ) -> None: + async def with_is(self, *, is_parameter: str, **kwargs: Any) -> None: """with_is. :keyword is_parameter: Required. @@ -6356,7 +6084,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6394,9 +6122,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_lambda( # pylint: disable=inconsistent-return-statements - self, *, lambda_parameter: str, **kwargs: Any - ) -> None: + async def with_lambda(self, *, lambda_parameter: str, **kwargs: Any) -> None: """with_lambda. :keyword lambda_parameter: Required. @@ -6405,7 +6131,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6443,9 +6169,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_not( # pylint: disable=inconsistent-return-statements - self, *, not_parameter: str, **kwargs: Any - ) -> None: + async def with_not(self, *, not_parameter: str, **kwargs: Any) -> None: """with_not. :keyword not_parameter: Required. @@ -6454,7 +6178,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6492,9 +6216,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_or( # pylint: disable=inconsistent-return-statements - self, *, or_parameter: str, **kwargs: Any - ) -> None: + async def with_or(self, *, or_parameter: str, **kwargs: Any) -> None: """with_or. :keyword or_parameter: Required. @@ -6503,7 +6225,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6541,9 +6263,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_pass( # pylint: disable=inconsistent-return-statements - self, *, pass_parameter: str, **kwargs: Any - ) -> None: + async def with_pass(self, *, pass_parameter: str, **kwargs: Any) -> None: """with_pass. :keyword pass_parameter: Required. @@ -6552,7 +6272,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6590,9 +6310,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_raise( # pylint: disable=inconsistent-return-statements - self, *, raise_parameter: str, **kwargs: Any - ) -> None: + async def with_raise(self, *, raise_parameter: str, **kwargs: Any) -> None: """with_raise. :keyword raise_parameter: Required. @@ -6601,7 +6319,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6639,9 +6357,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_return( # pylint: disable=inconsistent-return-statements - self, *, return_parameter: str, **kwargs: Any - ) -> None: + async def with_return(self, *, return_parameter: str, **kwargs: Any) -> None: """with_return. :keyword return_parameter: Required. @@ -6650,7 +6366,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6688,9 +6404,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_try( # pylint: disable=inconsistent-return-statements - self, *, try_parameter: str, **kwargs: Any - ) -> None: + async def with_try(self, *, try_parameter: str, **kwargs: Any) -> None: """with_try. :keyword try_parameter: Required. @@ -6699,7 +6413,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6737,9 +6451,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_while( # pylint: disable=inconsistent-return-statements - self, *, while_parameter: str, **kwargs: Any - ) -> None: + async def with_while(self, *, while_parameter: str, **kwargs: Any) -> None: """with_while. :keyword while_parameter: Required. @@ -6748,7 +6460,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6786,9 +6498,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_with( # pylint: disable=inconsistent-return-statements - self, *, with_parameter: str, **kwargs: Any - ) -> None: + async def with_with(self, *, with_parameter: str, **kwargs: Any) -> None: """with_with. :keyword with_parameter: Required. @@ -6797,7 +6507,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6835,9 +6545,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_yield( # pylint: disable=inconsistent-return-statements - self, *, yield_parameter: str, **kwargs: Any - ) -> None: + async def with_yield(self, *, yield_parameter: str, **kwargs: Any) -> None: """with_yield. :keyword yield_parameter: Required. @@ -6846,7 +6554,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6884,9 +6592,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def with_cancellation_token( # pylint: disable=inconsistent-return-statements - self, *, cancellation_token: str, **kwargs: Any - ) -> None: + async def with_cancellation_token(self, *, cancellation_token: str, **kwargs: Any) -> None: """with_cancellation_token. :keyword cancellation_token: Required. @@ -6895,7 +6601,7 @@ async def with_cancellation_token( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/models/_models.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/models/_models.py index ccc554198c5..844956cf4f1 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/models/_models.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/models/_models.py @@ -1,5 +1,5 @@ -# coding=utf-8 # pylint: disable=too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/_operations.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/_operations.py index 92b557f7d1c..3964d22d76c 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1177,9 +1177,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def with_and( # pylint: disable=inconsistent-return-statements - self, body: _models.AndModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_and(self, body: _models.AndModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -1193,9 +1191,7 @@ def with_and( # pylint: disable=inconsistent-return-statements """ @overload - def with_and( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_and(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -1209,9 +1205,7 @@ def with_and( # pylint: disable=inconsistent-return-statements """ @overload - def with_and( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_and(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -1236,7 +1230,7 @@ def with_and( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1283,9 +1277,7 @@ def with_and( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_as( # pylint: disable=inconsistent-return-statements - self, body: _models.AsModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_as(self, body: _models.AsModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -1299,9 +1291,7 @@ def with_as( # pylint: disable=inconsistent-return-statements """ @overload - def with_as( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_as(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -1315,9 +1305,7 @@ def with_as( # pylint: disable=inconsistent-return-statements """ @overload - def with_as( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_as(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -1342,7 +1330,7 @@ def with_as( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1389,9 +1377,7 @@ def with_as( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_assert( # pylint: disable=inconsistent-return-statements - self, body: _models.AssertModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_assert(self, body: _models.AssertModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_assert. :param body: Required. @@ -1405,9 +1391,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements """ @overload - def with_assert( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_assert(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_assert. :param body: Required. @@ -1421,9 +1405,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements """ @overload - def with_assert( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_assert(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_assert. :param body: Required. @@ -1448,7 +1430,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1495,9 +1477,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_async( # pylint: disable=inconsistent-return-statements - self, body: _models.AsyncModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_async(self, body: _models.AsyncModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_async. :param body: Required. @@ -1511,9 +1491,7 @@ def with_async( # pylint: disable=inconsistent-return-statements """ @overload - def with_async( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_async(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_async. :param body: Required. @@ -1527,9 +1505,7 @@ def with_async( # pylint: disable=inconsistent-return-statements """ @overload - def with_async( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_async(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_async. :param body: Required. @@ -1554,7 +1530,7 @@ def with_async( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1601,9 +1577,7 @@ def with_async( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_await( # pylint: disable=inconsistent-return-statements - self, body: _models.AwaitModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_await(self, body: _models.AwaitModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_await. :param body: Required. @@ -1617,9 +1591,7 @@ def with_await( # pylint: disable=inconsistent-return-statements """ @overload - def with_await( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_await(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_await. :param body: Required. @@ -1633,9 +1605,7 @@ def with_await( # pylint: disable=inconsistent-return-statements """ @overload - def with_await( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_await(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_await. :param body: Required. @@ -1660,7 +1630,7 @@ def with_await( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1707,9 +1677,7 @@ def with_await( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_break( # pylint: disable=inconsistent-return-statements - self, body: _models.BreakModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_break(self, body: _models.BreakModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_break. :param body: Required. @@ -1723,9 +1691,7 @@ def with_break( # pylint: disable=inconsistent-return-statements """ @overload - def with_break( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_break(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_break. :param body: Required. @@ -1739,9 +1705,7 @@ def with_break( # pylint: disable=inconsistent-return-statements """ @overload - def with_break( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_break(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_break. :param body: Required. @@ -1766,7 +1730,7 @@ def with_break( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1813,9 +1777,7 @@ def with_break( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_class( # pylint: disable=inconsistent-return-statements - self, body: _models.ClassModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_class(self, body: _models.ClassModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_class. :param body: Required. @@ -1829,9 +1791,7 @@ def with_class( # pylint: disable=inconsistent-return-statements """ @overload - def with_class( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_class(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_class. :param body: Required. @@ -1845,9 +1805,7 @@ def with_class( # pylint: disable=inconsistent-return-statements """ @overload - def with_class( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_class(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_class. :param body: Required. @@ -1872,7 +1830,7 @@ def with_class( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1919,7 +1877,7 @@ def with_class( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_constructor( # pylint: disable=inconsistent-return-statements + def with_constructor( self, body: _models.Constructor, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_constructor. @@ -1935,9 +1893,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements """ @overload - def with_constructor( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_constructor(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_constructor. :param body: Required. @@ -1951,9 +1907,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements """ @overload - def with_constructor( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_constructor(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_constructor. :param body: Required. @@ -1978,7 +1932,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2025,7 +1979,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_continue( # pylint: disable=inconsistent-return-statements + def with_continue( self, body: _models.ContinueModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_continue. @@ -2041,9 +1995,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements """ @overload - def with_continue( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_continue(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_continue. :param body: Required. @@ -2057,9 +2009,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements """ @overload - def with_continue( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_continue(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_continue. :param body: Required. @@ -2084,7 +2034,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2131,9 +2081,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_def( # pylint: disable=inconsistent-return-statements - self, body: _models.DefModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_def(self, body: _models.DefModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -2147,9 +2095,7 @@ def with_def( # pylint: disable=inconsistent-return-statements """ @overload - def with_def( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_def(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -2163,9 +2109,7 @@ def with_def( # pylint: disable=inconsistent-return-statements """ @overload - def with_def( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_def(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -2190,7 +2134,7 @@ def with_def( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2237,9 +2181,7 @@ def with_def( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_del( # pylint: disable=inconsistent-return-statements - self, body: _models.DelModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_del(self, body: _models.DelModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -2253,9 +2195,7 @@ def with_del( # pylint: disable=inconsistent-return-statements """ @overload - def with_del( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_del(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -2269,9 +2209,7 @@ def with_del( # pylint: disable=inconsistent-return-statements """ @overload - def with_del( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_del(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -2296,7 +2234,7 @@ def with_del( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2343,9 +2281,7 @@ def with_del( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_elif( # pylint: disable=inconsistent-return-statements - self, body: _models.ElifModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_elif(self, body: _models.ElifModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_elif. :param body: Required. @@ -2359,9 +2295,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements """ @overload - def with_elif( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_elif(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_elif. :param body: Required. @@ -2375,9 +2309,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements """ @overload - def with_elif( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_elif(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_elif. :param body: Required. @@ -2402,7 +2334,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2449,9 +2381,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_else( # pylint: disable=inconsistent-return-statements - self, body: _models.ElseModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_else(self, body: _models.ElseModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_else. :param body: Required. @@ -2465,9 +2395,7 @@ def with_else( # pylint: disable=inconsistent-return-statements """ @overload - def with_else( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_else(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_else. :param body: Required. @@ -2481,9 +2409,7 @@ def with_else( # pylint: disable=inconsistent-return-statements """ @overload - def with_else( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_else(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_else. :param body: Required. @@ -2508,7 +2434,7 @@ def with_else( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2555,9 +2481,7 @@ def with_else( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_except( # pylint: disable=inconsistent-return-statements - self, body: _models.ExceptModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_except(self, body: _models.ExceptModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_except. :param body: Required. @@ -2571,9 +2495,7 @@ def with_except( # pylint: disable=inconsistent-return-statements """ @overload - def with_except( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_except(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_except. :param body: Required. @@ -2587,9 +2509,7 @@ def with_except( # pylint: disable=inconsistent-return-statements """ @overload - def with_except( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_except(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_except. :param body: Required. @@ -2614,7 +2534,7 @@ def with_except( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2661,9 +2581,7 @@ def with_except( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_exec( # pylint: disable=inconsistent-return-statements - self, body: _models.ExecModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_exec(self, body: _models.ExecModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_exec. :param body: Required. @@ -2677,9 +2595,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements """ @overload - def with_exec( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_exec(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_exec. :param body: Required. @@ -2693,9 +2609,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements """ @overload - def with_exec( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_exec(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_exec. :param body: Required. @@ -2720,7 +2634,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2767,7 +2681,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_finally( # pylint: disable=inconsistent-return-statements + def with_finally( self, body: _models.FinallyModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_finally. @@ -2783,9 +2697,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements """ @overload - def with_finally( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_finally(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_finally. :param body: Required. @@ -2799,9 +2711,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements """ @overload - def with_finally( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_finally(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_finally. :param body: Required. @@ -2826,7 +2736,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2873,9 +2783,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_for( # pylint: disable=inconsistent-return-statements - self, body: _models.ForModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_for(self, body: _models.ForModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -2889,9 +2797,7 @@ def with_for( # pylint: disable=inconsistent-return-statements """ @overload - def with_for( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_for(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -2905,9 +2811,7 @@ def with_for( # pylint: disable=inconsistent-return-statements """ @overload - def with_for( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_for(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -2932,7 +2836,7 @@ def with_for( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2979,9 +2883,7 @@ def with_for( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_from( # pylint: disable=inconsistent-return-statements - self, body: _models.FromModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_from(self, body: _models.FromModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_from. :param body: Required. @@ -2995,9 +2897,7 @@ def with_from( # pylint: disable=inconsistent-return-statements """ @overload - def with_from( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_from(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_from. :param body: Required. @@ -3011,9 +2911,7 @@ def with_from( # pylint: disable=inconsistent-return-statements """ @overload - def with_from( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_from(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_from. :param body: Required. @@ -3038,7 +2936,7 @@ def with_from( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3085,9 +2983,7 @@ def with_from( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_global( # pylint: disable=inconsistent-return-statements - self, body: _models.GlobalModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_global(self, body: _models.GlobalModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_global. :param body: Required. @@ -3101,9 +2997,7 @@ def with_global( # pylint: disable=inconsistent-return-statements """ @overload - def with_global( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_global(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_global. :param body: Required. @@ -3117,9 +3011,7 @@ def with_global( # pylint: disable=inconsistent-return-statements """ @overload - def with_global( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_global(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_global. :param body: Required. @@ -3144,7 +3036,7 @@ def with_global( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3191,9 +3083,7 @@ def with_global( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_if( # pylint: disable=inconsistent-return-statements - self, body: _models.IfModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_if(self, body: _models.IfModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -3207,9 +3097,7 @@ def with_if( # pylint: disable=inconsistent-return-statements """ @overload - def with_if( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_if(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -3223,9 +3111,7 @@ def with_if( # pylint: disable=inconsistent-return-statements """ @overload - def with_if( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_if(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -3250,7 +3136,7 @@ def with_if( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3297,9 +3183,7 @@ def with_if( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_import( # pylint: disable=inconsistent-return-statements - self, body: _models.ImportModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_import(self, body: _models.ImportModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_import. :param body: Required. @@ -3313,9 +3197,7 @@ def with_import( # pylint: disable=inconsistent-return-statements """ @overload - def with_import( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_import(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_import. :param body: Required. @@ -3329,9 +3211,7 @@ def with_import( # pylint: disable=inconsistent-return-statements """ @overload - def with_import( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_import(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_import. :param body: Required. @@ -3356,7 +3236,7 @@ def with_import( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3403,9 +3283,7 @@ def with_import( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_in( # pylint: disable=inconsistent-return-statements - self, body: _models.InModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_in(self, body: _models.InModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -3419,9 +3297,7 @@ def with_in( # pylint: disable=inconsistent-return-statements """ @overload - def with_in( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_in(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -3435,9 +3311,7 @@ def with_in( # pylint: disable=inconsistent-return-statements """ @overload - def with_in( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_in(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -3462,7 +3336,7 @@ def with_in( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3509,9 +3383,7 @@ def with_in( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_is( # pylint: disable=inconsistent-return-statements - self, body: _models.IsModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_is(self, body: _models.IsModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -3525,9 +3397,7 @@ def with_is( # pylint: disable=inconsistent-return-statements """ @overload - def with_is( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_is(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -3541,9 +3411,7 @@ def with_is( # pylint: disable=inconsistent-return-statements """ @overload - def with_is( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_is(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -3568,7 +3436,7 @@ def with_is( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3615,9 +3483,7 @@ def with_is( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: _models.LambdaModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_lambda(self, body: _models.LambdaModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_lambda. :param body: Required. @@ -3631,9 +3497,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements """ @overload - def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_lambda(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_lambda. :param body: Required. @@ -3647,9 +3511,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements """ @overload - def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_lambda(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_lambda. :param body: Required. @@ -3674,7 +3536,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3721,9 +3583,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_not( # pylint: disable=inconsistent-return-statements - self, body: _models.NotModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_not(self, body: _models.NotModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -3737,9 +3597,7 @@ def with_not( # pylint: disable=inconsistent-return-statements """ @overload - def with_not( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_not(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -3753,9 +3611,7 @@ def with_not( # pylint: disable=inconsistent-return-statements """ @overload - def with_not( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_not(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -3780,7 +3636,7 @@ def with_not( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3827,9 +3683,7 @@ def with_not( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_or( # pylint: disable=inconsistent-return-statements - self, body: _models.OrModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_or(self, body: _models.OrModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -3843,9 +3697,7 @@ def with_or( # pylint: disable=inconsistent-return-statements """ @overload - def with_or( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_or(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -3859,9 +3711,7 @@ def with_or( # pylint: disable=inconsistent-return-statements """ @overload - def with_or( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_or(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -3886,7 +3736,7 @@ def with_or( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3933,9 +3783,7 @@ def with_or( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_pass( # pylint: disable=inconsistent-return-statements - self, body: _models.PassModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_pass(self, body: _models.PassModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_pass. :param body: Required. @@ -3949,9 +3797,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements """ @overload - def with_pass( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_pass(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_pass. :param body: Required. @@ -3965,9 +3811,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements """ @overload - def with_pass( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_pass(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_pass. :param body: Required. @@ -3992,7 +3836,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4039,9 +3883,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_raise( # pylint: disable=inconsistent-return-statements - self, body: _models.RaiseModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_raise(self, body: _models.RaiseModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_raise. :param body: Required. @@ -4055,9 +3897,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements """ @overload - def with_raise( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_raise(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_raise. :param body: Required. @@ -4071,9 +3911,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements """ @overload - def with_raise( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_raise(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_raise. :param body: Required. @@ -4098,7 +3936,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4145,9 +3983,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_return( # pylint: disable=inconsistent-return-statements - self, body: _models.ReturnModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_return(self, body: _models.ReturnModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_return. :param body: Required. @@ -4161,9 +3997,7 @@ def with_return( # pylint: disable=inconsistent-return-statements """ @overload - def with_return( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_return(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_return. :param body: Required. @@ -4177,9 +4011,7 @@ def with_return( # pylint: disable=inconsistent-return-statements """ @overload - def with_return( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_return(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_return. :param body: Required. @@ -4204,7 +4036,7 @@ def with_return( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4251,9 +4083,7 @@ def with_return( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_try( # pylint: disable=inconsistent-return-statements - self, body: _models.TryModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_try(self, body: _models.TryModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -4267,9 +4097,7 @@ def with_try( # pylint: disable=inconsistent-return-statements """ @overload - def with_try( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_try(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -4283,9 +4111,7 @@ def with_try( # pylint: disable=inconsistent-return-statements """ @overload - def with_try( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_try(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -4310,7 +4136,7 @@ def with_try( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4357,9 +4183,7 @@ def with_try( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_while( # pylint: disable=inconsistent-return-statements - self, body: _models.WhileModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_while(self, body: _models.WhileModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_while. :param body: Required. @@ -4373,9 +4197,7 @@ def with_while( # pylint: disable=inconsistent-return-statements """ @overload - def with_while( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_while(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_while. :param body: Required. @@ -4389,9 +4211,7 @@ def with_while( # pylint: disable=inconsistent-return-statements """ @overload - def with_while( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_while(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_while. :param body: Required. @@ -4416,7 +4236,7 @@ def with_while( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4463,9 +4283,7 @@ def with_while( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_with( # pylint: disable=inconsistent-return-statements - self, body: _models.WithModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_with(self, body: _models.WithModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_with. :param body: Required. @@ -4479,9 +4297,7 @@ def with_with( # pylint: disable=inconsistent-return-statements """ @overload - def with_with( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_with(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_with. :param body: Required. @@ -4495,9 +4311,7 @@ def with_with( # pylint: disable=inconsistent-return-statements """ @overload - def with_with( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_with(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_with. :param body: Required. @@ -4522,7 +4336,7 @@ def with_with( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4569,9 +4383,7 @@ def with_with( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_yield( # pylint: disable=inconsistent-return-statements - self, body: _models.YieldModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_yield(self, body: _models.YieldModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_yield. :param body: Required. @@ -4585,9 +4397,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements """ @overload - def with_yield( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_yield(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_yield. :param body: Required. @@ -4601,9 +4411,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements """ @overload - def with_yield( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_yield(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_yield. :param body: Required. @@ -4628,7 +4436,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4693,7 +4501,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def same_as_model( # pylint: disable=inconsistent-return-statements + def same_as_model( self, body: _models.SameAsModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """same_as_model. @@ -4709,9 +4517,7 @@ def same_as_model( # pylint: disable=inconsistent-return-statements """ @overload - def same_as_model( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def same_as_model(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """same_as_model. :param body: Required. @@ -4725,9 +4531,7 @@ def same_as_model( # pylint: disable=inconsistent-return-statements """ @overload - def same_as_model( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def same_as_model(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """same_as_model. :param body: Required. @@ -4752,7 +4556,7 @@ def same_as_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4824,7 +4628,7 @@ def and_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4868,7 +4672,7 @@ def as_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4912,7 +4716,7 @@ def assert_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4956,7 +4760,7 @@ def async_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5000,7 +4804,7 @@ def await_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5044,7 +4848,7 @@ def break_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5088,7 +4892,7 @@ def class_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5132,7 +4936,7 @@ def constructor(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5176,7 +4980,7 @@ def continue_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5220,7 +5024,7 @@ def def_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5264,7 +5068,7 @@ def del_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5308,7 +5112,7 @@ def elif_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5352,7 +5156,7 @@ def else_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5396,7 +5200,7 @@ def except_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5440,7 +5244,7 @@ def exec_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5484,7 +5288,7 @@ def finally_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5528,7 +5332,7 @@ def for_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5572,7 +5376,7 @@ def from_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5616,7 +5420,7 @@ def global_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5660,7 +5464,7 @@ def if_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5704,7 +5508,7 @@ def import_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5748,7 +5552,7 @@ def in_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5792,7 +5596,7 @@ def is_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5836,7 +5640,7 @@ def lambda_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5880,7 +5684,7 @@ def not_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5924,7 +5728,7 @@ def or_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5968,7 +5772,7 @@ def pass_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6012,7 +5816,7 @@ def raise_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6056,7 +5860,7 @@ def return_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6100,7 +5904,7 @@ def try_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6144,7 +5948,7 @@ def while_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6188,7 +5992,7 @@ def with_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6232,7 +6036,7 @@ def yield_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6296,7 +6100,7 @@ def with_and(self, *, and_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6343,7 +6147,7 @@ def with_as(self, *, as_parameter: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6392,7 +6196,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6441,7 +6245,7 @@ def with_async( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6490,7 +6294,7 @@ def with_await( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6539,7 +6343,7 @@ def with_break( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6588,7 +6392,7 @@ def with_class( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6637,7 +6441,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6686,7 +6490,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6733,7 +6537,7 @@ def with_def(self, *, def_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6780,7 +6584,7 @@ def with_del(self, *, del_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6829,7 +6633,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6878,7 +6682,7 @@ def with_else( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6927,7 +6731,7 @@ def with_except( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6976,7 +6780,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7025,7 +6829,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7072,7 +6876,7 @@ def with_for(self, *, for_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7121,7 +6925,7 @@ def with_from( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7170,7 +6974,7 @@ def with_global( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7217,7 +7021,7 @@ def with_if(self, *, if_parameter: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7266,7 +7070,7 @@ def with_import( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7313,7 +7117,7 @@ def with_in(self, *, in_parameter: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7360,7 +7164,7 @@ def with_is(self, *, is_parameter: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7409,7 +7213,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7456,7 +7260,7 @@ def with_not(self, *, not_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7503,7 +7307,7 @@ def with_or(self, *, or_parameter: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7552,7 +7356,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7601,7 +7405,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7650,7 +7454,7 @@ def with_return( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7697,7 +7501,7 @@ def with_try(self, *, try_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7746,7 +7550,7 @@ def with_while( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7795,7 +7599,7 @@ def with_with( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7844,7 +7648,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7893,7 +7697,7 @@ def with_cancellation_token( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_configuration.py b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_configuration.py index 2341ad3b421..1961822fa01 100644 --- a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_configuration.py +++ b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class TemplatedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TemplatedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TemplatedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_model_base.py b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_model_base.py +++ b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_operations/_operations.py b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_operations/_operations.py index ade1877e1bf..6afed934b60 100644 --- a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -152,7 +151,7 @@ def numeric_type(self, input: Union[_models.Int32Type, JSON, IO[bytes]], **kwarg :rtype: ~type.model.templated.models.Int32Type :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,7 +269,7 @@ def float32_type( :rtype: ~type.model.templated.models.Float32ValuesType :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -388,7 +387,7 @@ def int32_type( :rtype: ~type.model.templated.models.Int32ValuesType :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_serialization.py b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_serialization.py +++ b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_vendor.py b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_vendor.py index ecdc54ef28e..c4df98c5afd 100644 --- a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_vendor.py +++ b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import TemplatedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_configuration.py b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_configuration.py index fbfea520148..0af01a38e1f 100644 --- a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class TemplatedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TemplatedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TemplatedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_operations/_operations.py index 1ae2ce56503..e9d79472e35 100644 --- a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -104,7 +103,7 @@ async def numeric_type(self, input: Union[_models.Int32Type, JSON, IO[bytes]], * :rtype: ~type.model.templated.models.Int32Type :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -222,7 +221,7 @@ async def float32_type( :rtype: ~type.model.templated.models.Float32ValuesType :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -340,7 +339,7 @@ async def int32_type( :rtype: ~type.model.templated.models.Int32ValuesType :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_vendor.py b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_vendor.py index 57071ef526c..182ad6e2a6c 100644 --- a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import TemplatedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/models/_models.py b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/models/_models.py index 41c61eb76a0..12c9f5dedf3 100644 --- a/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/models/_models.py +++ b/packages/typespec-python/test/azure/generated/type-model-templated/type/model/templated/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/_operations.py index c3fe1a45c62..51974c75e9d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -63,7 +63,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -93,7 +93,7 @@ async def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -142,9 +142,7 @@ async def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -158,9 +156,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -174,9 +170,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [int] type or a IO[bytes] type. Required. @@ -185,7 +179,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -257,7 +251,7 @@ async def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -306,9 +300,7 @@ async def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -322,9 +314,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -338,9 +328,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [int] type or a IO[bytes] type. Required. @@ -349,7 +337,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -421,7 +409,7 @@ async def get(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -470,9 +458,7 @@ async def get(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -486,9 +472,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -502,9 +486,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[bool], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [bool] type or a IO[bytes] type. Required. @@ -513,7 +495,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -585,7 +567,7 @@ async def get(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -634,9 +616,7 @@ async def get(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -650,9 +630,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -666,9 +644,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [str] type or a IO[bytes] type. Required. @@ -677,7 +653,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -749,7 +725,7 @@ async def get(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -798,9 +774,7 @@ async def get(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -814,9 +788,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -830,9 +802,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[float], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[float], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [float] type or a IO[bytes] type. Required. @@ -841,7 +811,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -913,7 +883,7 @@ async def get(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -962,7 +932,7 @@ async def get(self, **kwargs: Any) -> List[datetime.datetime]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -978,9 +948,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -994,9 +962,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [datetime.datetime] type or a IO[bytes] type. Required. @@ -1005,7 +971,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1077,7 +1043,7 @@ async def get(self, **kwargs: Any) -> List[datetime.timedelta]: :rtype: list[~datetime.timedelta] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1126,7 +1092,7 @@ async def get(self, **kwargs: Any) -> List[datetime.timedelta]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1142,9 +1108,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1158,9 +1122,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[datetime.timedelta], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[datetime.timedelta], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [datetime.timedelta] type or a IO[bytes] type. Required. @@ -1169,7 +1131,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1241,7 +1203,7 @@ async def get(self, **kwargs: Any) -> List[Any]: :rtype: list[any] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1290,9 +1252,7 @@ async def get(self, **kwargs: Any) -> List[Any]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[Any], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[Any], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1306,9 +1266,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1322,9 +1280,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[Any], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[Any], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [Any] type or a IO[bytes] type. Required. @@ -1333,7 +1289,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1405,7 +1361,7 @@ async def get(self, **kwargs: Any) -> List[_models.InnerModel]: :rtype: list[~typetest.array.models.InnerModel] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1454,7 +1410,7 @@ async def get(self, **kwargs: Any) -> List[_models.InnerModel]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1470,9 +1426,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1486,9 +1440,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[_models.InnerModel], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[_models.InnerModel], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [InnerModel] type or a IO[bytes] type. Required. @@ -1497,7 +1449,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1569,7 +1521,7 @@ async def get(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1618,9 +1570,7 @@ async def get(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1634,9 +1584,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1650,9 +1598,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[float], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[float], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [float] type or a IO[bytes] type. Required. @@ -1661,7 +1607,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1733,7 +1679,7 @@ async def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1782,9 +1728,7 @@ async def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1798,9 +1742,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1814,9 +1756,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [int] type or a IO[bytes] type. Required. @@ -1825,7 +1765,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1897,7 +1837,7 @@ async def get(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1946,9 +1886,7 @@ async def get(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1962,9 +1900,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1978,9 +1914,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[bool], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [bool] type or a IO[bytes] type. Required. @@ -1989,7 +1923,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2061,7 +1995,7 @@ async def get(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2110,9 +2044,7 @@ async def get(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2126,9 +2058,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2142,9 +2072,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [str] type or a IO[bytes] type. Required. @@ -2153,7 +2081,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2225,7 +2153,7 @@ async def get(self, **kwargs: Any) -> List[_models.InnerModel]: :rtype: list[~typetest.array.models.InnerModel] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2274,7 +2202,7 @@ async def get(self, **kwargs: Any) -> List[_models.InnerModel]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -2290,9 +2218,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2306,9 +2232,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[_models.InnerModel], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[_models.InnerModel], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [InnerModel] type or a IO[bytes] type. Required. @@ -2317,7 +2241,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/models/_models.py index d1fdd5172d4..dc42aa23363 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/_operations.py index 562045ab69d..13bf84407b6 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -459,7 +459,7 @@ def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -508,9 +508,7 @@ def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -524,9 +522,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -551,7 +547,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -623,7 +619,7 @@ def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -672,9 +668,7 @@ def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -688,9 +682,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -715,7 +707,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -787,7 +779,7 @@ def get(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -836,9 +828,7 @@ def get(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -852,9 +842,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -879,7 +867,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -951,7 +939,7 @@ def get(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1000,9 +988,7 @@ def get(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1016,9 +1002,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1043,7 +1027,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1115,7 +1099,7 @@ def get(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1164,9 +1148,7 @@ def get(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1180,9 +1162,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1207,7 +1187,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1279,7 +1259,7 @@ def get(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1328,9 +1308,7 @@ def get(self, **kwargs: Any) -> List[datetime.datetime]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1344,9 +1322,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1371,7 +1347,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1443,7 +1419,7 @@ def get(self, **kwargs: Any) -> List[datetime.timedelta]: :rtype: list[~datetime.timedelta] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1492,9 +1468,7 @@ def get(self, **kwargs: Any) -> List[datetime.timedelta]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1508,9 +1482,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1535,7 +1507,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1607,7 +1579,7 @@ def get(self, **kwargs: Any) -> List[Any]: :rtype: list[any] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1656,9 +1628,7 @@ def get(self, **kwargs: Any) -> List[Any]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[Any], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[Any], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1672,9 +1642,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1699,7 +1667,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1771,7 +1739,7 @@ def get(self, **kwargs: Any) -> List[_models.InnerModel]: :rtype: list[~typetest.array.models.InnerModel] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1820,9 +1788,7 @@ def get(self, **kwargs: Any) -> List[_models.InnerModel]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1836,9 +1802,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1863,7 +1827,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1935,7 +1899,7 @@ def get(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1984,9 +1948,7 @@ def get(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2000,9 +1962,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2027,7 +1987,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2099,7 +2059,7 @@ def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2148,9 +2108,7 @@ def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2164,9 +2122,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2191,7 +2147,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2263,7 +2219,7 @@ def get(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2312,9 +2268,7 @@ def get(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2328,9 +2282,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2355,7 +2307,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2427,7 +2379,7 @@ def get(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2476,9 +2428,7 @@ def get(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2492,9 +2442,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2519,7 +2467,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2591,7 +2539,7 @@ def get(self, **kwargs: Any) -> List[_models.InnerModel]: :rtype: list[~typetest.array.models.InnerModel] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2640,9 +2588,7 @@ def get(self, **kwargs: Any) -> List[_models.InnerModel]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2656,9 +2602,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2683,7 +2627,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py index 5a3f167cae4..4b1915c8ab7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for DictionaryClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py index bdeb39fdef1..0ddc478803d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for DictionaryClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py index 78a30200a84..dcfef76e364 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -57,7 +57,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -87,7 +87,7 @@ async def get(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -136,9 +136,7 @@ async def get(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -152,9 +150,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -168,9 +164,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: int} type or a IO[bytes] type. Required. @@ -179,7 +173,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -251,7 +245,7 @@ async def get(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -300,9 +294,7 @@ async def get(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -316,9 +308,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -332,9 +322,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: int} type or a IO[bytes] type. Required. @@ -343,7 +331,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -415,7 +403,7 @@ async def get(self, **kwargs: Any) -> Dict[str, bool]: :rtype: dict[str, bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -464,9 +452,7 @@ async def get(self, **kwargs: Any) -> Dict[str, bool]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -480,9 +466,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -496,9 +480,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: bool} type or a IO[bytes] type. Required. @@ -507,7 +489,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -579,7 +561,7 @@ async def get(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -628,9 +610,7 @@ async def get(self, **kwargs: Any) -> Dict[str, str]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -644,9 +624,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -660,9 +638,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, str], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, str], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: str} type or a IO[bytes] type. Required. @@ -671,7 +647,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -743,7 +719,7 @@ async def get(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -792,9 +768,7 @@ async def get(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -808,9 +782,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -824,9 +796,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: float} type or a IO[bytes] type. Required. @@ -835,7 +805,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -907,7 +877,7 @@ async def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: :rtype: dict[str, ~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -956,7 +926,7 @@ async def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -972,9 +942,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -988,9 +956,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: datetime.datetime} type or a IO[bytes] type. Required. @@ -999,7 +965,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1071,7 +1037,7 @@ async def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: :rtype: dict[str, ~datetime.timedelta] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1120,7 +1086,7 @@ async def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1136,9 +1102,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1152,9 +1116,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, datetime.timedelta], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, datetime.timedelta], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: datetime.timedelta} type or a IO[bytes] type. Required. @@ -1163,7 +1125,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1235,7 +1197,7 @@ async def get(self, **kwargs: Any) -> Dict[str, Any]: :rtype: dict[str, any] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1284,9 +1246,7 @@ async def get(self, **kwargs: Any) -> Dict[str, Any]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1300,9 +1260,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1316,9 +1274,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, Any], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, Any], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: Any} type or a IO[bytes] type. Required. @@ -1327,7 +1283,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1399,7 +1355,7 @@ async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: :rtype: dict[str, ~typetest.dictionary.models.InnerModel] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1448,7 +1404,7 @@ async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1464,9 +1420,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1480,9 +1434,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. @@ -1491,7 +1443,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1563,7 +1515,7 @@ async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: :rtype: dict[str, ~typetest.dictionary.models.InnerModel] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1612,7 +1564,7 @@ async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1628,9 +1580,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1644,9 +1594,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. @@ -1655,7 +1603,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1727,7 +1675,7 @@ async def get(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1776,9 +1724,7 @@ async def get(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1792,9 +1738,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1808,9 +1752,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: float} type or a IO[bytes] type. Required. @@ -1819,7 +1761,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py index e20e1e302e9..7c69154176e 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py index cee27c09516..ba82a1c4a73 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -375,7 +375,7 @@ def get(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -424,9 +424,7 @@ def get(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -440,9 +438,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -467,7 +463,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -539,7 +535,7 @@ def get(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -588,9 +584,7 @@ def get(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -604,9 +598,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -631,7 +623,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -703,7 +695,7 @@ def get(self, **kwargs: Any) -> Dict[str, bool]: :rtype: dict[str, bool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -752,9 +744,7 @@ def get(self, **kwargs: Any) -> Dict[str, bool]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -768,9 +758,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -795,7 +783,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -867,7 +855,7 @@ def get(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -916,9 +904,7 @@ def get(self, **kwargs: Any) -> Dict[str, str]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -932,9 +918,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -959,7 +943,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1031,7 +1015,7 @@ def get(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1080,9 +1064,7 @@ def get(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1096,9 +1078,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1123,7 +1103,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1195,7 +1175,7 @@ def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: :rtype: dict[str, ~datetime.datetime] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1244,9 +1224,7 @@ def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1260,9 +1238,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1287,7 +1263,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1359,7 +1335,7 @@ def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: :rtype: dict[str, ~datetime.timedelta] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1408,7 +1384,7 @@ def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1424,9 +1400,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1451,7 +1425,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1523,7 +1497,7 @@ def get(self, **kwargs: Any) -> Dict[str, Any]: :rtype: dict[str, any] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1572,9 +1546,7 @@ def get(self, **kwargs: Any) -> Dict[str, Any]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1588,9 +1560,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1615,7 +1585,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1687,7 +1657,7 @@ def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: :rtype: dict[str, ~typetest.dictionary.models.InnerModel] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1736,7 +1706,7 @@ def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1752,9 +1722,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1779,7 +1747,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1851,7 +1819,7 @@ def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: :rtype: dict[str, ~typetest.dictionary.models.InnerModel] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1900,7 +1868,7 @@ def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1916,9 +1884,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1943,7 +1909,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2015,7 +1981,7 @@ def get(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2064,9 +2030,7 @@ def get(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2080,9 +2044,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2107,7 +2069,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_configuration.py index 0368767b993..616a6a00b4b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ExtensibleClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ExtensibleClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ExtensibleClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_configuration.py index 948ba4a88a5..0fa7f15d2fa 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ExtensibleClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ExtensibleClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ExtensibleClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py index c5274237aa0..c3a26d410d9 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +66,7 @@ async def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekE :rtype: str or ~typetest.enum.extensible.models.DaysOfWeekExtensibleEnum :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ async def get_unknown_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWee :rtype: str or ~typetest.enum.extensible.models.DaysOfWeekExtensibleEnum :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -172,9 +171,7 @@ async def get_unknown_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWee return deserialized # type: ignore @distributed_trace_async - async def put_known_value( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.DaysOfWeekExtensibleEnum], **kwargs: Any - ) -> None: + async def put_known_value(self, body: Union[str, _models.DaysOfWeekExtensibleEnum], **kwargs: Any) -> None: """put_known_value. :param body: Known values are: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", @@ -184,7 +181,7 @@ async def put_known_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -226,9 +223,7 @@ async def put_known_value( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_unknown_value( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.DaysOfWeekExtensibleEnum], **kwargs: Any - ) -> None: + async def put_unknown_value(self, body: Union[str, _models.DaysOfWeekExtensibleEnum], **kwargs: Any) -> None: """put_unknown_value. :param body: Known values are: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", @@ -238,7 +233,7 @@ async def put_unknown_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py index f8f742dc4a6..07f3d104a77 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -119,7 +118,7 @@ def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekExtensi :rtype: str or ~typetest.enum.extensible.models.DaysOfWeekExtensibleEnum :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -175,7 +174,7 @@ def get_unknown_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekExten :rtype: str or ~typetest.enum.extensible.models.DaysOfWeekExtensibleEnum :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -236,7 +235,7 @@ def put_known_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -290,7 +289,7 @@ def put_unknown_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py index 167cc5a3509..7ef85f69845 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ async def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekE :rtype: str or ~typetest.enum.fixed.models.DaysOfWeekEnum :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -115,9 +114,7 @@ async def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekE return deserialized # type: ignore @distributed_trace_async - async def put_known_value( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.DaysOfWeekEnum], **kwargs: Any - ) -> None: + async def put_known_value(self, body: Union[str, _models.DaysOfWeekEnum], **kwargs: Any) -> None: """putKnownValue. :param body: _. Known values are: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", @@ -127,7 +124,7 @@ async def put_known_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -169,9 +166,7 @@ async def put_known_value( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def put_unknown_value( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.DaysOfWeekEnum], **kwargs: Any - ) -> None: + async def put_unknown_value(self, body: Union[str, _models.DaysOfWeekEnum], **kwargs: Any) -> None: """putUnknownValue. :param body: _. Known values are: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", @@ -181,7 +176,7 @@ async def put_unknown_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py index 123afec7ed7..aa9ddc8501d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -105,7 +104,7 @@ def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekEnum]: :rtype: str or ~typetest.enum.fixed.models.DaysOfWeekEnum :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -166,7 +165,7 @@ def put_known_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,7 +219,7 @@ def put_unknown_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_operations/_operations.py index 07975a89e7f..a704f04d662 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -91,9 +90,7 @@ def build_empty_post_round_trip_empty_request(**kwargs: Any) -> HttpRequest: # class EmptyClientOperationsMixin(EmptyClientMixinABC): @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, input: _models.EmptyInput, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, input: _models.EmptyInput, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_empty. :param input: Required. @@ -107,9 +104,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_empty. :param input: Required. @@ -123,9 +118,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_empty. :param input: Required. @@ -150,7 +143,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,7 +197,7 @@ def get_empty(self, **kwargs: Any) -> _models.EmptyOutput: :rtype: ~typetest.model.empty.models.EmptyOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -312,7 +305,7 @@ def post_round_trip_empty( :rtype: ~typetest.model.empty.models.EmptyInputOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_vendor.py index bc656940607..a426658d648 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import EmptyClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_operations/_operations.py index 6a33e136f52..b9ee0fcf6e9 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +46,7 @@ class EmptyClientOperationsMixin(EmptyClientMixinABC): @overload - async def put_empty( # pylint: disable=inconsistent-return-statements + async def put_empty( self, input: _models.EmptyInput, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_empty. @@ -63,9 +62,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_empty. :param input: Required. @@ -79,9 +76,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_empty. :param input: Required. @@ -95,9 +90,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_empty( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.EmptyInput, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_empty(self, input: Union[_models.EmptyInput, JSON, IO[bytes]], **kwargs: Any) -> None: """put_empty. :param input: Is one of the following types: EmptyInput, JSON, IO[bytes] Required. @@ -106,7 +99,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,7 +153,7 @@ async def get_empty(self, **kwargs: Any) -> _models.EmptyOutput: :rtype: ~typetest.model.empty.models.EmptyOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +261,7 @@ async def post_round_trip_empty( :rtype: ~typetest.model.empty.models.EmptyInputOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_vendor.py index a29f3e6879b..13fb010ecad 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import EmptyClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/models/_models.py index b2b8bc0cf6e..9ecc9553e5c 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_configuration.py index 165f38410cb..950cc33a894 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class EnumDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class EnumDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for EnumDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/_operations.py index 60ed66992e2..e4b3b45ce5b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -177,7 +176,7 @@ def get_extensible_model(self, **kwargs: Any) -> _models.Dog: :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -226,7 +225,7 @@ def get_extensible_model(self, **kwargs: Any) -> _models.Dog: return deserialized # type: ignore @overload - def put_extensible_model( # pylint: disable=inconsistent-return-statements + def put_extensible_model( self, input: _models.Dog, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Send model with extensible enum discriminator type. @@ -242,9 +241,7 @@ def put_extensible_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_extensible_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_extensible_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with extensible enum discriminator type. :param input: Dog to create. Required. @@ -258,9 +255,7 @@ def put_extensible_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_extensible_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_extensible_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with extensible enum discriminator type. :param input: Dog to create. Required. @@ -285,7 +280,7 @@ def put_extensible_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -339,7 +334,7 @@ def get_extensible_model_missing_discriminator(self, **kwargs: Any) -> _models.D :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -395,7 +390,7 @@ def get_extensible_model_wrong_discriminator(self, **kwargs: Any) -> _models.Dog :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -451,7 +446,7 @@ def get_fixed_model(self, **kwargs: Any) -> _models.Snake: :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -500,9 +495,7 @@ def get_fixed_model(self, **kwargs: Any) -> _models.Snake: return deserialized # type: ignore @overload - def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: _models.Snake, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_fixed_model(self, input: _models.Snake, *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Required. @@ -516,9 +509,7 @@ def put_fixed_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_fixed_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Required. @@ -532,9 +523,7 @@ def put_fixed_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_fixed_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Required. @@ -559,7 +548,7 @@ def put_fixed_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -613,7 +602,7 @@ def get_fixed_model_missing_discriminator(self, **kwargs: Any) -> _models.Snake: :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -669,7 +658,7 @@ def get_fixed_model_wrong_discriminator(self, **kwargs: Any) -> _models.Snake: :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_vendor.py index 44acb68ba87..455e121338a 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import EnumDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_configuration.py index a12d3a174a2..9ea706f4a51 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class EnumDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class EnumDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for EnumDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/_operations.py index 182115f27cc..30a1ad2e4f4 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -43,7 +42,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,7 +58,7 @@ async def get_extensible_model(self, **kwargs: Any) -> _models.Dog: :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -108,7 +107,7 @@ async def get_extensible_model(self, **kwargs: Any) -> _models.Dog: return deserialized # type: ignore @overload - async def put_extensible_model( # pylint: disable=inconsistent-return-statements + async def put_extensible_model( self, input: _models.Dog, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Send model with extensible enum discriminator type. @@ -124,9 +123,7 @@ async def put_extensible_model( # pylint: disable=inconsistent-return-statement """ @overload - async def put_extensible_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_extensible_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with extensible enum discriminator type. :param input: Dog to create. Required. @@ -140,7 +137,7 @@ async def put_extensible_model( # pylint: disable=inconsistent-return-statement """ @overload - async def put_extensible_model( # pylint: disable=inconsistent-return-statements + async def put_extensible_model( self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Send model with extensible enum discriminator type. @@ -156,9 +153,7 @@ async def put_extensible_model( # pylint: disable=inconsistent-return-statement """ @distributed_trace_async - async def put_extensible_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Dog, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_extensible_model(self, input: Union[_models.Dog, JSON, IO[bytes]], **kwargs: Any) -> None: """Send model with extensible enum discriminator type. :param input: Dog to create. Is one of the following types: Dog, JSON, IO[bytes] Required. @@ -167,7 +162,7 @@ async def put_extensible_model( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -223,7 +218,7 @@ async def get_extensible_model_missing_discriminator( # pylint: disable=name-to :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -279,7 +274,7 @@ async def get_extensible_model_wrong_discriminator(self, **kwargs: Any) -> _mode :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -335,7 +330,7 @@ async def get_fixed_model(self, **kwargs: Any) -> _models.Snake: :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -384,7 +379,7 @@ async def get_fixed_model(self, **kwargs: Any) -> _models.Snake: return deserialized # type: ignore @overload - async def put_fixed_model( # pylint: disable=inconsistent-return-statements + async def put_fixed_model( self, input: _models.Snake, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Send model with fixed enum discriminator type. @@ -400,9 +395,7 @@ async def put_fixed_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_fixed_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Required. @@ -416,9 +409,7 @@ async def put_fixed_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_fixed_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Required. @@ -432,9 +423,7 @@ async def put_fixed_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Snake, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_fixed_model(self, input: Union[_models.Snake, JSON, IO[bytes]], **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Is one of the following types: Snake, JSON, IO[bytes] Required. @@ -443,7 +432,7 @@ async def put_fixed_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -497,7 +486,7 @@ async def get_fixed_model_missing_discriminator(self, **kwargs: Any) -> _models. :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -553,7 +542,7 @@ async def get_fixed_model_wrong_discriminator(self, **kwargs: Any) -> _models.Sn :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_vendor.py index bb78affff6d..c42b28f6bbe 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import EnumDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/models/_models.py index fff82712434..3528b8415b7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -79,7 +78,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=SnakeKind.COBRA, **kwargs) @@ -148,5 +147,5 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=DogKind.GOLDEN, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_configuration.py index c115c2497eb..8a760939311 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class NestedDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NestedDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NestedDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/_operations.py index c765f0ff240..cfda6231d45 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -145,7 +144,7 @@ def get_model(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -194,9 +193,7 @@ def get_model(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -210,9 +207,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -226,9 +221,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -253,7 +246,7 @@ def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -307,7 +300,7 @@ def get_recursive_model(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -356,7 +349,7 @@ def get_recursive_model(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements + def put_recursive_model( self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -372,9 +365,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_recursive_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -388,9 +379,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_recursive_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -415,7 +404,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -469,7 +458,7 @@ def get_missing_discriminator(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -525,7 +514,7 @@ def get_wrong_discriminator(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_vendor.py index b053d53a88f..93171f5f439 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NestedDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_configuration.py index 3ee01b0c4ff..a6cf66e0de9 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class NestedDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NestedDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NestedDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/_operations.py index d6f504e1ae0..076a8c13a61 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -41,7 +40,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def get_model(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,9 +105,7 @@ async def get_model(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -122,9 +119,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -138,9 +133,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -154,9 +147,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Fish, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_model(self, input: Union[_models.Fish, JSON, IO[bytes]], **kwargs: Any) -> None: """put_model. :param input: Is one of the following types: Fish, JSON, IO[bytes] Required. @@ -165,7 +156,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -219,7 +210,7 @@ async def get_recursive_model(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +259,7 @@ async def get_recursive_model(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements + async def put_recursive_model( self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -284,9 +275,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_recursive_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -300,7 +289,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements + async def put_recursive_model( self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -316,9 +305,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Fish, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_recursive_model(self, input: Union[_models.Fish, JSON, IO[bytes]], **kwargs: Any) -> None: """put_recursive_model. :param input: Is one of the following types: Fish, JSON, IO[bytes] Required. @@ -327,7 +314,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -381,7 +368,7 @@ async def get_missing_discriminator(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -437,7 +424,7 @@ async def get_wrong_discriminator(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_vendor.py index c7283e11af5..a09ae7669a0 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NestedDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/models/_models.py index 17010fb529f..89cc32d29e8 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_discriminator, rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -92,7 +90,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="shark", **kwargs) @@ -126,7 +124,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, sharktype="goblin", **kwargs) @@ -170,7 +168,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="salmon", **kwargs) @@ -204,5 +202,5 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, sharktype="saw", **kwargs) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_configuration.py index d8c4d2025cb..eb3c97819a6 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class NotDiscriminatedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotDiscriminatedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotDiscriminatedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/_operations.py index a96a7bbe55a..abf91c419d8 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -91,9 +90,7 @@ def build_not_discriminated_put_valid_request(**kwargs: Any) -> HttpRequest: # class NotDiscriminatedClientOperationsMixin(NotDiscriminatedClientMixinABC): @overload - def post_valid( # pylint: disable=inconsistent-return-statements - self, input: _models.Siamese, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_valid(self, input: _models.Siamese, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_valid. :param input: Required. @@ -107,9 +104,7 @@ def post_valid( # pylint: disable=inconsistent-return-statements """ @overload - def post_valid( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_valid(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_valid. :param input: Required. @@ -123,9 +118,7 @@ def post_valid( # pylint: disable=inconsistent-return-statements """ @overload - def post_valid( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_valid(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_valid. :param input: Required. @@ -150,7 +143,7 @@ def post_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,7 +197,7 @@ def get_valid(self, **kwargs: Any) -> _models.Siamese: :rtype: ~typetest.model.notdiscriminated.models.Siamese :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -306,7 +299,7 @@ def put_valid(self, input: Union[_models.Siamese, JSON, IO[bytes]], **kwargs: An :rtype: ~typetest.model.notdiscriminated.models.Siamese :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_vendor.py index 6ebe968df30..181f2d8067b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotDiscriminatedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_configuration.py index da8c589cda1..18467eee99e 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class NotDiscriminatedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotDiscriminatedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotDiscriminatedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/_operations.py index a968a4771f8..dd8c9dcf22c 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +46,7 @@ class NotDiscriminatedClientOperationsMixin(NotDiscriminatedClientMixinABC): @overload - async def post_valid( # pylint: disable=inconsistent-return-statements + async def post_valid( self, input: _models.Siamese, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_valid. @@ -63,9 +62,7 @@ async def post_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def post_valid( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_valid(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_valid. :param input: Required. @@ -79,9 +76,7 @@ async def post_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def post_valid( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_valid(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_valid. :param input: Required. @@ -95,9 +90,7 @@ async def post_valid( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def post_valid( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Siamese, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_valid(self, input: Union[_models.Siamese, JSON, IO[bytes]], **kwargs: Any) -> None: """post_valid. :param input: Is one of the following types: Siamese, JSON, IO[bytes] Required. @@ -106,7 +99,7 @@ async def post_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,7 +153,7 @@ async def get_valid(self, **kwargs: Any) -> _models.Siamese: :rtype: ~typetest.model.notdiscriminated.models.Siamese :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -264,7 +257,7 @@ async def put_valid(self, input: Union[_models.Siamese, JSON, IO[bytes]], **kwar :rtype: ~typetest.model.notdiscriminated.models.Siamese :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_vendor.py index b46a2546065..bbe77210d78 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotDiscriminatedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/models/_models.py index 0c61a2fa806..1fb87967ebd 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_configuration.py index 40b120bf22d..ec26b2d1960 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class RecursiveClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RecursiveClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RecursiveClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_operations/_operations.py index 01053922db9..f2f6ad81704 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -74,9 +73,7 @@ def build_recursive_get_request(**kwargs: Any) -> HttpRequest: class RecursiveClientOperationsMixin(RecursiveClientMixinABC): @overload - def put( # pylint: disable=inconsistent-return-statements - self, input: _models.Extension, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, input: _models.Extension, *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -90,9 +87,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -106,9 +101,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -133,7 +126,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -187,7 +180,7 @@ def get(self, **kwargs: Any) -> _models.Extension: :rtype: ~typetest.model.recursive.models.Extension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_vendor.py index ed1bc54351a..1ed2509c3b6 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RecursiveClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_configuration.py index 03959b86d60..1f4f42cf6de 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class RecursiveClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RecursiveClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RecursiveClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/_operations.py index d60972f42e7..95f55138db5 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,9 +42,7 @@ class RecursiveClientOperationsMixin(RecursiveClientMixinABC): @overload - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.Extension, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, input: _models.Extension, *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -59,9 +56,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -75,9 +70,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -91,9 +84,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Extension, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, input: Union[_models.Extension, JSON, IO[bytes]], **kwargs: Any) -> None: """put. :param input: Is one of the following types: Extension, JSON, IO[bytes] Required. @@ -102,7 +93,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -156,7 +147,7 @@ async def get(self, **kwargs: Any) -> _models.Extension: :rtype: ~typetest.model.recursive.models.Extension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_vendor.py index 239755bd7f0..8f54ccac103 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RecursiveClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/models/_models.py index 537465c2778..8f4dfbeebb6 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -72,5 +70,5 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_configuration.py index a67f9a8b4d2..dd717bbc1ea 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class SingleDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class SingleDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for SingleDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/_operations.py index cb5958f6516..8e5d72d804b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -159,7 +158,7 @@ def get_model(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -208,9 +207,7 @@ def get_model(self, **kwargs: Any) -> _models.Bird: return deserialized # type: ignore @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -224,9 +221,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -240,9 +235,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -267,7 +260,7 @@ def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -321,7 +314,7 @@ def get_recursive_model(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -370,7 +363,7 @@ def get_recursive_model(self, **kwargs: Any) -> _models.Bird: return deserialized # type: ignore @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements + def put_recursive_model( self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -386,9 +379,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_recursive_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -402,9 +393,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_recursive_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -429,7 +418,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +472,7 @@ def get_missing_discriminator(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -539,7 +528,7 @@ def get_wrong_discriminator(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -595,7 +584,7 @@ def get_legacy_model(self, **kwargs: Any) -> _models.Dinosaur: :rtype: ~typetest.model.singlediscriminator.models.Dinosaur :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_vendor.py index 654e968b08a..ae3d24181dc 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SingleDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_configuration.py index c8bed4247ce..ddd2fbc1fa7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class SingleDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class SingleDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for SingleDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/_operations.py index f2bec0c21ad..fb594edfb39 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,7 +57,7 @@ async def get_model(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -107,9 +106,7 @@ async def get_model(self, **kwargs: Any) -> _models.Bird: return deserialized # type: ignore @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -123,9 +120,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -139,9 +134,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -155,9 +148,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Bird, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_model(self, input: Union[_models.Bird, JSON, IO[bytes]], **kwargs: Any) -> None: """put_model. :param input: Is one of the following types: Bird, JSON, IO[bytes] Required. @@ -166,7 +157,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,7 +211,7 @@ async def get_recursive_model(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -269,7 +260,7 @@ async def get_recursive_model(self, **kwargs: Any) -> _models.Bird: return deserialized # type: ignore @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements + async def put_recursive_model( self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -285,9 +276,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_recursive_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -301,7 +290,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements + async def put_recursive_model( self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -317,9 +306,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Bird, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_recursive_model(self, input: Union[_models.Bird, JSON, IO[bytes]], **kwargs: Any) -> None: """put_recursive_model. :param input: Is one of the following types: Bird, JSON, IO[bytes] Required. @@ -328,7 +315,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -382,7 +369,7 @@ async def get_missing_discriminator(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -438,7 +425,7 @@ async def get_wrong_discriminator(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -494,7 +481,7 @@ async def get_legacy_model(self, **kwargs: Any) -> _models.Dinosaur: :rtype: ~typetest.model.singlediscriminator.models.Dinosaur :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_vendor.py index b0ed5388a48..5eed1f8a91d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SingleDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py index 09deb20ede5..a77333c46bd 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_discriminator, rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -134,7 +132,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="eagle", **kwargs) @@ -165,7 +163,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="goose", **kwargs) @@ -196,7 +194,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="seagull", **kwargs) @@ -227,7 +225,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="sparrow", **kwargs) @@ -258,5 +256,5 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="t-rex", **kwargs) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_operations/_operations.py index 17d3a39c12a..b1279974421 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -91,9 +90,7 @@ def build_usage_input_and_output_request(**kwargs: Any) -> HttpRequest: class UsageClientOperationsMixin(UsageClientMixinABC): @overload - def input( # pylint: disable=inconsistent-return-statements - self, input: _models.InputRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def input(self, input: _models.InputRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -107,9 +104,7 @@ def input( # pylint: disable=inconsistent-return-statements """ @overload - def input( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def input(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -123,9 +118,7 @@ def input( # pylint: disable=inconsistent-return-statements """ @overload - def input( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def input(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -150,7 +143,7 @@ def input( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,7 +197,7 @@ def output(self, **kwargs: Any) -> _models.OutputRecord: :rtype: ~typetest.model.usage.models.OutputRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -312,7 +305,7 @@ def input_and_output( :rtype: ~typetest.model.usage.models.InputOutputRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_vendor.py index bb1709f097c..3d8d44f371b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import UsageClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_operations/_operations.py index 554ab2532f7..45384bb3700 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +46,7 @@ class UsageClientOperationsMixin(UsageClientMixinABC): @overload - async def input( # pylint: disable=inconsistent-return-statements - self, input: _models.InputRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def input(self, input: _models.InputRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -63,9 +60,7 @@ async def input( # pylint: disable=inconsistent-return-statements """ @overload - async def input( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def input(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -79,9 +74,7 @@ async def input( # pylint: disable=inconsistent-return-statements """ @overload - async def input( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def input(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -95,9 +88,7 @@ async def input( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def input( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.InputRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def input(self, input: Union[_models.InputRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """input. :param input: Is one of the following types: InputRecord, JSON, IO[bytes] Required. @@ -106,7 +97,7 @@ async def input( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -160,7 +151,7 @@ async def output(self, **kwargs: Any) -> _models.OutputRecord: :rtype: ~typetest.model.usage.models.OutputRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +259,7 @@ async def input_and_output( :rtype: ~typetest.model.usage.models.InputOutputRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_vendor.py index c9f74bc62f5..1de910cdbfe 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import UsageClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/models/_models.py index 1c99b7a84ba..4fd8f6a1fec 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_configuration.py index 5db486298a0..5b0c2d96135 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_operations/_operations.py index 44d276376e3..5dee0cdaadb 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -209,7 +208,7 @@ def get_model( :rtype: ~typetest.model.visibility.models.VisibilityModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -321,7 +320,7 @@ def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **k :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +368,7 @@ def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **k return 200 <= response.status_code <= 299 @overload - def put_model( # pylint: disable=inconsistent-return-statements + def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -385,9 +384,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -401,9 +398,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -428,7 +423,7 @@ def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -475,7 +470,7 @@ def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_model( # pylint: disable=inconsistent-return-statements + def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -491,9 +486,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -507,9 +500,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -534,7 +525,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -581,7 +572,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def post_model( # pylint: disable=inconsistent-return-statements + def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -597,9 +588,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -613,9 +602,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -640,7 +627,7 @@ def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -687,7 +674,7 @@ def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def delete_model( # pylint: disable=inconsistent-return-statements + def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -703,9 +690,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -719,9 +704,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -746,7 +729,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,7 +835,7 @@ def put_read_only_model( :rtype: ~typetest.model.visibility.models.ReadOnlyModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_vendor.py index ce279851825..f3eb127559a 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_configuration.py index e4943fd2b21..a97f0bc1047 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/_operations.py index 7572c543217..3b54c6e024d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -110,7 +109,7 @@ async def get_model( :rtype: ~typetest.model.visibility.models.VisibilityModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -222,7 +221,7 @@ async def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes] :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,7 +269,7 @@ async def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes] return 200 <= response.status_code <= 299 @overload - async def put_model( # pylint: disable=inconsistent-return-statements + async def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -286,9 +285,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -302,9 +299,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -318,9 +313,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """put_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -329,7 +322,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -376,7 +369,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_model( # pylint: disable=inconsistent-return-statements + async def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -392,9 +385,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -408,9 +399,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -424,9 +413,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """patch_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -435,7 +422,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,7 +469,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_model( # pylint: disable=inconsistent-return-statements + async def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -498,9 +485,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -514,9 +499,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -530,9 +513,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """post_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -541,7 +522,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -588,7 +569,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def delete_model( # pylint: disable=inconsistent-return-statements + async def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -604,9 +585,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -620,9 +599,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -636,9 +613,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def delete_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """delete_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -647,7 +622,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -753,7 +728,7 @@ async def put_read_only_model( :rtype: ~typetest.model.visibility.models.ReadOnlyModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_vendor.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_vendor.py index c80671baabf..59219e20434 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/models/_models.py index 5a99a68854e..782540fb08d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_configuration.py index 3aeb983030e..88f5fb9226a 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AdditionalPropertiesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_configuration.py index 568f5fead91..3a0633edea5 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AdditionalPropertiesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py index 788caed2d63..25aefd214e6 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -98,7 +98,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -130,7 +130,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties :rtype: ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -179,7 +179,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsUnknownAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -195,9 +195,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -211,9 +209,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -227,7 +223,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.ExtendsUnknownAdditionalProperties, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -240,7 +236,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -314,7 +310,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalPropertiesDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -363,7 +359,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsUnknownAdditionalPropertiesDerived, *, @@ -384,9 +380,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -400,9 +394,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -416,7 +408,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.ExtendsUnknownAdditionalPropertiesDerived, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -430,7 +422,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -504,7 +496,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalPropertiesDiscriminated :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -553,7 +545,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsUnknownAdditionalPropertiesDiscriminated, *, @@ -574,9 +566,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -590,9 +580,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -606,7 +594,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.ExtendsUnknownAdditionalPropertiesDiscriminated, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -620,7 +608,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -693,7 +681,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsUnknownAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -742,7 +730,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsUnknownAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -758,9 +746,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -774,9 +760,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -790,9 +774,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsUnknownAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IsUnknownAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IsUnknownAdditionalProperties, JSON, @@ -803,7 +785,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -876,7 +858,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDeriv :rtype: ~typetest.property.additionalproperties.models.IsUnknownAdditionalPropertiesDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -925,7 +907,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDeriv return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsUnknownAdditionalPropertiesDerived, *, @@ -945,9 +927,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -961,9 +941,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -977,7 +955,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.IsUnknownAdditionalPropertiesDerived, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -990,7 +968,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1064,7 +1042,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscr ~typetest.property.additionalproperties.models.IsUnknownAdditionalPropertiesDiscriminated :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1113,7 +1091,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscr return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsUnknownAdditionalPropertiesDiscriminated, *, @@ -1134,9 +1112,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1150,9 +1126,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1166,7 +1140,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.IsUnknownAdditionalPropertiesDiscriminated, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -1180,7 +1154,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1253,7 +1227,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsStringAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1302,7 +1276,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsStringAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1318,9 +1292,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1334,9 +1306,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1350,9 +1320,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExtendsStringAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.ExtendsStringAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: ExtendsStringAdditionalProperties, JSON, @@ -1363,7 +1331,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1436,7 +1404,7 @@ async def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsStringAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1485,7 +1453,7 @@ async def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsStringAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1501,9 +1469,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1517,9 +1483,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1533,9 +1497,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsStringAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IsStringAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IsStringAdditionalProperties, JSON, IO[bytes] @@ -1546,7 +1508,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1618,7 +1580,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadStringRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadStringRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1667,7 +1629,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadStringRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadStringRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1683,9 +1645,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1699,9 +1659,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1715,9 +1673,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadStringRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadStringRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadStringRecord, JSON, IO[bytes] Required. @@ -1727,7 +1683,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1800,7 +1756,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsFloatAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1849,7 +1805,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsFloatAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1865,9 +1821,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1881,9 +1835,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1897,9 +1849,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExtendsFloatAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.ExtendsFloatAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: ExtendsFloatAdditionalProperties, JSON, @@ -1910,7 +1860,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1983,7 +1933,7 @@ async def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsFloatAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2032,7 +1982,7 @@ async def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsFloatAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2048,9 +1998,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2064,9 +2012,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2080,9 +2026,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsFloatAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IsFloatAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IsFloatAdditionalProperties, JSON, IO[bytes] @@ -2093,7 +2037,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2165,7 +2109,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadFloatRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2214,7 +2158,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadFloatRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2230,9 +2174,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2246,9 +2188,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2262,9 +2202,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadFloatRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadFloatRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadFloatRecord, JSON, IO[bytes] Required. @@ -2274,7 +2212,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2347,7 +2285,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsModelAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2396,7 +2334,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsModelAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2412,9 +2350,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2428,9 +2364,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2444,9 +2378,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExtendsModelAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.ExtendsModelAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: ExtendsModelAdditionalProperties, JSON, @@ -2457,7 +2389,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2530,7 +2462,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsModelAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2579,7 +2511,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsModelAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2595,9 +2527,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2611,9 +2541,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2627,9 +2555,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsModelAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IsModelAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IsModelAdditionalProperties, JSON, IO[bytes] @@ -2640,7 +2566,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2712,7 +2638,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadModelRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2761,7 +2687,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadModelRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2777,9 +2703,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2793,9 +2717,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2809,9 +2731,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadModelRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadModelRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadModelRecord, JSON, IO[bytes] Required. @@ -2821,7 +2741,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2894,7 +2814,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalPropert :rtype: ~typetest.property.additionalproperties.models.ExtendsModelArrayAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2943,7 +2863,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalPropert return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsModelArrayAdditionalProperties, *, @@ -2964,9 +2884,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2980,9 +2898,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2996,7 +2912,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.ExtendsModelArrayAdditionalProperties, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -3010,7 +2926,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3083,7 +2999,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsModelArrayAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3132,7 +3048,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsModelArrayAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3148,9 +3064,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3164,9 +3078,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3180,9 +3092,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsModelArrayAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IsModelArrayAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IsModelArrayAdditionalProperties, JSON, @@ -3193,7 +3103,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3265,7 +3175,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadModelArrayRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3314,7 +3224,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadModelArrayRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3330,9 +3240,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3346,9 +3254,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3362,9 +3268,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadModelArrayRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadModelArrayRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadModelArrayRecord, JSON, IO[bytes] @@ -3375,7 +3279,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3448,7 +3352,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadStringRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3497,7 +3401,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadStringRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3513,9 +3417,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3529,9 +3431,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3545,9 +3445,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadStringRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadStringRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadStringRecord, JSON, IO[bytes] @@ -3558,7 +3456,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3631,7 +3529,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadFloatRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3680,7 +3578,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadFloatRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3696,9 +3594,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3712,9 +3608,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3728,9 +3622,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadFloatRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadFloatRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadFloatRecord, JSON, IO[bytes] @@ -3741,7 +3633,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3814,7 +3706,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3863,7 +3755,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadModelRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3879,9 +3771,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3895,9 +3785,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3911,9 +3799,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadModelRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadModelRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadModelRecord, JSON, IO[bytes] @@ -3924,7 +3810,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3997,7 +3883,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelArrayRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4046,7 +3932,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadModelArrayRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4062,9 +3948,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4078,9 +3962,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4094,9 +3976,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadModelArrayRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadModelArrayRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadModelArrayRecord, JSON, @@ -4107,7 +3987,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4180,7 +4060,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadStringDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4229,7 +4109,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadStringDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4245,9 +4125,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4261,9 +4139,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4277,9 +4153,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadStringDerived, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadStringDerived, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadStringDerived, JSON, IO[bytes] @@ -4290,7 +4164,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4363,7 +4237,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadFloatDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4412,7 +4286,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadFloatDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4428,9 +4302,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4444,9 +4316,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4460,9 +4330,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadFloatDerived, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadFloatDerived, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadFloatDerived, JSON, IO[bytes] @@ -4473,7 +4341,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4546,7 +4414,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4595,7 +4463,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadModelDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4611,9 +4479,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4627,9 +4493,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4643,9 +4507,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadModelDerived, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadModelDerived, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadModelDerived, JSON, IO[bytes] @@ -4656,7 +4518,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4729,7 +4591,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelArrayDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4778,7 +4640,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadModelArrayDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4794,9 +4656,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4810,9 +4670,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4826,9 +4684,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadModelArrayDerived, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadModelArrayDerived, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadModelArrayDerived, JSON, @@ -4839,7 +4695,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4911,7 +4767,7 @@ async def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: :rtype: ~typetest.property.additionalproperties.models.MultipleSpreadRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4960,7 +4816,7 @@ async def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.MultipleSpreadRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4976,9 +4832,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4992,9 +4846,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5008,9 +4860,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.MultipleSpreadRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.MultipleSpreadRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: MultipleSpreadRecord, JSON, IO[bytes] @@ -5021,7 +4871,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5093,7 +4943,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForUnion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5142,7 +4992,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadRecordForUnion, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5158,9 +5008,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5174,9 +5022,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5190,9 +5036,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadRecordForUnion, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadRecordForUnion, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadRecordForUnion, JSON, IO[bytes] @@ -5203,7 +5047,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5276,7 +5120,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForDiscriminatedUnion: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForDiscriminatedUnion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5325,7 +5169,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForDiscriminatedUnion: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadRecordForDiscriminatedUnion, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5341,9 +5185,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5357,9 +5199,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5373,9 +5213,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadRecordForDiscriminatedUnion, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadRecordForDiscriminatedUnion, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadRecordForDiscriminatedUnion, JSON, @@ -5386,7 +5224,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5459,7 +5297,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5508,7 +5346,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion, *, @@ -5528,9 +5366,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5544,9 +5380,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5560,7 +5394,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.SpreadRecordForNonDiscriminatedUnion, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -5573,7 +5407,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5646,7 +5480,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5695,7 +5529,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion2, *, @@ -5716,9 +5550,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5732,9 +5564,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5748,7 +5578,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.SpreadRecordForNonDiscriminatedUnion2, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -5762,7 +5592,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5835,7 +5665,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion3 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5884,7 +5714,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion3, *, @@ -5905,9 +5735,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5921,9 +5749,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5937,7 +5763,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.SpreadRecordForNonDiscriminatedUnion3, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -5951,7 +5777,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/models/_models.py index d4f15abf712..bcbaaa23893 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/models/_models.py @@ -1,5 +1,5 @@ -# coding=utf-8 # pylint: disable=too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +14,6 @@ from .._model_base import rest_discriminator, rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -262,7 +261,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -525,7 +524,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="derived", **kwargs) @@ -788,7 +787,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="derived", **kwargs) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py index 9eee8d76473..f4d6943e8f2 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -980,7 +980,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1029,7 +1029,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsUnknownAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1045,9 +1045,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1061,9 +1059,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1090,7 +1086,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1164,7 +1160,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDerive ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalPropertiesDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1213,7 +1209,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDerive return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsUnknownAdditionalPropertiesDerived, *, @@ -1234,9 +1230,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1250,9 +1244,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1280,7 +1272,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1354,7 +1346,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDiscri ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalPropertiesDiscriminated :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1403,7 +1395,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDiscri return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsUnknownAdditionalPropertiesDiscriminated, *, @@ -1424,9 +1416,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1440,9 +1430,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1470,7 +1458,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1543,7 +1531,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsUnknownAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1592,7 +1580,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsUnknownAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1608,9 +1596,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1624,9 +1610,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1653,7 +1637,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1726,7 +1710,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDerived: :rtype: ~typetest.property.additionalproperties.models.IsUnknownAdditionalPropertiesDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1775,7 +1759,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDerived: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsUnknownAdditionalPropertiesDerived, *, @@ -1795,9 +1779,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1811,9 +1793,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1840,7 +1820,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1914,7 +1894,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscriminat ~typetest.property.additionalproperties.models.IsUnknownAdditionalPropertiesDiscriminated :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1963,7 +1943,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscriminat return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsUnknownAdditionalPropertiesDiscriminated, *, @@ -1984,9 +1964,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2000,9 +1978,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2030,7 +2006,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2103,7 +2079,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsStringAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2152,7 +2128,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsStringAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2168,9 +2144,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2184,9 +2158,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2213,7 +2185,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2286,7 +2258,7 @@ def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsStringAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2335,7 +2307,7 @@ def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsStringAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2351,9 +2323,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2367,9 +2337,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2396,7 +2364,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2468,7 +2436,7 @@ def get(self, **kwargs: Any) -> _models.SpreadStringRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadStringRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2517,9 +2485,7 @@ def get(self, **kwargs: Any) -> _models.SpreadStringRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.SpreadStringRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.SpreadStringRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2533,9 +2499,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2549,9 +2513,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2577,7 +2539,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2650,7 +2612,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsFloatAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2699,7 +2661,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsFloatAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2715,9 +2677,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2731,9 +2691,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2760,7 +2718,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2833,7 +2791,7 @@ def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsFloatAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2882,7 +2840,7 @@ def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsFloatAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2898,9 +2856,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2914,9 +2870,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2943,7 +2897,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3015,7 +2969,7 @@ def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadFloatRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3064,9 +3018,7 @@ def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.SpreadFloatRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.SpreadFloatRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3080,9 +3032,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3096,9 +3046,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3124,7 +3072,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3197,7 +3145,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsModelAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3246,7 +3194,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsModelAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3262,9 +3210,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3278,9 +3224,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3307,7 +3251,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3380,7 +3324,7 @@ def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsModelAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3429,7 +3373,7 @@ def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsModelAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3445,9 +3389,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3461,9 +3403,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3490,7 +3430,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3562,7 +3502,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadModelRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3611,9 +3551,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.SpreadModelRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.SpreadModelRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3627,9 +3565,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3643,9 +3579,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3671,7 +3605,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3744,7 +3678,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsModelArrayAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3793,7 +3727,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsModelArrayAdditionalProperties, *, @@ -3814,9 +3748,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3830,9 +3762,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3860,7 +3790,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3933,7 +3863,7 @@ def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsModelArrayAdditionalProperties :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3982,7 +3912,7 @@ def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsModelArrayAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3998,9 +3928,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4014,9 +3942,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4043,7 +3969,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4115,7 +4041,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadModelArrayRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4164,7 +4090,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.SpreadModelArrayRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4180,9 +4106,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4196,9 +4120,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4225,7 +4147,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4298,7 +4220,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadStringRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4347,7 +4269,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadStringRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4363,9 +4285,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4379,9 +4299,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4408,7 +4326,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4481,7 +4399,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadFloatRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4530,7 +4448,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadFloatRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4546,9 +4464,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4562,9 +4478,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4591,7 +4505,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4664,7 +4578,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4713,7 +4627,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadModelRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4729,9 +4643,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4745,9 +4657,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4774,7 +4684,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4847,7 +4757,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelArrayRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4896,7 +4806,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadModelArrayRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4912,9 +4822,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4928,9 +4836,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4957,7 +4863,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5030,7 +4936,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadStringDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5079,7 +4985,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadStringDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5095,9 +5001,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5111,9 +5015,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5140,7 +5042,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5213,7 +5115,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadFloatDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5262,7 +5164,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadFloatDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5278,9 +5180,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5294,9 +5194,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5323,7 +5221,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5396,7 +5294,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5445,7 +5343,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadModelDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5461,9 +5359,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5477,9 +5373,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5506,7 +5400,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5579,7 +5473,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelArrayDerived :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5628,7 +5522,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadModelArrayDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5644,9 +5538,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5660,9 +5552,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5689,7 +5579,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5761,7 +5651,7 @@ def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: :rtype: ~typetest.property.additionalproperties.models.MultipleSpreadRecord :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5810,9 +5700,7 @@ def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.MultipleSpreadRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.MultipleSpreadRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5826,9 +5714,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5842,9 +5728,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5871,7 +5755,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5943,7 +5827,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForUnion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5992,9 +5876,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.SpreadRecordForUnion, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.SpreadRecordForUnion, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6008,9 +5890,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6024,9 +5904,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6053,7 +5931,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6126,7 +6004,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForDiscriminatedUnion: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForDiscriminatedUnion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6175,7 +6053,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForDiscriminatedUnion: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.SpreadRecordForDiscriminatedUnion, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -6191,9 +6069,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6207,9 +6083,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6236,7 +6110,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6309,7 +6183,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6358,7 +6232,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion, *, @@ -6378,9 +6252,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6394,9 +6266,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6423,7 +6293,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6496,7 +6366,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion2: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6545,7 +6415,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion2: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion2, *, @@ -6566,9 +6436,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6582,9 +6450,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6612,7 +6478,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6685,7 +6551,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion3: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion3 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6734,7 +6600,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion3: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion3, *, @@ -6755,9 +6621,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6771,9 +6635,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6801,7 +6663,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py index c9e7584dce2..50376db76d0 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -62,7 +62,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -93,7 +93,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.nullable.models.StringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -149,7 +149,7 @@ async def get_null(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.nullable.models.StringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -198,7 +198,7 @@ async def get_null(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.StringProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -214,7 +214,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -230,7 +230,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -246,9 +246,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_non_null(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: StringProperty, JSON, IO[bytes] Required. @@ -257,7 +255,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -304,7 +302,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.StringProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -320,7 +318,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -336,7 +334,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -352,9 +350,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: StringProperty, JSON, IO[bytes] Required. @@ -363,7 +359,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -435,7 +431,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.nullable.models.BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -491,7 +487,7 @@ async def get_null(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.nullable.models.BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -540,7 +536,7 @@ async def get_null(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.BytesProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -556,7 +552,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -572,7 +568,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -588,9 +584,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_non_null(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: BytesProperty, JSON, IO[bytes] Required. @@ -599,7 +593,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -646,7 +640,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.BytesProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -662,7 +656,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -678,7 +672,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -694,9 +688,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: BytesProperty, JSON, IO[bytes] Required. @@ -705,7 +697,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -777,7 +769,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.nullable.models.DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -833,7 +825,7 @@ async def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.nullable.models.DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -882,7 +874,7 @@ async def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.DatetimeProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -898,7 +890,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -914,7 +906,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -930,9 +922,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_non_null(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: DatetimeProperty, JSON, IO[bytes] Required. @@ -941,7 +931,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -988,7 +978,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.DatetimeProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1004,7 +994,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1020,7 +1010,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1036,9 +1026,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: DatetimeProperty, JSON, IO[bytes] Required. @@ -1047,7 +1035,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1119,7 +1107,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.nullable.models.DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1175,7 +1163,7 @@ async def get_null(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.nullable.models.DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1224,7 +1212,7 @@ async def get_null(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.DurationProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1240,7 +1228,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1256,7 +1244,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1272,9 +1260,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_non_null(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: DurationProperty, JSON, IO[bytes] Required. @@ -1283,7 +1269,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1330,7 +1316,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.DurationProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1346,7 +1332,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1362,7 +1348,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1378,9 +1364,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: DurationProperty, JSON, IO[bytes] Required. @@ -1389,7 +1373,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1461,7 +1445,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.nullable.models.CollectionsByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1517,7 +1501,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.nullable.models.CollectionsByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1566,7 +1550,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.CollectionsByteProperty, *, @@ -1586,7 +1570,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1602,7 +1586,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1618,7 +1602,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1629,7 +1613,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1676,7 +1660,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.CollectionsByteProperty, *, @@ -1696,7 +1680,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1712,7 +1696,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1728,9 +1712,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: CollectionsByteProperty, JSON, IO[bytes] Required. @@ -1739,7 +1721,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1812,7 +1794,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.nullable.models.CollectionsModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1869,7 +1851,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.nullable.models.CollectionsModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1918,7 +1900,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.CollectionsModelProperty, *, @@ -1938,7 +1920,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1954,7 +1936,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1970,7 +1952,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1981,7 +1963,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2028,7 +2010,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.CollectionsModelProperty, *, @@ -2048,7 +2030,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2064,7 +2046,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2080,9 +2062,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: CollectionsModelProperty, JSON, IO[bytes] Required. @@ -2091,7 +2071,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2164,7 +2144,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsStringProperty :rtype: ~typetest.property.nullable.models.CollectionsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2221,7 +2201,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: :rtype: ~typetest.property.nullable.models.CollectionsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2270,7 +2250,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.CollectionsStringProperty, *, @@ -2290,7 +2270,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2306,7 +2286,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2322,7 +2302,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: Union[_models.CollectionsStringProperty, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2334,7 +2314,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2381,7 +2361,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.CollectionsStringProperty, *, @@ -2401,7 +2381,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2417,7 +2397,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2433,9 +2413,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsStringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.CollectionsStringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: CollectionsStringProperty, JSON, IO[bytes] @@ -2445,7 +2423,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/models/_models.py index c9b0e033c02..6d1879bf4fc 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +13,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py index 700ccd8824f..0cfb866689b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -459,7 +459,7 @@ def get_non_null(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.nullable.models.StringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -515,7 +515,7 @@ def get_null(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.nullable.models.StringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -564,7 +564,7 @@ def get_null(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.StringProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -580,9 +580,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -596,7 +594,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -623,7 +621,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -670,7 +668,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.StringProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -686,9 +684,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -702,9 +698,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -729,7 +723,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -801,7 +795,7 @@ def get_non_null(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.nullable.models.BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -857,7 +851,7 @@ def get_null(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.nullable.models.BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -906,7 +900,7 @@ def get_null(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.BytesProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -922,9 +916,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -938,7 +930,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -965,7 +957,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1012,7 +1004,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.BytesProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1028,9 +1020,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1044,9 +1034,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1071,7 +1059,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1143,7 +1131,7 @@ def get_non_null(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.nullable.models.DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1199,7 +1187,7 @@ def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.nullable.models.DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1248,7 +1236,7 @@ def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.DatetimeProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1264,9 +1252,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1280,7 +1266,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1307,7 +1293,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1354,7 +1340,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.DatetimeProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1370,9 +1356,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1386,9 +1370,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1413,7 +1395,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1485,7 +1467,7 @@ def get_non_null(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.nullable.models.DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1541,7 +1523,7 @@ def get_null(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.nullable.models.DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1590,7 +1572,7 @@ def get_null(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.DurationProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1606,9 +1588,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1622,7 +1602,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1649,7 +1629,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1696,7 +1676,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.DurationProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1712,9 +1692,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1728,9 +1706,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1755,7 +1731,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1827,7 +1803,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.nullable.models.CollectionsByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1883,7 +1859,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.nullable.models.CollectionsByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1932,7 +1908,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.CollectionsByteProperty, *, @@ -1952,9 +1928,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1968,7 +1942,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1995,7 +1969,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,7 +2016,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.CollectionsByteProperty, *, @@ -2062,9 +2036,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2078,9 +2050,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2105,7 +2075,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2178,7 +2148,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.nullable.models.CollectionsModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2235,7 +2205,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.nullable.models.CollectionsModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2284,7 +2254,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.CollectionsModelProperty, *, @@ -2304,9 +2274,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2320,7 +2288,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2347,7 +2315,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2394,7 +2362,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.CollectionsModelProperty, *, @@ -2414,9 +2382,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2430,9 +2396,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2457,7 +2421,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2530,7 +2494,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: :rtype: ~typetest.property.nullable.models.CollectionsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2587,7 +2551,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: :rtype: ~typetest.property.nullable.models.CollectionsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2636,7 +2600,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.CollectionsStringProperty, *, @@ -2656,9 +2620,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2672,7 +2634,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2700,7 +2662,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2747,7 +2709,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.CollectionsStringProperty, *, @@ -2767,9 +2729,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2783,9 +2743,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2811,7 +2769,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py index 45d67842636..2c565168a86 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -98,7 +98,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -129,7 +129,7 @@ async def get_all(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.optional.models.StringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -185,7 +185,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.optional.models.StringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -234,7 +234,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -250,9 +250,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -266,9 +264,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -282,9 +278,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: StringProperty, JSON, IO[bytes] Required. @@ -293,7 +287,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -340,7 +334,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -356,9 +350,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -372,9 +364,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -388,9 +378,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: StringProperty, JSON, IO[bytes] Required. @@ -399,7 +387,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -471,7 +459,7 @@ async def get_all(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.optional.models.BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -527,7 +515,7 @@ async def get_default(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.optional.models.BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -576,7 +564,7 @@ async def get_default(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -592,9 +580,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -608,9 +594,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -624,9 +608,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: BytesProperty, JSON, IO[bytes] Required. @@ -635,7 +617,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -682,7 +664,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -698,9 +680,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -714,9 +694,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -730,9 +708,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: BytesProperty, JSON, IO[bytes] Required. @@ -741,7 +717,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -813,7 +789,7 @@ async def get_all(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.optional.models.DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -869,7 +845,7 @@ async def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.optional.models.DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -918,7 +894,7 @@ async def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -934,9 +910,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -950,9 +924,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -966,9 +938,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: DatetimeProperty, JSON, IO[bytes] Required. @@ -977,7 +947,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1024,7 +994,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1040,9 +1010,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1056,9 +1024,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1072,9 +1038,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: DatetimeProperty, JSON, IO[bytes] Required. @@ -1083,7 +1047,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1155,7 +1119,7 @@ async def get_all(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.optional.models.DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1211,7 +1175,7 @@ async def get_default(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.optional.models.DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1260,7 +1224,7 @@ async def get_default(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1276,9 +1240,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1292,9 +1254,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1308,9 +1268,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: DurationProperty, JSON, IO[bytes] Required. @@ -1319,7 +1277,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1366,7 +1324,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1382,9 +1340,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1398,9 +1354,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1414,9 +1368,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: DurationProperty, JSON, IO[bytes] Required. @@ -1425,7 +1377,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1497,7 +1449,7 @@ async def get_all(self, **kwargs: Any) -> _models.PlainDateProperty: :rtype: ~typetest.property.optional.models.PlainDateProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1553,7 +1505,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: :rtype: ~typetest.property.optional.models.PlainDateProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1602,7 +1554,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.PlainDateProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1618,9 +1570,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1634,9 +1584,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1650,9 +1598,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PlainDateProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.PlainDateProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: PlainDateProperty, JSON, IO[bytes] Required. @@ -1661,7 +1607,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1708,7 +1654,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.PlainDateProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1724,9 +1670,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1740,9 +1684,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1756,9 +1698,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PlainDateProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.PlainDateProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: PlainDateProperty, JSON, IO[bytes] Required. @@ -1767,7 +1707,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1839,7 +1779,7 @@ async def get_all(self, **kwargs: Any) -> _models.PlainTimeProperty: :rtype: ~typetest.property.optional.models.PlainTimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1895,7 +1835,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: :rtype: ~typetest.property.optional.models.PlainTimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1944,7 +1884,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.PlainTimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1960,9 +1900,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1976,9 +1914,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1992,9 +1928,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PlainTimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.PlainTimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: PlainTimeProperty, JSON, IO[bytes] Required. @@ -2003,7 +1937,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2050,7 +1984,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.PlainTimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2066,9 +2000,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2082,9 +2014,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2098,9 +2028,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PlainTimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.PlainTimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: PlainTimeProperty, JSON, IO[bytes] Required. @@ -2109,7 +2037,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2181,7 +2109,7 @@ async def get_all(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.optional.models.CollectionsByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2237,7 +2165,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.optional.models.CollectionsByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2286,7 +2214,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.CollectionsByteProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2302,9 +2230,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2318,9 +2244,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2334,9 +2258,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: CollectionsByteProperty, JSON, IO[bytes] Required. @@ -2345,7 +2267,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2392,7 +2314,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.CollectionsByteProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2408,9 +2330,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2424,9 +2344,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2440,9 +2358,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: CollectionsByteProperty, JSON, IO[bytes] Required. @@ -2451,7 +2367,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2524,7 +2440,7 @@ async def get_all(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.optional.models.CollectionsModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2581,7 +2497,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.optional.models.CollectionsModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2630,7 +2546,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2646,9 +2562,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2662,9 +2576,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2678,9 +2590,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: CollectionsModelProperty, JSON, IO[bytes] Required. @@ -2689,7 +2599,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2736,7 +2646,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2752,9 +2662,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2768,9 +2676,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2784,9 +2690,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: CollectionsModelProperty, JSON, IO[bytes] Required. @@ -2795,7 +2699,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2867,7 +2771,7 @@ async def get_all(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.optional.models.StringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2923,7 +2827,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.optional.models.StringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2972,7 +2876,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2988,9 +2892,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3004,9 +2906,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3020,9 +2920,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: StringLiteralProperty, JSON, IO[bytes] Required. @@ -3031,7 +2929,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3078,7 +2976,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3094,9 +2992,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3110,9 +3006,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3126,9 +3020,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: StringLiteralProperty, JSON, IO[bytes] Required. @@ -3137,7 +3029,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3209,7 +3101,7 @@ async def get_all(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.optional.models.IntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3265,7 +3157,7 @@ async def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.optional.models.IntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3314,7 +3206,7 @@ async def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3330,9 +3222,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3346,9 +3236,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3362,9 +3250,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: IntLiteralProperty, JSON, IO[bytes] Required. @@ -3373,7 +3259,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3420,7 +3306,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3436,9 +3322,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3452,9 +3336,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3468,9 +3350,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: IntLiteralProperty, JSON, IO[bytes] Required. @@ -3479,7 +3359,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3551,7 +3431,7 @@ async def get_all(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.optional.models.FloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3607,7 +3487,7 @@ async def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.optional.models.FloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3656,7 +3536,7 @@ async def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3672,9 +3552,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3688,9 +3566,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3704,9 +3580,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: FloatLiteralProperty, JSON, IO[bytes] Required. @@ -3715,7 +3589,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3762,7 +3636,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3778,9 +3652,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3794,9 +3666,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3810,9 +3680,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: FloatLiteralProperty, JSON, IO[bytes] Required. @@ -3821,7 +3689,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3893,7 +3761,7 @@ async def get_all(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.optional.models.BooleanLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3949,7 +3817,7 @@ async def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.optional.models.BooleanLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3998,7 +3866,7 @@ async def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4014,9 +3882,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4030,9 +3896,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4046,9 +3910,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: BooleanLiteralProperty, JSON, IO[bytes] Required. @@ -4057,7 +3919,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4104,7 +3966,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4120,9 +3982,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4136,9 +3996,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4152,9 +4010,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: BooleanLiteralProperty, JSON, IO[bytes] Required. @@ -4163,7 +4019,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4236,7 +4092,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: :rtype: ~typetest.property.optional.models.UnionStringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4293,7 +4149,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty :rtype: ~typetest.property.optional.models.UnionStringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4342,7 +4198,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4358,9 +4214,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4374,9 +4228,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4390,9 +4242,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: UnionStringLiteralProperty, JSON, IO[bytes] @@ -4402,7 +4252,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4449,7 +4299,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4465,9 +4315,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4481,9 +4329,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4497,7 +4343,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put a body with default properties. @@ -4509,7 +4355,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4581,7 +4427,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.optional.models.UnionIntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4637,7 +4483,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.optional.models.UnionIntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4686,7 +4532,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4702,9 +4548,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4718,9 +4562,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4734,9 +4576,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: UnionIntLiteralProperty, JSON, IO[bytes] Required. @@ -4745,7 +4585,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4792,7 +4632,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4808,9 +4648,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4824,9 +4662,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4840,9 +4676,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: UnionIntLiteralProperty, JSON, IO[bytes] Required. @@ -4851,7 +4685,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4924,7 +4758,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.optional.models.UnionFloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4981,7 +4815,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.optional.models.UnionFloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5030,7 +4864,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -5046,9 +4880,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5062,9 +4894,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5078,9 +4908,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: UnionFloatLiteralProperty, JSON, IO[bytes] @@ -5090,7 +4918,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5137,7 +4965,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -5153,9 +4981,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5169,9 +4995,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5185,9 +5009,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: UnionFloatLiteralProperty, JSON, IO[bytes] @@ -5197,7 +5019,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5270,7 +5092,7 @@ async def get_all(self, **kwargs: Any) -> _models.RequiredAndOptionalProperty: :rtype: ~typetest.property.optional.models.RequiredAndOptionalProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5327,7 +5149,7 @@ async def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalP :rtype: ~typetest.property.optional.models.RequiredAndOptionalProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5376,7 +5198,7 @@ async def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalP return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.RequiredAndOptionalProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -5392,9 +5214,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5408,9 +5228,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5424,9 +5242,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.RequiredAndOptionalProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.RequiredAndOptionalProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: RequiredAndOptionalProperty, JSON, IO[bytes] @@ -5436,7 +5252,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5483,7 +5299,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_required_only( # pylint: disable=inconsistent-return-statements + async def put_required_only( self, body: _models.RequiredAndOptionalProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with only required properties. @@ -5499,9 +5315,7 @@ async def put_required_only( # pylint: disable=inconsistent-return-statements """ @overload - async def put_required_only( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_required_only(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with only required properties. :param body: Required. @@ -5515,7 +5329,7 @@ async def put_required_only( # pylint: disable=inconsistent-return-statements """ @overload - async def put_required_only( # pylint: disable=inconsistent-return-statements + async def put_required_only( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with only required properties. @@ -5531,7 +5345,7 @@ async def put_required_only( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put_required_only( # pylint: disable=inconsistent-return-statements + async def put_required_only( self, body: Union[_models.RequiredAndOptionalProperty, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put a body with only required properties. @@ -5543,7 +5357,7 @@ async def put_required_only( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/models/_models.py index fa25c08d8ce..834c9bec212 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +13,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py index 7981d44034a..078a988a7fd 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -967,7 +967,7 @@ def get_all(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.optional.models.StringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1023,7 +1023,7 @@ def get_default(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.optional.models.StringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1072,9 +1072,7 @@ def get_default(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1088,9 +1086,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1104,9 +1100,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1131,7 +1125,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1178,7 +1172,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1194,9 +1188,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1210,9 +1202,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1237,7 +1227,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1309,7 +1299,7 @@ def get_all(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.optional.models.BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1365,7 +1355,7 @@ def get_default(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.optional.models.BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1414,9 +1404,7 @@ def get_default(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1430,9 +1418,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1446,9 +1432,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1473,7 +1457,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1520,7 +1504,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1536,9 +1520,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1552,9 +1534,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1579,7 +1559,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1651,7 +1631,7 @@ def get_all(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.optional.models.DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1707,7 +1687,7 @@ def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.optional.models.DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1756,9 +1736,7 @@ def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1772,9 +1750,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1788,9 +1764,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1815,7 +1789,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1862,7 +1836,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1878,9 +1852,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1894,9 +1866,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1921,7 +1891,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1993,7 +1963,7 @@ def get_all(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.optional.models.DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2049,7 +2019,7 @@ def get_default(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.optional.models.DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2098,9 +2068,7 @@ def get_default(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2114,9 +2082,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2130,9 +2096,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2157,7 +2121,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2204,7 +2168,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2220,9 +2184,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2236,9 +2198,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2263,7 +2223,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2335,7 +2295,7 @@ def get_all(self, **kwargs: Any) -> _models.PlainDateProperty: :rtype: ~typetest.property.optional.models.PlainDateProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2391,7 +2351,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: :rtype: ~typetest.property.optional.models.PlainDateProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2440,7 +2400,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.PlainDateProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2456,9 +2416,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2472,9 +2430,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2499,7 +2455,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2546,7 +2502,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.PlainDateProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2562,9 +2518,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2578,9 +2532,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2605,7 +2557,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2677,7 +2629,7 @@ def get_all(self, **kwargs: Any) -> _models.PlainTimeProperty: :rtype: ~typetest.property.optional.models.PlainTimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2733,7 +2685,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: :rtype: ~typetest.property.optional.models.PlainTimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2782,7 +2734,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.PlainTimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2798,9 +2750,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2814,9 +2764,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2841,7 +2789,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2888,7 +2836,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.PlainTimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2904,9 +2852,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2920,9 +2866,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2947,7 +2891,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3019,7 +2963,7 @@ def get_all(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.optional.models.CollectionsByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3075,7 +3019,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.optional.models.CollectionsByteProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3124,7 +3068,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.CollectionsByteProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3140,9 +3084,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3156,9 +3098,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3183,7 +3123,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3230,7 +3170,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.CollectionsByteProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3246,9 +3186,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3262,9 +3200,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3289,7 +3225,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3362,7 +3298,7 @@ def get_all(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.optional.models.CollectionsModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3419,7 +3355,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.optional.models.CollectionsModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3468,7 +3404,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3484,9 +3420,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3500,9 +3434,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3527,7 +3459,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3574,7 +3506,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3590,9 +3522,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3606,9 +3536,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3633,7 +3561,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3705,7 +3633,7 @@ def get_all(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.optional.models.StringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3761,7 +3689,7 @@ def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.optional.models.StringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3810,7 +3738,7 @@ def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3826,9 +3754,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3842,9 +3768,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3869,7 +3793,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3916,7 +3840,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3932,9 +3856,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3948,9 +3870,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3975,7 +3895,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4047,7 +3967,7 @@ def get_all(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.optional.models.IntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4103,7 +4023,7 @@ def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.optional.models.IntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4152,7 +4072,7 @@ def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4168,9 +4088,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4184,9 +4102,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4211,7 +4127,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4258,7 +4174,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4274,9 +4190,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4290,9 +4204,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4317,7 +4229,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4389,7 +4301,7 @@ def get_all(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.optional.models.FloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4445,7 +4357,7 @@ def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.optional.models.FloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4494,7 +4406,7 @@ def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4510,9 +4422,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4526,9 +4436,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4553,7 +4461,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4600,7 +4508,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4616,9 +4524,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4632,9 +4538,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4659,7 +4563,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4731,7 +4635,7 @@ def get_all(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.optional.models.BooleanLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4787,7 +4691,7 @@ def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.optional.models.BooleanLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4836,7 +4740,7 @@ def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4852,9 +4756,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4868,9 +4770,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4895,7 +4795,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4942,7 +4842,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4958,9 +4858,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4974,9 +4872,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5001,7 +4897,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5074,7 +4970,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: :rtype: ~typetest.property.optional.models.UnionStringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5131,7 +5027,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: :rtype: ~typetest.property.optional.models.UnionStringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5180,7 +5076,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -5196,9 +5092,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5212,9 +5106,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5240,7 +5132,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5287,7 +5179,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -5303,9 +5195,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5319,9 +5209,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5347,7 +5235,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5419,7 +5307,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.optional.models.UnionIntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5475,7 +5363,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.optional.models.UnionIntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5524,7 +5412,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -5540,9 +5428,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5556,9 +5442,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5583,7 +5467,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5630,7 +5514,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -5646,9 +5530,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5662,9 +5544,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5689,7 +5569,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5762,7 +5642,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.optional.models.UnionFloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5819,7 +5699,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.optional.models.UnionFloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5868,7 +5748,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -5884,9 +5764,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5900,9 +5778,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5928,7 +5804,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5975,7 +5851,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -5991,9 +5867,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -6007,9 +5881,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -6035,7 +5907,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6108,7 +5980,7 @@ def get_all(self, **kwargs: Any) -> _models.RequiredAndOptionalProperty: :rtype: ~typetest.property.optional.models.RequiredAndOptionalProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6165,7 +6037,7 @@ def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalPropert :rtype: ~typetest.property.optional.models.RequiredAndOptionalProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6214,7 +6086,7 @@ def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalPropert return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.RequiredAndOptionalProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -6230,9 +6102,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -6246,9 +6116,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -6274,7 +6142,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6321,7 +6189,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_required_only( # pylint: disable=inconsistent-return-statements + def put_required_only( self, body: _models.RequiredAndOptionalProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with only required properties. @@ -6337,9 +6205,7 @@ def put_required_only( # pylint: disable=inconsistent-return-statements """ @overload - def put_required_only( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_required_only(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with only required properties. :param body: Required. @@ -6353,9 +6219,7 @@ def put_required_only( # pylint: disable=inconsistent-return-statements """ @overload - def put_required_only( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_required_only(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with only required properties. :param body: Required. @@ -6381,7 +6245,7 @@ def put_required_only( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_configuration.py index ee330a3ea87..9098a30e2d2 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ValueTypesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ValueTypesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ValueTypesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_configuration.py index 158019def1e..f3bcf56c0fb 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ValueTypesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ValueTypesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ValueTypesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py index b8c3eba9dfe..d0e297f2188 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -92,7 +92,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -123,7 +123,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanProperty: :rtype: ~typetest.property.valuetypes.models.BooleanProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -172,7 +172,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.BooleanProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -188,9 +188,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -204,9 +202,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -220,9 +216,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BooleanProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.BooleanProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: BooleanProperty, JSON, IO[bytes] Required. @@ -231,7 +225,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,7 +297,7 @@ async def get(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.valuetypes.models.StringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,9 +346,7 @@ async def get(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -368,9 +360,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -384,9 +374,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -400,9 +388,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: StringProperty, JSON, IO[bytes] Required. @@ -411,7 +397,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +469,7 @@ async def get(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.valuetypes.models.BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -532,9 +518,7 @@ async def get(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -548,9 +532,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -564,9 +546,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -580,9 +560,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: BytesProperty, JSON, IO[bytes] Required. @@ -591,7 +569,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -663,7 +641,7 @@ async def get(self, **kwargs: Any) -> _models.IntProperty: :rtype: ~typetest.property.valuetypes.models.IntProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -712,9 +690,7 @@ async def get(self, **kwargs: Any) -> _models.IntProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.IntProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.IntProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -728,9 +704,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -744,9 +718,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -760,9 +732,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IntProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IntProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IntProperty, JSON, IO[bytes] Required. @@ -771,7 +741,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -843,7 +813,7 @@ async def get(self, **kwargs: Any) -> _models.FloatProperty: :rtype: ~typetest.property.valuetypes.models.FloatProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -892,9 +862,7 @@ async def get(self, **kwargs: Any) -> _models.FloatProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.FloatProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.FloatProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -908,9 +876,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -924,9 +890,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -940,9 +904,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FloatProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.FloatProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: FloatProperty, JSON, IO[bytes] Required. @@ -951,7 +913,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1023,7 +985,7 @@ async def get(self, **kwargs: Any) -> _models.DecimalProperty: :rtype: ~typetest.property.valuetypes.models.DecimalProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1072,7 +1034,7 @@ async def get(self, **kwargs: Any) -> _models.DecimalProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DecimalProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1088,9 +1050,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1104,9 +1064,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1120,9 +1078,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DecimalProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DecimalProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DecimalProperty, JSON, IO[bytes] Required. @@ -1131,7 +1087,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1203,7 +1159,7 @@ async def get(self, **kwargs: Any) -> _models.Decimal128Property: :rtype: ~typetest.property.valuetypes.models.Decimal128Property :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1252,7 +1208,7 @@ async def get(self, **kwargs: Any) -> _models.Decimal128Property: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.Decimal128Property, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1268,9 +1224,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1284,9 +1238,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1300,9 +1252,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.Decimal128Property, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.Decimal128Property, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: Decimal128Property, JSON, IO[bytes] Required. @@ -1311,7 +1261,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1383,7 +1333,7 @@ async def get(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.valuetypes.models.DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1432,7 +1382,7 @@ async def get(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1448,9 +1398,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1464,9 +1412,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1480,9 +1426,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DatetimeProperty, JSON, IO[bytes] Required. @@ -1491,7 +1435,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1563,7 +1507,7 @@ async def get(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.valuetypes.models.DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1612,7 +1556,7 @@ async def get(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1628,9 +1572,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1644,9 +1586,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1660,9 +1600,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DurationProperty, JSON, IO[bytes] Required. @@ -1671,7 +1609,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1743,7 +1681,7 @@ async def get(self, **kwargs: Any) -> _models.EnumProperty: :rtype: ~typetest.property.valuetypes.models.EnumProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1792,9 +1730,7 @@ async def get(self, **kwargs: Any) -> _models.EnumProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.EnumProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.EnumProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1808,9 +1744,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1824,9 +1758,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1840,9 +1772,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.EnumProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.EnumProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: EnumProperty, JSON, IO[bytes] Required. @@ -1851,7 +1781,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1923,7 +1853,7 @@ async def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: :rtype: ~typetest.property.valuetypes.models.ExtensibleEnumProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1972,7 +1902,7 @@ async def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtensibleEnumProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1988,9 +1918,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2004,9 +1932,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2020,9 +1946,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExtensibleEnumProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.ExtensibleEnumProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: ExtensibleEnumProperty, JSON, IO[bytes] @@ -2032,7 +1956,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2104,7 +2028,7 @@ async def get(self, **kwargs: Any) -> _models.ModelProperty: :rtype: ~typetest.property.valuetypes.models.ModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2153,9 +2077,7 @@ async def get(self, **kwargs: Any) -> _models.ModelProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.ModelProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.ModelProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2169,9 +2091,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2185,9 +2105,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2201,9 +2119,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ModelProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.ModelProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: ModelProperty, JSON, IO[bytes] Required. @@ -2212,7 +2128,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2285,7 +2201,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2334,7 +2250,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.CollectionsStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2350,9 +2266,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2366,9 +2280,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2382,9 +2294,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsStringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.CollectionsStringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: CollectionsStringProperty, JSON, IO[bytes] @@ -2394,7 +2304,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2466,7 +2376,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsIntProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2515,7 +2425,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.CollectionsIntProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2531,9 +2441,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2547,9 +2455,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2563,9 +2469,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsIntProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.CollectionsIntProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: CollectionsIntProperty, JSON, IO[bytes] @@ -2575,7 +2479,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2648,7 +2552,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2697,7 +2601,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2713,9 +2617,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2729,9 +2631,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2745,9 +2645,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: CollectionsModelProperty, JSON, IO[bytes] @@ -2757,7 +2655,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2830,7 +2728,7 @@ async def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: :rtype: ~typetest.property.valuetypes.models.DictionaryStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2879,7 +2777,7 @@ async def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DictionaryStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2895,9 +2793,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2911,9 +2807,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2927,9 +2821,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DictionaryStringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DictionaryStringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DictionaryStringProperty, JSON, IO[bytes] @@ -2939,7 +2831,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3011,7 +2903,7 @@ async def get(self, **kwargs: Any) -> _models.NeverProperty: :rtype: ~typetest.property.valuetypes.models.NeverProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3060,9 +2952,7 @@ async def get(self, **kwargs: Any) -> _models.NeverProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.NeverProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.NeverProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3076,9 +2966,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3092,9 +2980,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3108,9 +2994,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.NeverProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.NeverProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: NeverProperty, JSON, IO[bytes] Required. @@ -3119,7 +3003,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3191,7 +3075,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownStringProperty: :rtype: ~typetest.property.valuetypes.models.UnknownStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3240,7 +3124,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownStringProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnknownStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3256,9 +3140,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3272,9 +3154,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3288,9 +3168,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnknownStringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnknownStringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnknownStringProperty, JSON, IO[bytes] @@ -3300,7 +3178,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3372,7 +3250,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownIntProperty: :rtype: ~typetest.property.valuetypes.models.UnknownIntProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3421,7 +3299,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownIntProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnknownIntProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3437,9 +3315,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3453,9 +3329,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3469,9 +3343,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnknownIntProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnknownIntProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnknownIntProperty, JSON, IO[bytes] Required. @@ -3480,7 +3352,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3552,7 +3424,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownDictProperty: :rtype: ~typetest.property.valuetypes.models.UnknownDictProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3601,7 +3473,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownDictProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnknownDictProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3617,9 +3489,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3633,9 +3503,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3649,9 +3517,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnknownDictProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnknownDictProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnknownDictProperty, JSON, IO[bytes] @@ -3661,7 +3527,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3733,7 +3599,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: :rtype: ~typetest.property.valuetypes.models.UnknownArrayProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3782,7 +3648,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnknownArrayProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3798,9 +3664,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3814,9 +3678,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3830,9 +3692,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnknownArrayProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnknownArrayProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnknownArrayProperty, JSON, IO[bytes] @@ -3842,7 +3702,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3914,7 +3774,7 @@ async def get(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.valuetypes.models.StringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3963,7 +3823,7 @@ async def get(self, **kwargs: Any) -> _models.StringLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3979,9 +3839,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3995,9 +3853,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4011,9 +3867,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: StringLiteralProperty, JSON, IO[bytes] @@ -4023,7 +3877,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4095,7 +3949,7 @@ async def get(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.valuetypes.models.IntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4144,7 +3998,7 @@ async def get(self, **kwargs: Any) -> _models.IntLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4160,9 +4014,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4176,9 +4028,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4192,9 +4042,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IntLiteralProperty, JSON, IO[bytes] Required. @@ -4203,7 +4051,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4275,7 +4123,7 @@ async def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.valuetypes.models.FloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4324,7 +4172,7 @@ async def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4340,9 +4188,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4356,9 +4202,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4372,9 +4216,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: FloatLiteralProperty, JSON, IO[bytes] @@ -4384,7 +4226,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4456,7 +4298,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.valuetypes.models.BooleanLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4505,7 +4347,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4521,9 +4363,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4537,9 +4377,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4553,9 +4391,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: BooleanLiteralProperty, JSON, IO[bytes] @@ -4565,7 +4401,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4638,7 +4474,7 @@ async def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionStringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4687,7 +4523,7 @@ async def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4703,9 +4539,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4719,9 +4553,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4735,9 +4567,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnionStringLiteralProperty, JSON, IO[bytes] @@ -4748,7 +4578,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4820,7 +4650,7 @@ async def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionIntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4869,7 +4699,7 @@ async def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4885,9 +4715,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4901,9 +4729,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4917,9 +4743,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnionIntLiteralProperty, JSON, IO[bytes] @@ -4929,7 +4753,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5002,7 +4826,7 @@ async def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionFloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5051,7 +4875,7 @@ async def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5067,9 +4891,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5083,9 +4905,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5099,9 +4919,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnionFloatLiteralProperty, JSON, IO[bytes] @@ -5111,7 +4929,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5183,7 +5001,7 @@ async def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: :rtype: ~typetest.property.valuetypes.models.UnionEnumValueProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5232,7 +5050,7 @@ async def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnionEnumValueProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5248,9 +5066,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5264,9 +5080,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5280,9 +5094,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionEnumValueProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnionEnumValueProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnionEnumValueProperty, JSON, IO[bytes] @@ -5292,7 +5104,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/models/_models.py index 6c1bab3d977..4475d0260e9 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -16,7 +15,6 @@ from ._enums import ExtendedEnum if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py index 5109c9a8443..6c1dcb22511 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -879,7 +879,7 @@ def get(self, **kwargs: Any) -> _models.BooleanProperty: :rtype: ~typetest.property.valuetypes.models.BooleanProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -928,9 +928,7 @@ def get(self, **kwargs: Any) -> _models.BooleanProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.BooleanProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.BooleanProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -944,9 +942,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -960,9 +956,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -987,7 +981,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1059,7 +1053,7 @@ def get(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.valuetypes.models.StringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1108,9 +1102,7 @@ def get(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1124,9 +1116,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1140,9 +1130,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1167,7 +1155,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1239,7 +1227,7 @@ def get(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.valuetypes.models.BytesProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1288,9 +1276,7 @@ def get(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1304,9 +1290,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1320,9 +1304,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1347,7 +1329,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1419,7 +1401,7 @@ def get(self, **kwargs: Any) -> _models.IntProperty: :rtype: ~typetest.property.valuetypes.models.IntProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1468,9 +1450,7 @@ def get(self, **kwargs: Any) -> _models.IntProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.IntProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.IntProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1484,9 +1464,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1500,9 +1478,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1527,7 +1503,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1599,7 +1575,7 @@ def get(self, **kwargs: Any) -> _models.FloatProperty: :rtype: ~typetest.property.valuetypes.models.FloatProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1648,9 +1624,7 @@ def get(self, **kwargs: Any) -> _models.FloatProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.FloatProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.FloatProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1664,9 +1638,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1680,9 +1652,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1707,7 +1677,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1779,7 +1749,7 @@ def get(self, **kwargs: Any) -> _models.DecimalProperty: :rtype: ~typetest.property.valuetypes.models.DecimalProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1828,9 +1798,7 @@ def get(self, **kwargs: Any) -> _models.DecimalProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.DecimalProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.DecimalProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1844,9 +1812,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1860,9 +1826,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1887,7 +1851,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1959,7 +1923,7 @@ def get(self, **kwargs: Any) -> _models.Decimal128Property: :rtype: ~typetest.property.valuetypes.models.Decimal128Property :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2008,9 +1972,7 @@ def get(self, **kwargs: Any) -> _models.Decimal128Property: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.Decimal128Property, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.Decimal128Property, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2024,9 +1986,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2040,9 +2000,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2067,7 +2025,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2139,7 +2097,7 @@ def get(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.valuetypes.models.DatetimeProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2188,9 +2146,7 @@ def get(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2204,9 +2160,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2220,9 +2174,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2247,7 +2199,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2319,7 +2271,7 @@ def get(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.valuetypes.models.DurationProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2368,9 +2320,7 @@ def get(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2384,9 +2334,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2400,9 +2348,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2427,7 +2373,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2499,7 +2445,7 @@ def get(self, **kwargs: Any) -> _models.EnumProperty: :rtype: ~typetest.property.valuetypes.models.EnumProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2548,9 +2494,7 @@ def get(self, **kwargs: Any) -> _models.EnumProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.EnumProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.EnumProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2564,9 +2508,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2580,9 +2522,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2607,7 +2547,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2679,7 +2619,7 @@ def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: :rtype: ~typetest.property.valuetypes.models.ExtensibleEnumProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2728,7 +2668,7 @@ def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtensibleEnumProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2744,9 +2684,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2760,9 +2698,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2788,7 +2724,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2860,7 +2796,7 @@ def get(self, **kwargs: Any) -> _models.ModelProperty: :rtype: ~typetest.property.valuetypes.models.ModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2909,9 +2845,7 @@ def get(self, **kwargs: Any) -> _models.ModelProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.ModelProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.ModelProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2925,9 +2859,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2941,9 +2873,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2968,7 +2898,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3041,7 +2971,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3090,7 +3020,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.CollectionsStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3106,9 +3036,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3122,9 +3050,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3150,7 +3076,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3222,7 +3148,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsIntProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3271,7 +3197,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.CollectionsIntProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3287,9 +3213,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3303,9 +3227,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3331,7 +3253,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3404,7 +3326,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsModelProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3453,7 +3375,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3469,9 +3391,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3485,9 +3405,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3513,7 +3431,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3586,7 +3504,7 @@ def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: :rtype: ~typetest.property.valuetypes.models.DictionaryStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3635,7 +3553,7 @@ def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DictionaryStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3651,9 +3569,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3667,9 +3583,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3695,7 +3609,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3767,7 +3681,7 @@ def get(self, **kwargs: Any) -> _models.NeverProperty: :rtype: ~typetest.property.valuetypes.models.NeverProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3816,9 +3730,7 @@ def get(self, **kwargs: Any) -> _models.NeverProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.NeverProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.NeverProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3832,9 +3744,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3848,9 +3758,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3875,7 +3783,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3947,7 +3855,7 @@ def get(self, **kwargs: Any) -> _models.UnknownStringProperty: :rtype: ~typetest.property.valuetypes.models.UnknownStringProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3996,7 +3904,7 @@ def get(self, **kwargs: Any) -> _models.UnknownStringProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.UnknownStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4012,9 +3920,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4028,9 +3934,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4056,7 +3960,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4128,7 +4032,7 @@ def get(self, **kwargs: Any) -> _models.UnknownIntProperty: :rtype: ~typetest.property.valuetypes.models.UnknownIntProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4177,9 +4081,7 @@ def get(self, **kwargs: Any) -> _models.UnknownIntProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.UnknownIntProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.UnknownIntProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4193,9 +4095,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4209,9 +4109,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4236,7 +4134,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4308,7 +4206,7 @@ def get(self, **kwargs: Any) -> _models.UnknownDictProperty: :rtype: ~typetest.property.valuetypes.models.UnknownDictProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4357,9 +4255,7 @@ def get(self, **kwargs: Any) -> _models.UnknownDictProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.UnknownDictProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.UnknownDictProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4373,9 +4269,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4389,9 +4283,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4417,7 +4309,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4489,7 +4381,7 @@ def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: :rtype: ~typetest.property.valuetypes.models.UnknownArrayProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4538,9 +4430,7 @@ def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.UnknownArrayProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.UnknownArrayProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4554,9 +4444,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4570,9 +4458,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4598,7 +4484,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4670,7 +4556,7 @@ def get(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.valuetypes.models.StringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4719,7 +4605,7 @@ def get(self, **kwargs: Any) -> _models.StringLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4735,9 +4621,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4751,9 +4635,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4779,7 +4661,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4851,7 +4733,7 @@ def get(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.valuetypes.models.IntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4900,9 +4782,7 @@ def get(self, **kwargs: Any) -> _models.IntLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4916,9 +4796,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4932,9 +4810,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4959,7 +4835,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5031,7 +4907,7 @@ def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.valuetypes.models.FloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5080,9 +4956,7 @@ def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5096,9 +4970,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5112,9 +4984,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5140,7 +5010,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5212,7 +5082,7 @@ def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.valuetypes.models.BooleanLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5261,7 +5131,7 @@ def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5277,9 +5147,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5293,9 +5161,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5321,7 +5187,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5394,7 +5260,7 @@ def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionStringLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5443,7 +5309,7 @@ def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5459,9 +5325,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5475,9 +5339,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5504,7 +5366,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5576,7 +5438,7 @@ def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionIntLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5625,7 +5487,7 @@ def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5641,9 +5503,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5657,9 +5517,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5685,7 +5543,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5758,7 +5616,7 @@ def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionFloatLiteralProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5807,7 +5665,7 @@ def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5823,9 +5681,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5839,9 +5695,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5867,7 +5721,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5939,7 +5793,7 @@ def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: :rtype: ~typetest.property.valuetypes.models.UnionEnumValueProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5988,7 +5842,7 @@ def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.UnionEnumValueProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -6004,9 +5858,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6020,9 +5872,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6048,7 +5898,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py index 855ed509278..858c4c76fd4 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import decimal import json import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -49,7 +49,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -79,7 +79,7 @@ async def get(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -128,7 +128,7 @@ async def get(self, **kwargs: Any) -> str: return deserialized # type: ignore @distributed_trace_async - async def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put(self, body: str, **kwargs: Any) -> None: """put string value. :param body: _. Required. @@ -137,7 +137,7 @@ async def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,7 +204,7 @@ async def get(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +253,7 @@ async def get(self, **kwargs: Any) -> bool: return deserialized # type: ignore @distributed_trace_async - async def put(self, body: bool, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put(self, body: bool, **kwargs: Any) -> None: """put boolean value. :param body: _. Required. @@ -262,7 +262,7 @@ async def put(self, body: bool, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -329,7 +329,7 @@ async def get(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -378,7 +378,7 @@ async def get(self, **kwargs: Any) -> Any: return deserialized # type: ignore @distributed_trace_async - async def put(self, body: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put(self, body: Any, **kwargs: Any) -> None: """put unknown value. :param body: _. Required. @@ -387,7 +387,7 @@ async def put(self, body: Any, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -454,7 +454,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: :rtype: ~decimal.Decimal :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -503,9 +503,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: return deserialized # type: ignore @distributed_trace_async - async def request_body( # pylint: disable=inconsistent-return-statements - self, body: decimal.Decimal, **kwargs: Any - ) -> None: + async def request_body(self, body: decimal.Decimal, **kwargs: Any) -> None: """request_body. :param body: Required. @@ -514,7 +512,7 @@ async def request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -556,9 +554,7 @@ async def request_body( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def request_parameter( # pylint: disable=inconsistent-return-statements - self, *, value: decimal.Decimal, **kwargs: Any - ) -> None: + async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> None: """request_parameter. :keyword value: Required. @@ -567,7 +563,7 @@ async def request_parameter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,7 +626,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: :rtype: ~decimal.Decimal :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -679,9 +675,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: return deserialized # type: ignore @distributed_trace_async - async def request_body( # pylint: disable=inconsistent-return-statements - self, body: decimal.Decimal, **kwargs: Any - ) -> None: + async def request_body(self, body: decimal.Decimal, **kwargs: Any) -> None: """request_body. :param body: Required. @@ -690,7 +684,7 @@ async def request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -732,9 +726,7 @@ async def request_body( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def request_parameter( # pylint: disable=inconsistent-return-statements - self, *, value: decimal.Decimal, **kwargs: Any - ) -> None: + async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> None: """request_parameter. :keyword value: Required. @@ -743,7 +735,7 @@ async def request_parameter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -806,7 +798,7 @@ async def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: :rtype: list[~decimal.Decimal] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -855,9 +847,7 @@ async def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: return deserialized # type: ignore @distributed_trace_async - async def verify( # pylint: disable=inconsistent-return-statements - self, body: decimal.Decimal, **kwargs: Any - ) -> None: + async def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: """verify. :param body: Required. @@ -866,7 +856,7 @@ async def verify( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -933,7 +923,7 @@ async def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: :rtype: list[~decimal.Decimal] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -982,9 +972,7 @@ async def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: return deserialized # type: ignore @distributed_trace_async - async def verify( # pylint: disable=inconsistent-return-statements - self, body: decimal.Decimal, **kwargs: Any - ) -> None: + async def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: """verify. :param body: Required. @@ -993,7 +981,7 @@ async def verify( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/_operations.py index 208eefd50ff..c1c8f285d7f 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ import decimal import json import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -282,7 +282,7 @@ def get(self, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -340,7 +340,7 @@ def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -407,7 +407,7 @@ def get(self, **kwargs: Any) -> bool: :rtype: bool :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -465,7 +465,7 @@ def put(self, body: bool, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -532,7 +532,7 @@ def get(self, **kwargs: Any) -> Any: :rtype: any :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -590,7 +590,7 @@ def put(self, body: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -657,7 +657,7 @@ def response_body(self, **kwargs: Any) -> decimal.Decimal: :rtype: ~decimal.Decimal :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -717,7 +717,7 @@ def request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -770,7 +770,7 @@ def request_parameter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -833,7 +833,7 @@ def response_body(self, **kwargs: Any) -> decimal.Decimal: :rtype: ~decimal.Decimal :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -893,7 +893,7 @@ def request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -946,7 +946,7 @@ def request_parameter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1009,7 +1009,7 @@ def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: :rtype: list[~decimal.Decimal] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1067,7 +1067,7 @@ def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1134,7 +1134,7 @@ def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: :rtype: list[~decimal.Decimal] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1192,7 +1192,7 @@ def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_model_base.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_model_base.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_serialization.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_serialization.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/_operations.py index 672b7fe9ce0..8aca54c2888 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -54,7 +54,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -86,7 +86,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse9: :rtype: ~typetest.union.models.GetResponse9 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -135,9 +135,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse9: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -151,7 +149,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: Literal["a", "b", "c"], content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -168,9 +166,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -184,7 +180,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: Literal["a", "b", "c"] = _Unset, **kwargs: Any ) -> None: """send. @@ -198,7 +194,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -275,7 +271,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse8: :rtype: ~typetest.union.models.GetResponse8 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -324,9 +320,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse8: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -340,7 +334,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: Union[Literal["b"], Literal["c"], str], content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -356,9 +350,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -372,7 +364,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, @@ -389,7 +381,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -466,7 +458,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse7: :rtype: ~typetest.union.models.GetResponse7 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -515,9 +507,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse7: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -531,7 +521,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: Union[str, _models.StringExtensibleNamedUnion], @@ -551,9 +541,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -567,7 +555,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, @@ -584,7 +572,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -661,7 +649,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse6: :rtype: ~typetest.union.models.GetResponse6 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -710,9 +698,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse6: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -726,9 +712,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, *, prop: Literal[1, 2, 3], content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, *, prop: Literal[1, 2, 3], content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Is one of the following types: Literal[1], Literal[2], Literal[3] Required. @@ -742,9 +726,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -758,7 +740,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: Literal[1, 2, 3] = _Unset, **kwargs: Any ) -> None: """send. @@ -771,7 +753,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -848,7 +830,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse5: :rtype: ~typetest.union.models.GetResponse5 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -897,9 +879,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse5: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -913,9 +893,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, *, prop: float, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, *, prop: float, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Is one of the following types: float, float, float Required. @@ -929,9 +907,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -945,9 +921,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements - self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: float = _Unset, **kwargs: Any - ) -> None: + async def send(self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: float = _Unset, **kwargs: Any) -> None: """send. :param body: Is either a JSON type or a IO[bytes] type. Required. @@ -958,7 +932,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1035,7 +1009,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse4: :rtype: ~typetest.union.models.GetResponse4 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1084,9 +1058,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse4: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1100,7 +1072,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: Union[_models.Cat, _models.Dog], content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1116,9 +1088,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1132,7 +1102,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: Union[_models.Cat, _models.Dog] = _Unset, **kwargs: Any ) -> None: """send. @@ -1145,7 +1115,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1222,7 +1192,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse3: :rtype: ~typetest.union.models.GetResponse3 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1271,9 +1241,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse3: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1287,7 +1255,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: _models.EnumsOnlyCases, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1303,9 +1271,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1319,7 +1285,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: _models.EnumsOnlyCases = _Unset, **kwargs: Any ) -> None: """send. @@ -1332,7 +1298,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1409,7 +1375,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse2: :rtype: ~typetest.union.models.GetResponse2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1458,9 +1424,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse2: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1474,7 +1438,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: _models.StringAndArrayCases, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1490,9 +1454,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1506,7 +1468,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: _models.StringAndArrayCases = _Unset, **kwargs: Any ) -> None: """send. @@ -1519,7 +1481,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1596,7 +1558,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse1: :rtype: ~typetest.union.models.GetResponse1 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1645,9 +1607,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse1: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1661,7 +1621,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: _models.MixedLiteralsCases, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1677,9 +1637,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1693,7 +1651,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: _models.MixedLiteralsCases = _Unset, **kwargs: Any ) -> None: """send. @@ -1706,7 +1664,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1783,7 +1741,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse: :rtype: ~typetest.union.models.GetResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1832,9 +1790,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1848,7 +1804,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: _models.MixedTypesCases, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1864,9 +1820,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1880,7 +1834,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @distributed_trace_async - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: _models.MixedTypesCases = _Unset, **kwargs: Any ) -> None: """send. @@ -1893,7 +1847,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/models/_models.py index 977c593a82d..eb3c4701ac7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/models/_models.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/_operations.py index f0044242779..3cf29accc16 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -348,7 +348,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse9: :rtype: ~typetest.union.models.GetResponse9 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -397,9 +397,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse9: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -413,9 +411,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: Literal["a", "b", "c"], content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: Literal["a", "b", "c"], content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Is one of the following types: Literal["a"], Literal["b"], Literal["c"] @@ -430,9 +426,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -460,7 +454,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -537,7 +531,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse8: :rtype: ~typetest.union.models.GetResponse8 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -586,9 +580,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse8: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -602,7 +594,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements + def send( self, *, prop: Union[Literal["b"], Literal["c"], str], content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -618,9 +610,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -651,7 +641,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -728,7 +718,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse7: :rtype: ~typetest.union.models.GetResponse7 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -777,9 +767,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse7: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -793,7 +781,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements + def send( self, *, prop: Union[str, _models.StringExtensibleNamedUnion], @@ -813,9 +801,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -846,7 +832,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -923,7 +909,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse6: :rtype: ~typetest.union.models.GetResponse6 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -972,9 +958,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse6: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -988,9 +972,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: Literal[1, 2, 3], content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: Literal[1, 2, 3], content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Is one of the following types: Literal[1], Literal[2], Literal[3] Required. @@ -1004,9 +986,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1033,7 +1013,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1110,7 +1090,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse5: :rtype: ~typetest.union.models.GetResponse5 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1159,9 +1139,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse5: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1175,9 +1153,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: float, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: float, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Is one of the following types: float, float, float Required. @@ -1191,9 +1167,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1220,7 +1194,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1297,7 +1271,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse4: :rtype: ~typetest.union.models.GetResponse4 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1346,9 +1320,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse4: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1362,7 +1334,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements + def send( self, *, prop: Union[_models.Cat, _models.Dog], content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1378,9 +1350,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1407,7 +1377,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1484,7 +1454,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse3: :rtype: ~typetest.union.models.GetResponse3 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1533,9 +1503,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse3: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1549,9 +1517,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: _models.EnumsOnlyCases, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: _models.EnumsOnlyCases, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Required. @@ -1565,9 +1531,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1594,7 +1558,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1671,7 +1635,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse2: :rtype: ~typetest.union.models.GetResponse2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1720,9 +1684,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse2: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1736,9 +1698,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: _models.StringAndArrayCases, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: _models.StringAndArrayCases, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Required. @@ -1752,9 +1712,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1781,7 +1739,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1858,7 +1816,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse1: :rtype: ~typetest.union.models.GetResponse1 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1907,9 +1865,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse1: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1923,9 +1879,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: _models.MixedLiteralsCases, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: _models.MixedLiteralsCases, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Required. @@ -1939,9 +1893,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1968,7 +1920,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2045,7 +1997,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse: :rtype: ~typetest.union.models.GetResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2094,9 +2046,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -2110,9 +2060,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: _models.MixedTypesCases, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: _models.MixedTypesCases, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Required. @@ -2126,9 +2074,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -2155,7 +2101,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_serialization.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_serialization.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_types.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_types.py index 64ee7815ff4..ad0f62c5c36 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_types.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_types.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_vendor.py index ec5a0c4a7f3..9be6e919385 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AddedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_vendor.py index af50be359b2..27a5ba89938 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AddedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/_operations.py index f2a2fb6c34d..6b0e31f7409 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -39,7 +38,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -124,7 +123,7 @@ async def v2_in_interface(self, body: Union[_models.ModelV2, JSON, IO[bytes]], * :rtype: ~versioning.added.models.ModelV2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -257,7 +256,7 @@ async def v1( :rtype: ~versioning.added.models.ModelV1 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -375,7 +374,7 @@ async def v2(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwargs: Any) :rtype: ~versioning.added.models.ModelV2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/models/_models.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/models/_models.py index 1262da1da9c..a4ce135cdde 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/models/_models.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import _types, models as _models diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/_operations.py index ca6111c4250..67794685289 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -173,7 +172,7 @@ def v2_in_interface(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwarg :rtype: ~versioning.added.models.ModelV2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -304,7 +303,7 @@ def v1(self, body: Union[_models.ModelV1, JSON, IO[bytes]], *, header_v2: str, * :rtype: ~versioning.added.models.ModelV1 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -420,7 +419,7 @@ def v2(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwargs: Any) -> _m :rtype: ~versioning.added.models.ModelV2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_configuration.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_configuration.py index 5404ddc9ca5..1b22e12e8dd 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_configuration.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class MadeOptionalClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MadeOptionalClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MadeOptionalClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_operations/_operations.py index 02fdcf18c6f..cf583ed9bee 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -140,7 +139,7 @@ def test( :rtype: ~versioning.madeoptional.models.TestModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_serialization.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_serialization.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_vendor.py index 96e1652e410..cd65b2e21c7 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MadeOptionalClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_configuration.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_configuration.py index af3fbb274e7..6628f8d5764 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class MadeOptionalClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MadeOptionalClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MadeOptionalClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/_operations.py index 302e4ccce2f..285f44e4d7f 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -115,7 +114,7 @@ async def test( :rtype: ~versioning.madeoptional.models.TestModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_vendor.py index 023a205c52f..88e2f72f142 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MadeOptionalClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/models/_models.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/models/_models.py index 4bc8fc39a5b..8995a2eecb4 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/models/_models.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_operations/_operations.py index 5d5f77af10a..e070920381a 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -114,7 +113,7 @@ def v2(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwargs: Any) -> _m :rtype: ~versioning.removed.models.ModelV2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_serialization.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_serialization.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_types.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_types.py index eeda97cf8e8..d9eb2e02134 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_types.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_types.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_vendor.py index d481eae29b7..bc90285b643 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RemovedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_operations/_operations.py index b1d4ba40ef0..83574905608 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -96,7 +95,7 @@ async def v2(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwargs: Any) :rtype: ~versioning.removed.models.ModelV2 :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_vendor.py index e44328a02b4..2da759abf44 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RemovedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/models/_models.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/models/_models.py index a7461b93d6f..9f1b190d537 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/models/_models.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import _types, models as _models diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_configuration.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_configuration.py index 6414673b610..c39a8e2a775 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_configuration.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class RenamedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RenamedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RenamedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_serialization.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_serialization.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_types.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_types.py index 1bc23c529c9..6a0c99464d6 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_types.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_types.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_vendor.py index 211023e8a61..58ea6f6e27e 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RenamedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_configuration.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_configuration.py index 8e0ddbd4c77..58fb1163c0e 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class RenamedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RenamedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RenamedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_vendor.py index be7da621479..9efbf1c2f6d 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RenamedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py index ae8c2f4b7f1..df9489f49a9 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -120,7 +119,7 @@ async def new_op_in_new_interface( :rtype: ~versioning.renamedfrom.models.NewModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -250,7 +249,7 @@ async def new_op( :rtype: ~versioning.renamedfrom.models.NewModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/models/_models.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/models/_models.py index cac79226a0f..0fe92ca8d59 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/models/_models.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import _types, models as _models diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py index fb87c56536a..73d6b73478d 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -158,7 +157,7 @@ def new_op_in_new_interface( :rtype: ~versioning.renamedfrom.models.NewModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +287,7 @@ def new_op( :rtype: ~versioning.renamedfrom.models.NewModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_configuration.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_configuration.py index ddf8555ebb1..ab0d9528d45 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_configuration.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class ReturnTypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ReturnTypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ReturnTypeChangedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/_operations.py index aafc1b0565d..e186a185abe 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -68,7 +67,7 @@ def test(self, body: str, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_serialization.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_serialization.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_vendor.py index 8bb3b454b64..b3ff6f2365c 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ReturnTypeChangedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_configuration.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_configuration.py index 4fcd2852abd..765766e4f98 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class ReturnTypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ReturnTypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ReturnTypeChangedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/_operations.py index c870f03f3b0..6cc9bc2bb67 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +48,7 @@ async def test(self, body: str, **kwargs: Any) -> str: :rtype: str :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_vendor.py index 8920c149c25..fd597fb4fe8 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ReturnTypeChangedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_configuration.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_configuration.py index ced59b73636..be1f40dcb9d 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_configuration.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class TypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TypeChangedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_model_base.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_model_base.py index 12ad7f29c71..9d401b0cf01 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_model_base.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/_operations.py index e4671162432..4a5c3ce2574 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -132,7 +131,7 @@ def test(self, body: Union[_models.TestModel, JSON, IO[bytes]], *, param: str, * :rtype: ~versioning.typechangedfrom.models.TestModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_serialization.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_serialization.py index 01a226bd7f1..7b3074215a3 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_serialization.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_vendor.py index a5eb520a064..ce81fb7ab76 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import TypeChangedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_configuration.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_configuration.py index ede458bb10b..68c49c361da 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_configuration.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class TypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TypeChangedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/_operations.py index 2dd2ebdad8b..a55e76ab915 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -110,7 +109,7 @@ async def test( :rtype: ~versioning.typechangedfrom.models.TestModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_vendor.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_vendor.py index 0e2eabe1c13..ae00688372b 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_vendor.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import TypeChangedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/models/_models.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/models/_models.py index 53dd351c6df..8c7260d5c2d 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/models/_models.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/azure/tox.ini b/packages/typespec-python/test/azure/tox.ini index 893603e8790..cbe46441841 100644 --- a/packages/typespec-python/test/azure/tox.ini +++ b/packages/typespec-python/test/azure/tox.ini @@ -11,6 +11,27 @@ commands= pytest [testenv:ci] +deps= + -r requirements.txt +commands = + # pytest + pytest mock_api_tests ../generic_mock_api_tests {posargs} + + # pylint + pip install azure-pylint-guidelines-checker==0.4.1 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + python ../../../eng/scripts/ci/run_pylint.py -t azure -s "generated" {posargs} + + # mypy + python ../../../eng/scripts/ci/run_mypy.py -t azure -s "generated" {posargs} + + # pyright + python ../../../eng/scripts/ci/run_pyright.py -t azure -s "generated" {posargs} + + # apiview + pip install ../../../../../azure-sdk-tools/packages/python-packages/apiview-stub-generator --extra-index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + python ../../../../eng/scripts/run_apiview.py -p typespec-python -t azure -s "generated" {posargs} + +[testenv:test] commands = pytest mock_api_tests ../generic_mock_api_tests {posargs} diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_model_base.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_operations/_operations.py index 8e9719656c6..72b60dcb61d 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +66,7 @@ def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -110,7 +109,7 @@ def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_serialization.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_vendor.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_vendor.py index 646c078e32b..78666efbd42 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ApiKeyClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_operations/_operations.py index b02ed77220f..8acd7fdfe7c 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -28,21 +27,21 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class ApiKeyClientOperationsMixin(ApiKeyClientMixinABC): - async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def valid(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -78,14 +77,14 @@ async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re if cls: return cls(pipeline_response, None, {}) # type: ignore - async def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def invalid(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_vendor.py index d91bfbb3a81..66bc9bf8dd9 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ApiKeyClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/models/_models.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/models/_models.py index 55d9056bc2b..94140853e65 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_model_base.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_operations/_operations.py index a610964aae4..9f2ca42f5ed 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +66,7 @@ def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -110,7 +109,7 @@ def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_serialization.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_vendor.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_vendor.py index 147773ad334..207d4674c6c 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import CustomClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_operations/_operations.py index 55824c4edb1..3909bd4e61d 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -28,21 +27,21 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class CustomClientOperationsMixin(CustomClientMixinABC): - async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def valid(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -78,14 +77,14 @@ async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re if cls: return cls(pipeline_response, None, {}) # type: ignore - async def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def invalid(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_vendor.py index 060d9a24e31..8a3f1e61a9c 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import CustomClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/models/_models.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/models/_models.py index 55d9056bc2b..94140853e65 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_client.py index 02c9b2c9d6c..5c8507c6679 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_client.py @@ -18,7 +18,6 @@ from ._serialization import Deserializer, Serializer if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.credentials import TokenCredential diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_configuration.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_configuration.py index 1fa641314e7..32b7b92b3a9 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_configuration.py @@ -13,7 +13,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.credentials import TokenCredential diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_model_base.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_operations/_operations.py index 79744603099..3af4e9907f2 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +66,7 @@ def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -110,7 +109,7 @@ def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_serialization.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_vendor.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_vendor.py index 2115f48e08d..886b79eee3d 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import OAuth2ClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_client.py index a2331f14e5e..23df89fa2eb 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_client.py @@ -18,7 +18,6 @@ from ._operations import OAuth2ClientOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.credentials import AsyncTokenCredential diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_configuration.py index 927afe5b4d9..0ac0c6a3092 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_configuration.py @@ -13,7 +13,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.credentials import AsyncTokenCredential diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_operations/_operations.py index 8752aacfefa..b547928d3a5 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -28,21 +27,21 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class OAuth2ClientOperationsMixin(OAuth2ClientMixinABC): - async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def valid(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -78,14 +77,14 @@ async def valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re if cls: return cls(pipeline_response, None, {}) # type: ignore - async def invalid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def invalid(self, **kwargs: Any) -> None: """Check whether client is authenticated. Will return an invalid bearer error. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_vendor.py index e5b76bde018..dab9a5e3c42 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import OAuth2ClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/models/_models.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/models/_models.py index 55d9056bc2b..94140853e65 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_client.py index f1080346999..abb07aae6bd 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_client.py @@ -19,7 +19,6 @@ from ._serialization import Deserializer, Serializer if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.credentials import TokenCredential diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_configuration.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_configuration.py index 6deee31787e..62cb34340dd 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_configuration.py @@ -14,7 +14,6 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.credentials import TokenCredential diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_model_base.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_operations/_operations.py index e672899d3b7..46d38614a53 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ def valid_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -100,7 +99,7 @@ def valid_token(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_serialization.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_vendor.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_vendor.py index 0e69bd8ed4b..2dbeca90b4a 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import UnionClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_client.py index 555c5c1cba6..45b207363d9 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_client.py @@ -19,7 +19,6 @@ from ._operations import UnionClientOperationsMixin if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.credentials import AsyncTokenCredential diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_configuration.py index 471b816a5ad..a7ae26e43d7 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_configuration.py @@ -14,7 +14,6 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.credentials import AsyncTokenCredential diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_operations/_operations.py index c43bf651a60..3dec35abc9d 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,21 +25,21 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class UnionClientOperationsMixin(UnionClientMixinABC): - async def valid_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def valid_key(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -76,14 +75,14 @@ async def valid_key(self, **kwargs: Any) -> None: # pylint: disable=inconsisten if cls: return cls(pipeline_response, None, {}) # type: ignore - async def valid_token(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def valid_token(self, **kwargs: Any) -> None: """Check whether client is authenticated. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_vendor.py index 4e8aaefc6fd..ed76cd7d36b 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import UnionClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_model_base.py b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_serialization.py b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_vendor.py b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_vendor.py index 683c07d3504..c13b9497173 100644 --- a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NamingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/aio/_vendor.py index ec2909583ac..9dc0903a87a 100644 --- a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NamingClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/aio/operations/_operations.py index 8b5a8958d16..ae63edf38fa 100644 --- a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -43,7 +42,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,9 +66,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def client( # pylint: disable=inconsistent-return-statements - self, body: _models.ClientModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def client(self, body: _models.ClientModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -83,9 +80,7 @@ async def client( # pylint: disable=inconsistent-return-statements """ @overload - async def client( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def client(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -99,9 +94,7 @@ async def client( # pylint: disable=inconsistent-return-statements """ @overload - async def client( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def client(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -114,9 +107,7 @@ async def client( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def client( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ClientModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def client(self, body: Union[_models.ClientModel, JSON, IO[bytes]], **kwargs: Any) -> None: """client. :param body: Is one of the following types: ClientModel, JSON, IO[bytes] Required. @@ -125,7 +116,7 @@ async def client( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -172,7 +163,7 @@ async def client( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def language( # pylint: disable=inconsistent-return-statements + async def language( self, body: _models.PythonModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """language. @@ -188,9 +179,7 @@ async def language( # pylint: disable=inconsistent-return-statements """ @overload - async def language( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def language(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -204,9 +193,7 @@ async def language( # pylint: disable=inconsistent-return-statements """ @overload - async def language( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def language(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -219,9 +206,7 @@ async def language( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def language( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PythonModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def language(self, body: Union[_models.PythonModel, JSON, IO[bytes]], **kwargs: Any) -> None: """language. :param body: Is one of the following types: PythonModel, JSON, IO[bytes] Required. @@ -230,7 +215,7 @@ async def language( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -294,9 +279,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def union_enum_name( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.ClientExtensibleEnum], **kwargs: Any - ) -> None: + async def union_enum_name(self, body: Union[str, _models.ClientExtensibleEnum], **kwargs: Any) -> None: """union_enum_name. :param body: "value1" Required. @@ -305,7 +288,7 @@ async def union_enum_name( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -346,9 +329,7 @@ async def union_enum_name( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def union_enum_member_name( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.ExtensibleEnum], **kwargs: Any - ) -> None: + async def union_enum_member_name(self, body: Union[str, _models.ExtensibleEnum], **kwargs: Any) -> None: """union_enum_member_name. :param body: Known values are: "value1" and "value2". Required. @@ -357,7 +338,7 @@ async def union_enum_member_name( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -401,14 +382,14 @@ async def union_enum_member_name( # pylint: disable=inconsistent-return-stateme class NamingClientOperationsMixin(NamingClientMixinABC): - async def client_name(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def client_name(self, **kwargs: Any) -> None: """client_name. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -444,9 +425,7 @@ async def client_name(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def parameter( # pylint: disable=inconsistent-return-statements - self, *, client_name: str, **kwargs: Any - ) -> None: + async def parameter(self, *, client_name: str, **kwargs: Any) -> None: """parameter. :keyword client_name: Required. @@ -455,7 +434,7 @@ async def parameter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -493,7 +472,7 @@ async def parameter( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def client( # pylint: disable=inconsistent-return-statements + async def client( self, body: _models.ClientNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """client. @@ -509,9 +488,7 @@ async def client( # pylint: disable=inconsistent-return-statements """ @overload - async def client( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def client(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -525,9 +502,7 @@ async def client( # pylint: disable=inconsistent-return-statements """ @overload - async def client( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def client(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -540,9 +515,7 @@ async def client( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def client( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ClientNameModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def client(self, body: Union[_models.ClientNameModel, JSON, IO[bytes]], **kwargs: Any) -> None: """client. :param body: Is one of the following types: ClientNameModel, JSON, IO[bytes] Required. @@ -551,7 +524,7 @@ async def client( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -598,7 +571,7 @@ async def client( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def language( # pylint: disable=inconsistent-return-statements + async def language( self, body: _models.LanguageClientNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """language. @@ -614,9 +587,7 @@ async def language( # pylint: disable=inconsistent-return-statements """ @overload - async def language( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def language(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -630,9 +601,7 @@ async def language( # pylint: disable=inconsistent-return-statements """ @overload - async def language( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def language(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -645,9 +614,7 @@ async def language( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def language( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.LanguageClientNameModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def language(self, body: Union[_models.LanguageClientNameModel, JSON, IO[bytes]], **kwargs: Any) -> None: """language. :param body: Is one of the following types: LanguageClientNameModel, JSON, IO[bytes] Required. @@ -656,7 +623,7 @@ async def language( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -703,7 +670,7 @@ async def language( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + async def compatible_with_encoded_name( self, body: _models.ClientNameAndJsonEncodedNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -719,7 +686,7 @@ async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-s """ @overload - async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + async def compatible_with_encoded_name( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -735,7 +702,7 @@ async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-s """ @overload - async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + async def compatible_with_encoded_name( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -750,7 +717,7 @@ async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-s :raises ~corehttp.exceptions.HttpResponseError: """ - async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + async def compatible_with_encoded_name( self, body: Union[_models.ClientNameAndJsonEncodedNameModel, JSON, IO[bytes]], **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -762,7 +729,7 @@ async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -808,9 +775,7 @@ async def compatible_with_encoded_name( # pylint: disable=inconsistent-return-s if cls: return cls(pipeline_response, None, {}) # type: ignore - async def request( # pylint: disable=inconsistent-return-statements - self, *, client_name: str, **kwargs: Any - ) -> None: + async def request(self, *, client_name: str, **kwargs: Any) -> None: """request. :keyword client_name: Required. @@ -819,7 +784,7 @@ async def request( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -856,14 +821,14 @@ async def request( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def response(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def response(self, **kwargs: Any) -> None: """response. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/models/_models.py b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/models/_models.py index c8856d6b2f1..1f51766b6c4 100644 --- a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/operations/_operations.py index ef84c75d770..ebe664d6b1f 100644 --- a/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/client-naming/client/naming/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -31,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -192,9 +192,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: _models.ClientModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: _models.ClientModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -208,9 +206,7 @@ def client( # pylint: disable=inconsistent-return-statements """ @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -224,9 +220,7 @@ def client( # pylint: disable=inconsistent-return-statements """ @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -250,7 +244,7 @@ def client( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -297,9 +291,7 @@ def client( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def language( # pylint: disable=inconsistent-return-statements - self, body: _models.PythonModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def language(self, body: _models.PythonModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -313,9 +305,7 @@ def language( # pylint: disable=inconsistent-return-statements """ @overload - def language( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def language(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -329,9 +319,7 @@ def language( # pylint: disable=inconsistent-return-statements """ @overload - def language( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def language(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -355,7 +343,7 @@ def language( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -430,7 +418,7 @@ def union_enum_name( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,7 +470,7 @@ def union_enum_member_name( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -533,7 +521,7 @@ def client_name(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -578,7 +566,7 @@ def parameter(self, *, client_name: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -616,9 +604,7 @@ def parameter(self, *, client_name: str, **kwargs: Any) -> None: # pylint: disa return cls(pipeline_response, None, {}) # type: ignore @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: _models.ClientNameModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: _models.ClientNameModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -632,9 +618,7 @@ def client( # pylint: disable=inconsistent-return-statements """ @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -648,9 +632,7 @@ def client( # pylint: disable=inconsistent-return-statements """ @overload - def client( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def client(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """client. :param body: Required. @@ -674,7 +656,7 @@ def client( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -721,7 +703,7 @@ def client( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def language( # pylint: disable=inconsistent-return-statements + def language( self, body: _models.LanguageClientNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """language. @@ -737,9 +719,7 @@ def language( # pylint: disable=inconsistent-return-statements """ @overload - def language( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def language(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -753,9 +733,7 @@ def language( # pylint: disable=inconsistent-return-statements """ @overload - def language( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def language(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """language. :param body: Required. @@ -779,7 +757,7 @@ def language( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -826,7 +804,7 @@ def language( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + def compatible_with_encoded_name( self, body: _models.ClientNameAndJsonEncodedNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -842,7 +820,7 @@ def compatible_with_encoded_name( # pylint: disable=inconsistent-return-stateme """ @overload - def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + def compatible_with_encoded_name( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -858,7 +836,7 @@ def compatible_with_encoded_name( # pylint: disable=inconsistent-return-stateme """ @overload - def compatible_with_encoded_name( # pylint: disable=inconsistent-return-statements + def compatible_with_encoded_name( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """compatible_with_encoded_name. @@ -885,7 +863,7 @@ def compatible_with_encoded_name( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -940,7 +918,7 @@ def request(self, *, client_name: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -984,7 +962,7 @@ def response(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_model_base.py b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_serialization.py b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_vendor.py b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_vendor.py index b15158be6ba..e48b342c738 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/aio/_vendor.py index eedee3d0b43..f35185fe8f5 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ServiceClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/aio/operations/_operations.py index bf1538a674c..2c66fd8bf21 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -80,14 +79,14 @@ def __init__(self, *args, **kwargs) -> None: self.bar = QuxBarOperations(self._client, self._config, self._serialize, self._deserialize) - async def eight(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def eight(self, **kwargs: Any) -> None: """eight. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -142,14 +141,14 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def three(self, **kwargs: Any) -> None: """three. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -186,14 +185,14 @@ async def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re if cls: return cls(pipeline_response, None, {}) # type: ignore - async def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def four(self, **kwargs: Any) -> None: """four. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -248,14 +247,14 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def five(self, **kwargs: Any) -> None: """five. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -292,14 +291,14 @@ async def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret if cls: return cls(pipeline_response, None, {}) # type: ignore - async def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def six(self, **kwargs: Any) -> None: """six. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -339,14 +338,14 @@ async def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu class ServiceClientOperationsMixin(ServiceClientMixinABC): - async def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def one(self, **kwargs: Any) -> None: """one. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -383,14 +382,14 @@ async def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu if cls: return cls(pipeline_response, None, {}) # type: ignore - async def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def two(self, **kwargs: Any) -> None: """two. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -445,14 +444,14 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def seven(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def seven(self, **kwargs: Any) -> None: """seven. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -507,14 +506,14 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def nine(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def nine(self, **kwargs: Any) -> None: """nine. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/operations/_operations.py index 98a6cf687c6..59cc8edd08d 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-default/client/structure/service/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -143,7 +142,7 @@ def eight(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -205,7 +204,7 @@ def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -249,7 +248,7 @@ def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -311,7 +310,7 @@ def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -355,7 +354,7 @@ def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -402,7 +401,7 @@ def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -446,7 +445,7 @@ def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -508,7 +507,7 @@ def seven(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -570,7 +569,7 @@ def nine(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_operations/_operations.py index 59ec5d82189..c71bcb0b38f 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -85,7 +84,7 @@ def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -129,7 +128,7 @@ def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -173,7 +172,7 @@ def renamed_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,7 +219,7 @@ def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -264,7 +263,7 @@ def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -308,7 +307,7 @@ def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_serialization.py b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_vendor.py b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_vendor.py index 103c98f4421..35c5158b9ed 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ClientAClientConfiguration, ClientBClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/_operations.py index f56b4fa0deb..4a03f314c51 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,21 +32,21 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class ClientAClientOperationsMixin(ClientAClientMixinABC): - async def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_one(self, **kwargs: Any) -> None: """renamed_one. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84,14 +83,14 @@ async def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_three(self, **kwargs: Any) -> None: """renamed_three. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -128,14 +127,14 @@ async def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsi if cls: return cls(pipeline_response, None, {}) # type: ignore - async def renamed_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_five(self, **kwargs: Any) -> None: """renamed_five. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -175,14 +174,14 @@ async def renamed_five(self, **kwargs: Any) -> None: # pylint: disable=inconsis class ClientBClientOperationsMixin(ClientBClientMixinABC): - async def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_two(self, **kwargs: Any) -> None: """renamed_two. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -219,14 +218,14 @@ async def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_four(self, **kwargs: Any) -> None: """renamed_four. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -263,14 +262,14 @@ async def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_six(self, **kwargs: Any) -> None: """renamed_six. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/aio/_vendor.py index df677d3ff55..4ba07260e00 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-multiclient/client/structure/multiclient/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ClientAClientConfiguration, ClientBClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_configuration.py b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_configuration.py index a5b61037cf0..74318519288 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class RenamedOperationClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RenamedOperationClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RenamedOperationClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_serialization.py b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_vendor.py b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_vendor.py index f3625a2d6b6..4720f15b514 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RenamedOperationClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_configuration.py index 72e1846557a..5e220a0e2ba 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class RenamedOperationClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RenamedOperationClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RenamedOperationClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_vendor.py index 008af518305..24c92933aea 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RenamedOperationClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py index 0788a7bdb5e..fbb4d9e0187 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,14 +54,14 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_two(self, **kwargs: Any) -> None: """renamed_two. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,14 +98,14 @@ async def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_four(self, **kwargs: Any) -> None: """renamed_four. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -143,14 +142,14 @@ async def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_six(self, **kwargs: Any) -> None: """renamed_six. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -190,14 +189,14 @@ async def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsist class RenamedOperationClientOperationsMixin(RenamedOperationClientMixinABC): - async def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_one(self, **kwargs: Any) -> None: """renamed_one. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -234,14 +233,14 @@ async def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_three(self, **kwargs: Any) -> None: """renamed_three. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -278,14 +277,14 @@ async def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsi if cls: return cls(pipeline_response, None, {}) # type: ignore - async def renamed_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def renamed_five(self, **kwargs: Any) -> None: """renamed_five. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py index 28a30a21010..65feaea2155 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +99,7 @@ def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -144,7 +143,7 @@ def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -188,7 +187,7 @@ def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -235,7 +234,7 @@ def renamed_one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -279,7 +278,7 @@ def renamed_three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -323,7 +322,7 @@ def renamed_five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_configuration.py b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_configuration.py index 4b58a23bfac..2171a5ade41 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class TwoOperationGroupClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TwoOperationGroupClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TwoOperationGroupClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_serialization.py b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_configuration.py index 83283c74e72..f59b91a1dc6 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class TwoOperationGroupClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TwoOperationGroupClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TwoOperationGroupClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py index 2ffa145d819..e0bbbc02b58 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,14 +53,14 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def one(self, **kwargs: Any) -> None: """one. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -98,14 +97,14 @@ async def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu if cls: return cls(pipeline_response, None, {}) # type: ignore - async def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def three(self, **kwargs: Any) -> None: """three. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -142,14 +141,14 @@ async def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re if cls: return cls(pipeline_response, None, {}) # type: ignore - async def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def four(self, **kwargs: Any) -> None: """four. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -204,14 +203,14 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def two(self, **kwargs: Any) -> None: """two. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -248,14 +247,14 @@ async def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu if cls: return cls(pipeline_response, None, {}) # type: ignore - async def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def five(self, **kwargs: Any) -> None: """five. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -292,14 +291,14 @@ async def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret if cls: return cls(pipeline_response, None, {}) # type: ignore - async def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def six(self, **kwargs: Any) -> None: """six. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py index 34da027dc9e..29d526a1865 100644 --- a/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -25,7 +24,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -99,7 +98,7 @@ def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -143,7 +142,7 @@ def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -187,7 +186,7 @@ def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -249,7 +248,7 @@ def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -293,7 +292,7 @@ def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -337,7 +336,7 @@ def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_model_base.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_serialization.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/aio/operations/_operations.py index 0b34716b1b9..bde87995574 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -55,7 +55,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -78,7 +78,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def default(self, *, value: bytes, **kwargs: Any) -> None: """default. :keyword value: Required. @@ -87,7 +87,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -124,7 +124,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disa if cls: return cls(pipeline_response, None, {}) # type: ignore - async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def base64(self, *, value: bytes, **kwargs: Any) -> None: """base64. :keyword value: Required. @@ -133,7 +133,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -170,9 +170,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def base64_url( # pylint: disable=inconsistent-return-statements - self, *, value: bytes, **kwargs: Any - ) -> None: + async def base64_url(self, *, value: bytes, **kwargs: Any) -> None: """base64_url. :keyword value: Required. @@ -181,7 +179,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -218,9 +216,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def base64_url_array( # pylint: disable=inconsistent-return-statements - self, *, value: List[bytes], **kwargs: Any - ) -> None: + async def base64_url_array(self, *, value: List[bytes], **kwargs: Any) -> None: """base64_url_array. :keyword value: Required. @@ -229,7 +225,7 @@ async def base64_url_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -343,7 +339,7 @@ async def default( :rtype: ~encode.bytes.models.DefaultBytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -460,7 +456,7 @@ async def base64( :rtype: ~encode.bytes.models.Base64BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -577,7 +573,7 @@ async def base64_url( :rtype: ~encode.bytes.models.Base64urlBytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -699,7 +695,7 @@ async def base64_url_array( :rtype: ~encode.bytes.models.Base64urlArrayBytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -775,7 +771,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def default(self, *, value: bytes, **kwargs: Any) -> None: """default. :keyword value: Required. @@ -784,7 +780,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -821,7 +817,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disa if cls: return cls(pipeline_response, None, {}) # type: ignore - async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def base64(self, *, value: bytes, **kwargs: Any) -> None: """base64. :keyword value: Required. @@ -830,7 +826,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -867,9 +863,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def base64_url( # pylint: disable=inconsistent-return-statements - self, *, value: bytes, **kwargs: Any - ) -> None: + async def base64_url(self, *, value: bytes, **kwargs: Any) -> None: """base64_url. :keyword value: Required. @@ -878,7 +872,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -915,9 +909,7 @@ async def base64_url( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def base64_url_array( # pylint: disable=inconsistent-return-statements - self, *, value: List[bytes], **kwargs: Any - ) -> None: + async def base64_url_array(self, *, value: List[bytes], **kwargs: Any) -> None: """base64_url_array. :keyword value: Required. @@ -926,7 +918,7 @@ async def base64_url_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -981,7 +973,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def default(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def default(self, value: bytes, **kwargs: Any) -> None: """default. :param value: Required. @@ -990,7 +982,7 @@ async def default(self, value: bytes, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1031,7 +1023,7 @@ async def default(self, value: bytes, **kwargs: Any) -> None: # pylint: disable if cls: return cls(pipeline_response, None, {}) # type: ignore - async def octet_stream(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def octet_stream(self, value: bytes, **kwargs: Any) -> None: """octet_stream. :param value: Required. @@ -1040,7 +1032,7 @@ async def octet_stream(self, value: bytes, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1081,9 +1073,7 @@ async def octet_stream(self, value: bytes, **kwargs: Any) -> None: # pylint: di if cls: return cls(pipeline_response, None, {}) # type: ignore - async def custom_content_type( # pylint: disable=inconsistent-return-statements - self, value: bytes, **kwargs: Any - ) -> None: + async def custom_content_type(self, value: bytes, **kwargs: Any) -> None: """custom_content_type. :param value: Required. @@ -1092,7 +1082,7 @@ async def custom_content_type( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1133,7 +1123,7 @@ async def custom_content_type( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def base64(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def base64(self, value: bytes, **kwargs: Any) -> None: """base64. :param value: Required. @@ -1142,7 +1132,7 @@ async def base64(self, value: bytes, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1183,7 +1173,7 @@ async def base64(self, value: bytes, **kwargs: Any) -> None: # pylint: disable= if cls: return cls(pipeline_response, None, {}) # type: ignore - async def base64_url(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def base64_url(self, value: bytes, **kwargs: Any) -> None: """base64_url. :param value: Required. @@ -1192,7 +1182,7 @@ async def base64_url(self, value: bytes, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1258,7 +1248,7 @@ async def default(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1313,7 +1303,7 @@ async def octet_stream(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1368,7 +1358,7 @@ async def custom_content_type(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1423,7 +1413,7 @@ async def base64(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1478,7 +1468,7 @@ async def base64_url(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/models/_models.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/models/_models.py index f8345fed9d9..6751b0d9b5e 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/operations/_operations.py index 650f9d2da98..5f54a8ee9f5 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Iterator, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -366,7 +366,7 @@ def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -412,7 +412,7 @@ def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -458,7 +458,7 @@ def base64_url(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -506,7 +506,7 @@ def base64_url_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -620,7 +620,7 @@ def default( :rtype: ~encode.bytes.models.DefaultBytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -737,7 +737,7 @@ def base64( :rtype: ~encode.bytes.models.Base64BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,7 +854,7 @@ def base64_url( :rtype: ~encode.bytes.models.Base64urlBytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -976,7 +976,7 @@ def base64_url_array( :rtype: ~encode.bytes.models.Base64urlArrayBytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1061,7 +1061,7 @@ def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1107,7 +1107,7 @@ def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1153,7 +1153,7 @@ def base64_url(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1201,7 +1201,7 @@ def base64_url_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1265,7 +1265,7 @@ def default(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1315,7 +1315,7 @@ def octet_stream(self, value: bytes, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1367,7 +1367,7 @@ def custom_content_type( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1417,7 +1417,7 @@ def base64(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1467,7 +1467,7 @@ def base64_url(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1533,7 +1533,7 @@ def default(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1588,7 +1588,7 @@ def octet_stream(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1643,7 +1643,7 @@ def custom_content_type(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1698,7 +1698,7 @@ def base64(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1753,7 +1753,7 @@ def base64_url(self, **kwargs: Any) -> bytes: :rtype: bytes :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_model_base.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_serialization.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/aio/operations/_operations.py index d467574f5b8..e9c8cb0c37d 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -53,7 +53,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -76,9 +76,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def default( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def default(self, *, value: datetime.datetime, **kwargs: Any) -> None: """default. :keyword value: Required. @@ -87,7 +85,7 @@ async def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -124,9 +122,7 @@ async def default( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def rfc3339( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def rfc3339(self, *, value: datetime.datetime, **kwargs: Any) -> None: """rfc3339. :keyword value: Required. @@ -135,7 +131,7 @@ async def rfc3339( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -172,9 +168,7 @@ async def rfc3339( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def rfc7231( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def rfc7231(self, *, value: datetime.datetime, **kwargs: Any) -> None: """rfc7231. :keyword value: Required. @@ -183,7 +177,7 @@ async def rfc7231( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -220,9 +214,7 @@ async def rfc7231( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def unix_timestamp( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def unix_timestamp(self, *, value: datetime.datetime, **kwargs: Any) -> None: """unix_timestamp. :keyword value: Required. @@ -231,7 +223,7 @@ async def unix_timestamp( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,9 +260,7 @@ async def unix_timestamp( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def unix_timestamp_array( # pylint: disable=inconsistent-return-statements - self, *, value: List[datetime.datetime], **kwargs: Any - ) -> None: + async def unix_timestamp_array(self, *, value: List[datetime.datetime], **kwargs: Any) -> None: """unix_timestamp_array. :keyword value: Required. @@ -279,7 +269,7 @@ async def unix_timestamp_array( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -393,7 +383,7 @@ async def default( :rtype: ~encode.datetime.models.DefaultDatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -510,7 +500,7 @@ async def rfc3339( :rtype: ~encode.datetime.models.Rfc3339DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -627,7 +617,7 @@ async def rfc7231( :rtype: ~encode.datetime.models.Rfc7231DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -749,7 +739,7 @@ async def unix_timestamp( :rtype: ~encode.datetime.models.UnixTimestampDatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -871,7 +861,7 @@ async def unix_timestamp_array( :rtype: ~encode.datetime.models.UnixTimestampArrayDatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -947,9 +937,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def default( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def default(self, *, value: datetime.datetime, **kwargs: Any) -> None: """default. :keyword value: Required. @@ -958,7 +946,7 @@ async def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,9 +983,7 @@ async def default( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def rfc3339( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def rfc3339(self, *, value: datetime.datetime, **kwargs: Any) -> None: """rfc3339. :keyword value: Required. @@ -1006,7 +992,7 @@ async def rfc3339( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1043,9 +1029,7 @@ async def rfc3339( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def rfc7231( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def rfc7231(self, *, value: datetime.datetime, **kwargs: Any) -> None: """rfc7231. :keyword value: Required. @@ -1054,7 +1038,7 @@ async def rfc7231( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1091,9 +1075,7 @@ async def rfc7231( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def unix_timestamp( # pylint: disable=inconsistent-return-statements - self, *, value: datetime.datetime, **kwargs: Any - ) -> None: + async def unix_timestamp(self, *, value: datetime.datetime, **kwargs: Any) -> None: """unix_timestamp. :keyword value: Required. @@ -1102,7 +1084,7 @@ async def unix_timestamp( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1139,9 +1121,7 @@ async def unix_timestamp( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def unix_timestamp_array( # pylint: disable=inconsistent-return-statements - self, *, value: List[datetime.datetime], **kwargs: Any - ) -> None: + async def unix_timestamp_array(self, *, value: List[datetime.datetime], **kwargs: Any) -> None: """unix_timestamp_array. :keyword value: Required. @@ -1150,7 +1130,7 @@ async def unix_timestamp_array( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1205,14 +1185,14 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def default(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def default(self, **kwargs: Any) -> None: """default. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1251,14 +1231,14 @@ async def default(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- if cls: return cls(pipeline_response, None, response_headers) # type: ignore - async def rfc3339(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def rfc3339(self, **kwargs: Any) -> None: """rfc3339. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1297,14 +1277,14 @@ async def rfc3339(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- if cls: return cls(pipeline_response, None, response_headers) # type: ignore - async def rfc7231(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def rfc7231(self, **kwargs: Any) -> None: """rfc7231. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1343,14 +1323,14 @@ async def rfc7231(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- if cls: return cls(pipeline_response, None, response_headers) # type: ignore - async def unix_timestamp(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def unix_timestamp(self, **kwargs: Any) -> None: """unix_timestamp. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/models/_models.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/models/_models.py index b17a3520821..f76f462b9d1 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/operations/_operations.py index ccc0746b45e..d6bd9475f3e 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -305,7 +305,7 @@ def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -353,7 +353,7 @@ def rfc3339( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -401,7 +401,7 @@ def rfc7231( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -449,7 +449,7 @@ def unix_timestamp( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -497,7 +497,7 @@ def unix_timestamp_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -611,7 +611,7 @@ def default( :rtype: ~encode.datetime.models.DefaultDatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -728,7 +728,7 @@ def rfc3339( :rtype: ~encode.datetime.models.Rfc3339DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -845,7 +845,7 @@ def rfc7231( :rtype: ~encode.datetime.models.Rfc7231DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -967,7 +967,7 @@ def unix_timestamp( :rtype: ~encode.datetime.models.UnixTimestampDatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1089,7 +1089,7 @@ def unix_timestamp_array( :rtype: ~encode.datetime.models.UnixTimestampArrayDatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1176,7 +1176,7 @@ def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1224,7 +1224,7 @@ def rfc3339( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1272,7 +1272,7 @@ def rfc7231( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1320,7 +1320,7 @@ def unix_timestamp( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1368,7 +1368,7 @@ def unix_timestamp_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1430,7 +1430,7 @@ def default(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1476,7 +1476,7 @@ def rfc3339(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1522,7 +1522,7 @@ def rfc7231(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1568,7 +1568,7 @@ def unix_timestamp(self, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_model_base.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_serialization.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/aio/operations/_operations.py index b55538bbbd2..66a3e1b43b7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -52,7 +52,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -75,9 +75,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def default( # pylint: disable=inconsistent-return-statements - self, *, input: datetime.timedelta, **kwargs: Any - ) -> None: + async def default(self, *, input: datetime.timedelta, **kwargs: Any) -> None: """default. :keyword input: Required. @@ -86,7 +84,7 @@ async def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,9 +121,7 @@ async def default( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def iso8601( # pylint: disable=inconsistent-return-statements - self, *, input: datetime.timedelta, **kwargs: Any - ) -> None: + async def iso8601(self, *, input: datetime.timedelta, **kwargs: Any) -> None: """iso8601. :keyword input: Required. @@ -134,7 +130,7 @@ async def iso8601( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -171,9 +167,7 @@ async def iso8601( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def int32_seconds( # pylint: disable=inconsistent-return-statements - self, *, input: int, **kwargs: Any - ) -> None: + async def int32_seconds(self, *, input: int, **kwargs: Any) -> None: """int32_seconds. :keyword input: Required. @@ -182,7 +176,7 @@ async def int32_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -219,9 +213,7 @@ async def int32_seconds( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def float_seconds( # pylint: disable=inconsistent-return-statements - self, *, input: float, **kwargs: Any - ) -> None: + async def float_seconds(self, *, input: float, **kwargs: Any) -> None: """float_seconds. :keyword input: Required. @@ -230,7 +222,7 @@ async def float_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,9 +259,7 @@ async def float_seconds( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def float64_seconds( # pylint: disable=inconsistent-return-statements - self, *, input: float, **kwargs: Any - ) -> None: + async def float64_seconds(self, *, input: float, **kwargs: Any) -> None: """float64_seconds. :keyword input: Required. @@ -278,7 +268,7 @@ async def float64_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -315,9 +305,7 @@ async def float64_seconds( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def int32_seconds_array( # pylint: disable=inconsistent-return-statements - self, *, input: List[int], **kwargs: Any - ) -> None: + async def int32_seconds_array(self, *, input: List[int], **kwargs: Any) -> None: """int32_seconds_array. :keyword input: Required. @@ -326,7 +314,7 @@ async def int32_seconds_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -440,7 +428,7 @@ async def default( :rtype: ~encode.duration.models.DefaultDurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -557,7 +545,7 @@ async def iso8601( :rtype: ~encode.duration.models.ISO8601DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -679,7 +667,7 @@ async def int32_seconds( :rtype: ~encode.duration.models.Int32SecondsDurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -801,7 +789,7 @@ async def float_seconds( :rtype: ~encode.duration.models.FloatSecondsDurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -923,7 +911,7 @@ async def float64_seconds( :rtype: ~encode.duration.models.Float64SecondsDurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1045,7 +1033,7 @@ async def float_seconds_array( :rtype: ~encode.duration.models.FloatSecondsDurationArrayProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1121,9 +1109,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def default( # pylint: disable=inconsistent-return-statements - self, *, duration: datetime.timedelta, **kwargs: Any - ) -> None: + async def default(self, *, duration: datetime.timedelta, **kwargs: Any) -> None: """default. :keyword duration: Required. @@ -1132,7 +1118,7 @@ async def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1169,9 +1155,7 @@ async def default( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def iso8601( # pylint: disable=inconsistent-return-statements - self, *, duration: datetime.timedelta, **kwargs: Any - ) -> None: + async def iso8601(self, *, duration: datetime.timedelta, **kwargs: Any) -> None: """iso8601. :keyword duration: Required. @@ -1180,7 +1164,7 @@ async def iso8601( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1217,9 +1201,7 @@ async def iso8601( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def iso8601_array( # pylint: disable=inconsistent-return-statements - self, *, duration: List[datetime.timedelta], **kwargs: Any - ) -> None: + async def iso8601_array(self, *, duration: List[datetime.timedelta], **kwargs: Any) -> None: """iso8601_array. :keyword duration: Required. @@ -1228,7 +1210,7 @@ async def iso8601_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1265,9 +1247,7 @@ async def iso8601_array( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def int32_seconds( # pylint: disable=inconsistent-return-statements - self, *, duration: int, **kwargs: Any - ) -> None: + async def int32_seconds(self, *, duration: int, **kwargs: Any) -> None: """int32_seconds. :keyword duration: Required. @@ -1276,7 +1256,7 @@ async def int32_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1313,9 +1293,7 @@ async def int32_seconds( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def float_seconds( # pylint: disable=inconsistent-return-statements - self, *, duration: float, **kwargs: Any - ) -> None: + async def float_seconds(self, *, duration: float, **kwargs: Any) -> None: """float_seconds. :keyword duration: Required. @@ -1324,7 +1302,7 @@ async def float_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1361,9 +1339,7 @@ async def float_seconds( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def float64_seconds( # pylint: disable=inconsistent-return-statements - self, *, duration: float, **kwargs: Any - ) -> None: + async def float64_seconds(self, *, duration: float, **kwargs: Any) -> None: """float64_seconds. :keyword duration: Required. @@ -1372,7 +1348,7 @@ async def float64_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/models/_models.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/models/_models.py index 2631294deee..bb140be7ec6 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/operations/_operations.py index 4f3136d2490..3ee9c4b5225 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -316,7 +316,7 @@ def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -364,7 +364,7 @@ def iso8601( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -410,7 +410,7 @@ def int32_seconds(self, *, input: int, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -456,7 +456,7 @@ def float_seconds(self, *, input: float, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -502,7 +502,7 @@ def float64_seconds(self, *, input: float, **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -550,7 +550,7 @@ def int32_seconds_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -664,7 +664,7 @@ def default( :rtype: ~encode.duration.models.DefaultDurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -781,7 +781,7 @@ def iso8601( :rtype: ~encode.duration.models.ISO8601DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -903,7 +903,7 @@ def int32_seconds( :rtype: ~encode.duration.models.Int32SecondsDurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1025,7 +1025,7 @@ def float_seconds( :rtype: ~encode.duration.models.FloatSecondsDurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1147,7 +1147,7 @@ def float64_seconds( :rtype: ~encode.duration.models.Float64SecondsDurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1269,7 +1269,7 @@ def float_seconds_array( :rtype: ~encode.duration.models.FloatSecondsDurationArrayProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1356,7 +1356,7 @@ def default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1404,7 +1404,7 @@ def iso8601( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1452,7 +1452,7 @@ def iso8601_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1498,7 +1498,7 @@ def int32_seconds(self, *, duration: int, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1546,7 +1546,7 @@ def float_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1594,7 +1594,7 @@ def float64_seconds( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_model_base.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_serialization.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/aio/operations/_operations.py index 62fb99432a0..a7d12fc5fad 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -118,7 +117,7 @@ async def safeint_as_string( :rtype: ~encode.numeric.models.SafeintAsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -235,7 +234,7 @@ async def uint32_as_string_optional( :rtype: ~encode.numeric.models.Uint32AsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,7 +351,7 @@ async def uint8_as_string( :rtype: ~encode.numeric.models.Uint8AsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/models/_models.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/models/_models.py index 6a1fdd2bcde..1aca6f48cb8 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/operations/_operations.py index 043d102a68e..8da611d073b 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -168,7 +167,7 @@ def safeint_as_string( :rtype: ~encode.numeric.models.SafeintAsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -285,7 +284,7 @@ def uint32_as_string_optional( :rtype: ~encode.numeric.models.Uint32AsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -402,7 +401,7 @@ def uint8_as_string( :rtype: ~encode.numeric.models.Uint8AsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_configuration.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_configuration.py index d92a4f989a8..cae78b006c4 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_operations/_operations.py index 34f2b5b0ab1..506ec7899e6 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -207,7 +206,7 @@ def get_model( :rtype: ~headasbooleanfalse.models.VisibilityModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +265,7 @@ def get_model( return deserialized # type: ignore @overload - def head_model( # pylint: disable=inconsistent-return-statements + def head_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """head_model. @@ -282,9 +281,7 @@ def head_model( # pylint: disable=inconsistent-return-statements """ @overload - def head_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def head_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """head_model. :param input: Required. @@ -298,9 +295,7 @@ def head_model( # pylint: disable=inconsistent-return-statements """ @overload - def head_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def head_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """head_model. :param input: Required. @@ -324,7 +319,7 @@ def head_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -371,7 +366,7 @@ def head_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_model( # pylint: disable=inconsistent-return-statements + def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -387,9 +382,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -403,9 +396,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -429,7 +420,7 @@ def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -476,7 +467,7 @@ def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_model( # pylint: disable=inconsistent-return-statements + def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -492,9 +483,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -508,9 +497,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -534,7 +521,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -581,7 +568,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def post_model( # pylint: disable=inconsistent-return-statements + def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -597,9 +584,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -613,9 +598,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -639,7 +622,7 @@ def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -686,7 +669,7 @@ def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def delete_model( # pylint: disable=inconsistent-return-statements + def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -702,9 +685,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -718,9 +699,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -744,7 +723,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -849,7 +828,7 @@ def put_read_only_model( :rtype: ~headasbooleanfalse.models.ReadOnlyModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_serialization.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_vendor.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_vendor.py index 9580c4fd83c..2199f704036 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_configuration.py index 553e7e040a0..99f694562a7 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/_operations.py index e69cca6435b..5bd571e7fe2 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -41,7 +40,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -108,7 +107,7 @@ async def get_model( :rtype: ~headasbooleanfalse.models.VisibilityModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -167,7 +166,7 @@ async def get_model( return deserialized # type: ignore @overload - async def head_model( # pylint: disable=inconsistent-return-statements + async def head_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """head_model. @@ -183,9 +182,7 @@ async def head_model( # pylint: disable=inconsistent-return-statements """ @overload - async def head_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def head_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """head_model. :param input: Required. @@ -199,9 +196,7 @@ async def head_model( # pylint: disable=inconsistent-return-statements """ @overload - async def head_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def head_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """head_model. :param input: Required. @@ -214,9 +209,7 @@ async def head_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def head_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """head_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -225,7 +218,7 @@ async def head_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -272,7 +265,7 @@ async def head_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_model( # pylint: disable=inconsistent-return-statements + async def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -288,9 +281,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -304,9 +295,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -319,9 +308,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """put_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -330,7 +317,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -377,7 +364,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_model( # pylint: disable=inconsistent-return-statements + async def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -393,9 +380,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -409,9 +394,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -424,9 +407,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """patch_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -435,7 +416,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,7 +463,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_model( # pylint: disable=inconsistent-return-statements + async def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -498,9 +479,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -514,9 +493,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -529,9 +506,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """post_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -540,7 +515,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -587,7 +562,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def delete_model( # pylint: disable=inconsistent-return-statements + async def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -603,9 +578,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -619,9 +592,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -634,9 +605,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def delete_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """delete_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -645,7 +614,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -750,7 +719,7 @@ async def put_read_only_model( :rtype: ~headasbooleanfalse.models.ReadOnlyModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_vendor.py index cda31dbee44..3c4774dc815 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/models/_models.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/models/_models.py index fd597699495..3a3fc57c5ee 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_configuration.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_configuration.py index 444654d8b19..d420d8e5772 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_model_base.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_operations/_operations.py index b84bd6d5d02..0ca700ec4af 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -207,7 +206,7 @@ def get_model( :rtype: ~headasbooleantrue.models.VisibilityModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -318,7 +317,7 @@ def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **k :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -366,7 +365,7 @@ def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **k return 200 <= response.status_code <= 299 @overload - def put_model( # pylint: disable=inconsistent-return-statements + def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -382,9 +381,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -398,9 +395,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -424,7 +419,7 @@ def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -471,7 +466,7 @@ def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_model( # pylint: disable=inconsistent-return-statements + def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -487,9 +482,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -503,9 +496,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -529,7 +520,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -576,7 +567,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def post_model( # pylint: disable=inconsistent-return-statements + def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -592,9 +583,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -608,9 +597,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -634,7 +621,7 @@ def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -681,7 +668,7 @@ def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def delete_model( # pylint: disable=inconsistent-return-statements + def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -697,9 +684,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -713,9 +698,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -739,7 +722,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -844,7 +827,7 @@ def put_read_only_model( :rtype: ~headasbooleantrue.models.ReadOnlyModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_serialization.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_vendor.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_vendor.py index 9580c4fd83c..2199f704036 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_configuration.py index 17bcfe3fed4..703ffaebdaa 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_operations/_operations.py index f411447db7f..17936bee3f4 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -41,7 +40,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -108,7 +107,7 @@ async def get_model( :rtype: ~headasbooleantrue.models.VisibilityModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -219,7 +218,7 @@ async def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes] :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +266,7 @@ async def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes] return 200 <= response.status_code <= 299 @overload - async def put_model( # pylint: disable=inconsistent-return-statements + async def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -283,9 +282,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -299,9 +296,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -314,9 +309,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """put_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -325,7 +318,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -372,7 +365,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_model( # pylint: disable=inconsistent-return-statements + async def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -388,9 +381,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -404,9 +395,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -419,9 +408,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """patch_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -430,7 +417,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -477,7 +464,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_model( # pylint: disable=inconsistent-return-statements + async def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -493,9 +480,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -509,9 +494,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -524,9 +507,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """post_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -535,7 +516,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -582,7 +563,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def delete_model( # pylint: disable=inconsistent-return-statements + async def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -598,9 +579,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -614,9 +593,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -629,9 +606,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def delete_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """delete_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -640,7 +615,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -745,7 +720,7 @@ async def put_read_only_model( :rtype: ~headasbooleantrue.models.ReadOnlyModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_vendor.py index cda31dbee44..3c4774dc815 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/models/_models.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/models/_models.py index fd597699495..3a3fc57c5ee 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_model_base.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_serialization.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/aio/operations/_operations.py index 0335f3189ac..76d0d1810e1 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,9 +54,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, body: _models.User, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, body: _models.User, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -71,9 +68,7 @@ async def simple( # pylint: disable=inconsistent-return-statements """ @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -87,9 +82,7 @@ async def simple( # pylint: disable=inconsistent-return-statements """ @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -102,9 +95,7 @@ async def simple( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def simple( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.User, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def simple(self, body: Union[_models.User, JSON, IO[bytes]], **kwargs: Any) -> None: """simple. :param body: Is one of the following types: User, JSON, IO[bytes] Required. @@ -113,7 +104,7 @@ async def simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -178,9 +169,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -194,9 +183,7 @@ async def simple( # pylint: disable=inconsistent-return-statements """ @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :keyword name: Required. @@ -210,9 +197,7 @@ async def simple( # pylint: disable=inconsistent-return-statements """ @overload - async def simple( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def simple(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -225,9 +210,7 @@ async def simple( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def simple( # pylint: disable=inconsistent-return-statements - self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, **kwargs: Any - ) -> None: + async def simple(self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, **kwargs: Any) -> None: """simple. :param body: Is either a JSON type or a IO[bytes] type. Required. @@ -238,7 +221,7 @@ async def simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/models/_models.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/models/_models.py index 0d1d46d3833..9dfbf54c8e9 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/operations/_operations.py index 72e16523d66..5457abcb53a 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -86,9 +85,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def simple( # pylint: disable=inconsistent-return-statements - self, body: _models.User, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, body: _models.User, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -102,9 +99,7 @@ def simple( # pylint: disable=inconsistent-return-statements """ @overload - def simple( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -118,9 +113,7 @@ def simple( # pylint: disable=inconsistent-return-statements """ @overload - def simple( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -144,7 +137,7 @@ def simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -209,9 +202,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def simple( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -225,9 +216,7 @@ def simple( # pylint: disable=inconsistent-return-statements """ @overload - def simple( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :keyword name: Required. @@ -241,9 +230,7 @@ def simple( # pylint: disable=inconsistent-return-statements """ @overload - def simple( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def simple(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """simple. :param body: Required. @@ -269,7 +256,7 @@ def simple( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_configuration.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_configuration.py index 62708696ca3..8a3c7c5c376 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class BodyOptionalityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class BodyOptionalityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for BodyOptionalityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_serialization.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_vendor.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_vendor.py index f8c29724cec..0291c6c9cc3 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import BodyOptionalityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_configuration.py index 1627d3722d2..821985c7efe 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class BodyOptionalityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class BodyOptionalityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for BodyOptionalityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_vendor.py index 99f2ab9b9c3..7dbaaea786c 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import BodyOptionalityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/operations/_operations.py index 6959dcaf20e..e9002747284 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +60,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def set( # pylint: disable=inconsistent-return-statements + async def set( self, body: Optional[_models.BodyModel] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """set. @@ -77,9 +76,7 @@ async def set( # pylint: disable=inconsistent-return-statements """ @overload - async def set( # pylint: disable=inconsistent-return-statements - self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def set(self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """set. :param body: Default value is None. @@ -93,7 +90,7 @@ async def set( # pylint: disable=inconsistent-return-statements """ @overload - async def set( # pylint: disable=inconsistent-return-statements + async def set( self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """set. @@ -108,9 +105,7 @@ async def set( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def set( # pylint: disable=inconsistent-return-statements - self, body: Optional[Union[_models.BodyModel, JSON, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def set(self, body: Optional[Union[_models.BodyModel, JSON, IO[bytes]]] = None, **kwargs: Any) -> None: """set. :param body: Is one of the following types: BodyModel, JSON, IO[bytes] Default value is None. @@ -119,7 +114,7 @@ async def set( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -169,7 +164,7 @@ async def set( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def omit( # pylint: disable=inconsistent-return-statements + async def omit( self, body: Optional[_models.BodyModel] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """omit. @@ -185,9 +180,7 @@ async def omit( # pylint: disable=inconsistent-return-statements """ @overload - async def omit( # pylint: disable=inconsistent-return-statements - self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def omit(self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """omit. :param body: Default value is None. @@ -201,7 +194,7 @@ async def omit( # pylint: disable=inconsistent-return-statements """ @overload - async def omit( # pylint: disable=inconsistent-return-statements + async def omit( self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """omit. @@ -216,9 +209,7 @@ async def omit( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def omit( # pylint: disable=inconsistent-return-statements - self, body: Optional[Union[_models.BodyModel, JSON, IO[bytes]]] = None, **kwargs: Any - ) -> None: + async def omit(self, body: Optional[Union[_models.BodyModel, JSON, IO[bytes]]] = None, **kwargs: Any) -> None: """omit. :param body: Is one of the following types: BodyModel, JSON, IO[bytes] Default value is None. @@ -227,7 +218,7 @@ async def omit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -280,7 +271,7 @@ async def omit( # pylint: disable=inconsistent-return-statements class BodyOptionalityClientOperationsMixin(BodyOptionalityClientMixinABC): @overload - async def required_explicit( # pylint: disable=inconsistent-return-statements + async def required_explicit( self, body: _models.BodyModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """required_explicit. @@ -296,9 +287,7 @@ async def required_explicit( # pylint: disable=inconsistent-return-statements """ @overload - async def required_explicit( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def required_explicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """required_explicit. :param body: Required. @@ -312,7 +301,7 @@ async def required_explicit( # pylint: disable=inconsistent-return-statements """ @overload - async def required_explicit( # pylint: disable=inconsistent-return-statements + async def required_explicit( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """required_explicit. @@ -327,9 +316,7 @@ async def required_explicit( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def required_explicit( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BodyModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def required_explicit(self, body: Union[_models.BodyModel, JSON, IO[bytes]], **kwargs: Any) -> None: """required_explicit. :param body: Is one of the following types: BodyModel, JSON, IO[bytes] Required. @@ -338,7 +325,7 @@ async def required_explicit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -385,9 +372,7 @@ async def required_explicit( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def required_implicit( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def required_implicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """required_implicit. :param body: Required. @@ -401,9 +386,7 @@ async def required_implicit( # pylint: disable=inconsistent-return-statements """ @overload - async def required_implicit( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def required_implicit(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """required_implicit. :keyword name: Required. @@ -417,7 +400,7 @@ async def required_implicit( # pylint: disable=inconsistent-return-statements """ @overload - async def required_implicit( # pylint: disable=inconsistent-return-statements + async def required_implicit( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """required_implicit. @@ -432,7 +415,7 @@ async def required_implicit( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def required_implicit( # pylint: disable=inconsistent-return-statements + async def required_implicit( self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, **kwargs: Any ) -> None: """required_implicit. @@ -445,7 +428,7 @@ async def required_implicit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/models/_models.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/models/_models.py index bf1906c55b6..a06475f18ff 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/operations/_operations.py index d9d9c45d8fb..b56df52b140 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -115,7 +114,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def set( # pylint: disable=inconsistent-return-statements + def set( self, body: Optional[_models.BodyModel] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """set. @@ -131,9 +130,7 @@ def set( # pylint: disable=inconsistent-return-statements """ @overload - def set( # pylint: disable=inconsistent-return-statements - self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def set(self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """set. :param body: Default value is None. @@ -147,9 +144,7 @@ def set( # pylint: disable=inconsistent-return-statements """ @overload - def set( # pylint: disable=inconsistent-return-statements - self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def set(self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """set. :param body: Default value is None. @@ -173,7 +168,7 @@ def set( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -223,7 +218,7 @@ def set( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def omit( # pylint: disable=inconsistent-return-statements + def omit( self, body: Optional[_models.BodyModel] = None, *, content_type: str = "application/json", **kwargs: Any ) -> None: """omit. @@ -239,9 +234,7 @@ def omit( # pylint: disable=inconsistent-return-statements """ @overload - def omit( # pylint: disable=inconsistent-return-statements - self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def omit(self, body: Optional[JSON] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """omit. :param body: Default value is None. @@ -255,9 +248,7 @@ def omit( # pylint: disable=inconsistent-return-statements """ @overload - def omit( # pylint: disable=inconsistent-return-statements - self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def omit(self, body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", **kwargs: Any) -> None: """omit. :param body: Default value is None. @@ -281,7 +272,7 @@ def omit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -334,7 +325,7 @@ def omit( # pylint: disable=inconsistent-return-statements class BodyOptionalityClientOperationsMixin(BodyOptionalityClientMixinABC): @overload - def required_explicit( # pylint: disable=inconsistent-return-statements + def required_explicit( self, body: _models.BodyModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """required_explicit. @@ -350,9 +341,7 @@ def required_explicit( # pylint: disable=inconsistent-return-statements """ @overload - def required_explicit( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def required_explicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """required_explicit. :param body: Required. @@ -366,9 +355,7 @@ def required_explicit( # pylint: disable=inconsistent-return-statements """ @overload - def required_explicit( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def required_explicit(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """required_explicit. :param body: Required. @@ -392,7 +379,7 @@ def required_explicit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -439,9 +426,7 @@ def required_explicit( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def required_implicit( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def required_implicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """required_implicit. :param body: Required. @@ -455,9 +440,7 @@ def required_implicit( # pylint: disable=inconsistent-return-statements """ @overload - def required_implicit( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + def required_implicit(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """required_implicit. :keyword name: Required. @@ -471,9 +454,7 @@ def required_implicit( # pylint: disable=inconsistent-return-statements """ @overload - def required_implicit( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def required_implicit(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """required_implicit. :param body: Required. @@ -499,7 +480,7 @@ def required_implicit( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_configuration.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_configuration.py index c910b72c667..d6da0ad47e5 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class CollectionFormatClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class CollectionFormatClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for CollectionFormatClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_model_base.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_serialization.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/_configuration.py index 2c2cefc029c..2ceb3d182cf 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class CollectionFormatClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class CollectionFormatClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for CollectionFormatClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/operations/_operations.py index 0fd1df9a27e..7508a660974 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,9 +53,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def multi( # pylint: disable=inconsistent-return-statements - self, *, colors: List[str], **kwargs: Any - ) -> None: + async def multi(self, *, colors: List[str], **kwargs: Any) -> None: """multi. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -65,7 +62,7 @@ async def multi( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -102,7 +99,7 @@ async def multi( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def ssv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def ssv(self, *, colors: List[str], **kwargs: Any) -> None: """ssv. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -111,7 +108,7 @@ async def ssv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -148,7 +145,7 @@ async def ssv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def tsv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def tsv(self, *, colors: List[str], **kwargs: Any) -> None: """tsv. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -157,7 +154,7 @@ async def tsv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -194,9 +191,7 @@ async def tsv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def pipes( # pylint: disable=inconsistent-return-statements - self, *, colors: List[str], **kwargs: Any - ) -> None: + async def pipes(self, *, colors: List[str], **kwargs: Any) -> None: """pipes. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -205,7 +200,7 @@ async def pipes( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -242,7 +237,7 @@ async def pipes( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def csv(self, *, colors: List[str], **kwargs: Any) -> None: """csv. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -251,7 +246,7 @@ async def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -306,7 +301,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def csv(self, *, colors: List[str], **kwargs: Any) -> None: """csv. :keyword colors: Possible values for colors are [blue,red,green]. Required. @@ -315,7 +310,7 @@ async def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/operations/_operations.py index 270608a012c..a9ba346cfd8 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -132,7 +131,7 @@ def multi(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -178,7 +177,7 @@ def ssv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -224,7 +223,7 @@ def tsv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,7 +269,7 @@ def pipes(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -316,7 +315,7 @@ def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -380,7 +379,7 @@ def csv(self, *, colors: List[str], **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_model_base.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_serialization.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/aio/operations/_operations.py index db0f0e5eb46..03b70746b73 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -41,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -66,7 +66,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_body. @@ -82,9 +82,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme """ @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def spread_as_request_body(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :keyword name: Required. @@ -98,7 +96,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme """ @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_body. @@ -113,7 +111,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme :raises ~corehttp.exceptions.HttpResponseError: """ - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, **kwargs: Any ) -> None: """spread_as_request_body. @@ -126,7 +124,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -178,7 +176,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_only_with_body( self, body: _models.BodyParameter, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -194,7 +192,7 @@ async def spread_composite_request_only_with_body( # pylint: disable=inconsiste """ @overload - async def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_only_with_body( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -210,7 +208,7 @@ async def spread_composite_request_only_with_body( # pylint: disable=inconsiste """ @overload - async def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_only_with_body( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -225,7 +223,7 @@ async def spread_composite_request_only_with_body( # pylint: disable=inconsiste :raises ~corehttp.exceptions.HttpResponseError: """ - async def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_only_with_body( self, body: Union[_models.BodyParameter, JSON, IO[bytes]], **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -236,7 +234,7 @@ async def spread_composite_request_only_with_body( # pylint: disable=inconsiste :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -282,9 +280,7 @@ async def spread_composite_request_only_with_body( # pylint: disable=inconsiste if cls: return cls(pipeline_response, None, {}) # type: ignore - async def spread_composite_request_without_body( # pylint: disable=inconsistent-return-statements - self, name: str, *, test_header: str, **kwargs: Any - ) -> None: + async def spread_composite_request_without_body(self, name: str, *, test_header: str, **kwargs: Any) -> None: """spread_composite_request_without_body. :param name: Required. @@ -295,7 +291,7 @@ async def spread_composite_request_without_body( # pylint: disable=inconsistent :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -334,7 +330,7 @@ async def spread_composite_request_without_body( # pylint: disable=inconsistent return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_composite_request( # pylint: disable=inconsistent-return-statements + async def spread_composite_request( self, name: str, body: _models.BodyParameter, @@ -360,7 +356,7 @@ async def spread_composite_request( # pylint: disable=inconsistent-return-state """ @overload - async def spread_composite_request( # pylint: disable=inconsistent-return-statements + async def spread_composite_request( self, name: str, body: JSON, *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request. @@ -380,7 +376,7 @@ async def spread_composite_request( # pylint: disable=inconsistent-return-state """ @overload - async def spread_composite_request( # pylint: disable=inconsistent-return-statements + async def spread_composite_request( self, name: str, body: IO[bytes], *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request. @@ -399,7 +395,7 @@ async def spread_composite_request( # pylint: disable=inconsistent-return-state :raises ~corehttp.exceptions.HttpResponseError: """ - async def spread_composite_request( # pylint: disable=inconsistent-return-statements + async def spread_composite_request( self, name: str, body: Union[_models.BodyParameter, JSON, IO[bytes]], *, test_header: str, **kwargs: Any ) -> None: """spread_composite_request. @@ -414,7 +410,7 @@ async def spread_composite_request( # pylint: disable=inconsistent-return-state :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -463,7 +459,7 @@ async def spread_composite_request( # pylint: disable=inconsistent-return-state return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_mix( self, name: str, body: JSON, *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -483,7 +479,7 @@ async def spread_composite_request_mix( # pylint: disable=inconsistent-return-s """ @overload - async def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_mix( self, name: str, *, test_header: str, prop: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -503,7 +499,7 @@ async def spread_composite_request_mix( # pylint: disable=inconsistent-return-s """ @overload - async def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_mix( self, name: str, body: IO[bytes], *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -522,7 +518,7 @@ async def spread_composite_request_mix( # pylint: disable=inconsistent-return-s :raises ~corehttp.exceptions.HttpResponseError: """ - async def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + async def spread_composite_request_mix( self, name: str, body: Union[JSON, IO[bytes]] = _Unset, *, test_header: str, prop: str = _Unset, **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -539,7 +535,7 @@ async def spread_composite_request_mix( # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -611,7 +607,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_body. @@ -627,9 +623,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme """ @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def spread_as_request_body(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :keyword name: Required. @@ -643,7 +637,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme """ @overload - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_body. @@ -658,7 +652,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme :raises ~corehttp.exceptions.HttpResponseError: """ - async def spread_as_request_body( # pylint: disable=inconsistent-return-statements + async def spread_as_request_body( self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Unset, **kwargs: Any ) -> None: """spread_as_request_body. @@ -671,7 +665,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -723,7 +717,7 @@ async def spread_as_request_body( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_model( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -743,7 +737,7 @@ async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-ret """ @overload - async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_model( self, id: str, *, x_ms_test_header: str, name: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -763,7 +757,7 @@ async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-ret """ @overload - async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_model( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -782,7 +776,7 @@ async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-ret :raises ~corehttp.exceptions.HttpResponseError: """ - async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_model( self, id: str, body: Union[JSON, IO[bytes]] = _Unset, @@ -805,7 +799,7 @@ async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-ret :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -859,7 +853,7 @@ async def spread_parameter_with_inner_model( # pylint: disable=inconsistent-ret return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + async def spread_as_request_parameter( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -879,7 +873,7 @@ async def spread_as_request_parameter( # pylint: disable=inconsistent-return-st """ @overload - async def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + async def spread_as_request_parameter( self, id: str, *, x_ms_test_header: str, name: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -899,7 +893,7 @@ async def spread_as_request_parameter( # pylint: disable=inconsistent-return-st """ @overload - async def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + async def spread_as_request_parameter( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -918,7 +912,7 @@ async def spread_as_request_parameter( # pylint: disable=inconsistent-return-st :raises ~corehttp.exceptions.HttpResponseError: """ - async def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + async def spread_as_request_parameter( self, id: str, body: Union[JSON, IO[bytes]] = _Unset, @@ -941,7 +935,7 @@ async def spread_as_request_parameter( # pylint: disable=inconsistent-return-st :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,7 +989,7 @@ async def spread_as_request_parameter( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + async def spread_with_multiple_parameters( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_with_multiple_parameters. @@ -1015,7 +1009,7 @@ async def spread_with_multiple_parameters( # pylint: disable=inconsistent-retur """ @overload - async def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + async def spread_with_multiple_parameters( self, id: str, *, @@ -1050,7 +1044,7 @@ async def spread_with_multiple_parameters( # pylint: disable=inconsistent-retur """ @overload - async def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + async def spread_with_multiple_parameters( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_with_multiple_parameters. @@ -1069,7 +1063,7 @@ async def spread_with_multiple_parameters( # pylint: disable=inconsistent-retur :raises ~corehttp.exceptions.HttpResponseError: """ - async def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + async def spread_with_multiple_parameters( self, id: str, body: Union[JSON, IO[bytes]] = _Unset, @@ -1101,7 +1095,7 @@ async def spread_with_multiple_parameters( # pylint: disable=inconsistent-retur :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1162,7 +1156,7 @@ async def spread_with_multiple_parameters( # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore @overload - async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_alias( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread an alias with contains another alias property as body. @@ -1182,7 +1176,7 @@ async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-ret """ @overload - async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_alias( self, id: str, *, @@ -1211,7 +1205,7 @@ async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-ret """ @overload - async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_alias( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread an alias with contains another alias property as body. @@ -1230,7 +1224,7 @@ async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-ret :raises ~corehttp.exceptions.HttpResponseError: """ - async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + async def spread_parameter_with_inner_alias( self, id: str, body: Union[JSON, IO[bytes]] = _Unset, @@ -1256,7 +1250,7 @@ async def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-ret :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/models/_models.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/models/_models.py index 8476c6628b2..ef2f3893495 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/operations/_operations.py index 651e00b3e64..8a318e0e927 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -30,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -253,9 +253,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :param body: Required. @@ -269,9 +267,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements """ @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :keyword name: Required. @@ -285,9 +281,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements """ @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :param body: Required. @@ -313,7 +307,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -365,7 +359,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + def spread_composite_request_only_with_body( self, body: _models.BodyParameter, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -381,7 +375,7 @@ def spread_composite_request_only_with_body( # pylint: disable=inconsistent-ret """ @overload - def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + def spread_composite_request_only_with_body( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -397,7 +391,7 @@ def spread_composite_request_only_with_body( # pylint: disable=inconsistent-ret """ @overload - def spread_composite_request_only_with_body( # pylint: disable=inconsistent-return-statements + def spread_composite_request_only_with_body( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_only_with_body. @@ -423,7 +417,7 @@ def spread_composite_request_only_with_body( # pylint: disable=inconsistent-ret :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,7 +476,7 @@ def spread_composite_request_without_body( # pylint: disable=inconsistent-retur :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -521,7 +515,7 @@ def spread_composite_request_without_body( # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_composite_request( # pylint: disable=inconsistent-return-statements + def spread_composite_request( self, name: str, body: _models.BodyParameter, @@ -547,7 +541,7 @@ def spread_composite_request( # pylint: disable=inconsistent-return-statements """ @overload - def spread_composite_request( # pylint: disable=inconsistent-return-statements + def spread_composite_request( self, name: str, body: JSON, *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request. @@ -567,7 +561,7 @@ def spread_composite_request( # pylint: disable=inconsistent-return-statements """ @overload - def spread_composite_request( # pylint: disable=inconsistent-return-statements + def spread_composite_request( self, name: str, body: IO[bytes], *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request. @@ -601,7 +595,7 @@ def spread_composite_request( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -650,7 +644,7 @@ def spread_composite_request( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + def spread_composite_request_mix( self, name: str, body: JSON, *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -670,7 +664,7 @@ def spread_composite_request_mix( # pylint: disable=inconsistent-return-stateme """ @overload - def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + def spread_composite_request_mix( self, name: str, *, test_header: str, prop: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -690,7 +684,7 @@ def spread_composite_request_mix( # pylint: disable=inconsistent-return-stateme """ @overload - def spread_composite_request_mix( # pylint: disable=inconsistent-return-statements + def spread_composite_request_mix( self, name: str, body: IO[bytes], *, test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_composite_request_mix. @@ -726,7 +720,7 @@ def spread_composite_request_mix( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -798,9 +792,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :param body: Required. @@ -814,9 +806,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements """ @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, *, name: str, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :keyword name: Required. @@ -830,9 +820,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements """ @overload - def spread_as_request_body( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def spread_as_request_body(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """spread_as_request_body. :param body: Required. @@ -858,7 +846,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -910,7 +898,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_model( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -930,7 +918,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st """ @overload - def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_model( self, id: str, *, x_ms_test_header: str, name: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -950,7 +938,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st """ @overload - def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_model( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_parameter_with_inner_model. @@ -992,7 +980,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1046,7 +1034,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + def spread_as_request_parameter( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -1066,7 +1054,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen """ @overload - def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + def spread_as_request_parameter( self, id: str, *, x_ms_test_header: str, name: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -1086,7 +1074,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen """ @overload - def spread_as_request_parameter( # pylint: disable=inconsistent-return-statements + def spread_as_request_parameter( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_as_request_parameter. @@ -1128,7 +1116,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1182,7 +1170,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + def spread_with_multiple_parameters( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_with_multiple_parameters. @@ -1202,7 +1190,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat """ @overload - def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + def spread_with_multiple_parameters( self, id: str, *, @@ -1237,7 +1225,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat """ @overload - def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-statements + def spread_with_multiple_parameters( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread_with_multiple_parameters. @@ -1288,7 +1276,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1349,7 +1337,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat return cls(pipeline_response, None, {}) # type: ignore @overload - def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_alias( self, id: str, body: JSON, *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread an alias with contains another alias property as body. @@ -1369,7 +1357,7 @@ def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-st """ @overload - def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_alias( self, id: str, *, @@ -1398,7 +1386,7 @@ def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-st """ @overload - def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-statements + def spread_parameter_with_inner_alias( self, id: str, body: IO[bytes], *, x_ms_test_header: str, content_type: str = "application/json", **kwargs: Any ) -> None: """spread an alias with contains another alias property as body. @@ -1443,7 +1431,7 @@ def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-st :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_configuration.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_configuration.py index 4d1e8665325..8f5fe178538 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ContentNegotiationClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ContentNegotiationClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ContentNegotiationClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_serialization.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/_configuration.py index 1a6934cf133..bcf4f805b26 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ContentNegotiationClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ContentNegotiationClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ContentNegotiationClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py index e4a33d029bb..2e81480cc92 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterator, Callable, Dict, Literal, Optional, Type, TypeVar +from typing import Any, AsyncIterator, Callable, Dict, Literal, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -64,7 +63,7 @@ async def get_avatar_as_png(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -121,7 +120,7 @@ async def get_avatar_as_jpeg(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -196,7 +195,7 @@ async def get_avatar_as_png(self, **kwargs: Any) -> AsyncIterator[bytes]: :rtype: AsyncIterator[bytes] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +252,7 @@ async def get_avatar_as_json(self, **kwargs: Any) -> _models.PngImageAsJson: :rtype: ~payload.contentnegotiation.models.PngImageAsJson :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py index ed763a479ca..e015c980622 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py index 0350068df2d..0567afc7880 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterator, Literal, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterator, Literal, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -114,7 +113,7 @@ def get_avatar_as_png(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -171,7 +170,7 @@ def get_avatar_as_jpeg(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -246,7 +245,7 @@ def get_avatar_as_png(self, **kwargs: Any) -> Iterator[bytes]: :rtype: Iterator[bytes] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,7 +302,7 @@ def get_avatar_as_json(self, **kwargs: Any) -> _models.PngImageAsJson: :rtype: ~payload.contentnegotiation.models.PngImageAsJson :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_configuration.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_configuration.py index a8318e50165..f0239139544 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class JsonMergePatchClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class JsonMergePatchClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for JsonMergePatchClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/_operations.py index 0f53cb1229e..8a54674eb3c 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -152,7 +151,7 @@ def create_resource(self, body: Union[_models.Resource, JSON, IO[bytes]], **kwar :rtype: ~payload.jsonmergepatch.models.Resource :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +266,7 @@ def update_resource(self, body: Union[_models.ResourcePatch, JSON, IO[bytes]], * :rtype: ~payload.jsonmergepatch.models.Resource :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -389,7 +388,7 @@ def update_optional_resource( :rtype: ~payload.jsonmergepatch.models.Resource :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_serialization.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_vendor.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_vendor.py index be7e9b0c89e..d9fab22ea4a 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import JsonMergePatchClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_configuration.py index 73d3cbbc3b1..5435104694f 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class JsonMergePatchClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class JsonMergePatchClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for JsonMergePatchClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/_operations.py index 671668a846b..e481c820306 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -102,7 +101,7 @@ async def create_resource(self, body: Union[_models.Resource, JSON, IO[bytes]], :rtype: ~payload.jsonmergepatch.models.Resource :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -219,7 +218,7 @@ async def update_resource( :rtype: ~payload.jsonmergepatch.models.Resource :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -341,7 +340,7 @@ async def update_optional_resource( :rtype: ~payload.jsonmergepatch.models.Resource :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_vendor.py index 0681677cafb..5f8892e2b7c 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import JsonMergePatchClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/models/_models.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/models/_models.py index d2fb7e8e693..ef1de2b070b 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_configuration.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_configuration.py index a12e8a2bd7e..b51df3f03bb 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class MediaTypeClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MediaTypeClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MediaTypeClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_serialization.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/_configuration.py index 2e3ce93771a..4700302b22e 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class MediaTypeClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MediaTypeClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MediaTypeClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/operations/_operations.py index fdb6e304ca9..2df8fc53060 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def send_as_text(self, text: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def send_as_text(self, text: str, **kwargs: Any) -> None: """send_as_text. :param text: Required. @@ -66,7 +65,7 @@ async def send_as_text(self, text: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -114,7 +113,7 @@ async def get_as_text(self, **kwargs: Any) -> str: :rtype: str :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,7 +164,7 @@ async def get_as_text(self, **kwargs: Any) -> str: return deserialized # type: ignore - async def send_as_json(self, text: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def send_as_json(self, text: str, **kwargs: Any) -> None: """send_as_json. :param text: Required. @@ -174,7 +173,7 @@ async def send_as_json(self, text: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -222,7 +221,7 @@ async def get_as_json(self, **kwargs: Any) -> str: :rtype: str :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/operations/_operations.py index cbd91fce1eb..326c742c489 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -118,7 +117,7 @@ def send_as_text(self, text: str, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -166,7 +165,7 @@ def get_as_text(self, **kwargs: Any) -> str: :rtype: str :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -226,7 +225,7 @@ def send_as_json(self, text: str, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -274,7 +273,7 @@ def get_as_json(self, **kwargs: Any) -> str: :rtype: str :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_configuration.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_configuration.py index f2841546e81..623dafaff88 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class MultiPartClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiPartClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiPartClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_serialization.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/_configuration.py index d148081911b..1c3bf9fa58b 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class MultiPartClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MultiPartClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiPartClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/operations/_operations.py index f8b81cff2f2..0f4f242b8b3 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -40,7 +40,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -67,9 +67,7 @@ def __init__(self, *args, **kwargs) -> None: self.http_parts = FormDataHttpPartsOperations(self._client, self._config, self._serialize, self._deserialize) @overload - async def basic( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiPartRequest, **kwargs: Any - ) -> None: + async def basic(self, body: _models.MultiPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -80,7 +78,7 @@ async def basic( # pylint: disable=inconsistent-return-statements """ @overload - async def basic(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def basic(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -90,9 +88,7 @@ async def basic(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inc :raises ~corehttp.exceptions.HttpResponseError: """ - async def basic( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.MultiPartRequest, JSON], **kwargs: Any - ) -> None: + async def basic(self, body: Union[_models.MultiPartRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Is either a MultiPartRequest type or a JSON type. Required. @@ -101,7 +97,7 @@ async def basic( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -145,9 +141,7 @@ async def basic( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def file_array_and_basic( # pylint: disable=inconsistent-return-statements - self, body: _models.ComplexPartsRequest, **kwargs: Any - ) -> None: + async def file_array_and_basic(self, body: _models.ComplexPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -158,9 +152,7 @@ async def file_array_and_basic( # pylint: disable=inconsistent-return-statement """ @overload - async def file_array_and_basic( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def file_array_and_basic(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -170,9 +162,7 @@ async def file_array_and_basic( # pylint: disable=inconsistent-return-statement :raises ~corehttp.exceptions.HttpResponseError: """ - async def file_array_and_basic( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ComplexPartsRequest, JSON], **kwargs: Any - ) -> None: + async def file_array_and_basic(self, body: Union[_models.ComplexPartsRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Is either a ComplexPartsRequest type or a JSON type. Required. @@ -181,7 +171,7 @@ async def file_array_and_basic( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -225,9 +215,7 @@ async def file_array_and_basic( # pylint: disable=inconsistent-return-statement return cls(pipeline_response, None, {}) # type: ignore @overload - async def json_part( # pylint: disable=inconsistent-return-statements - self, body: _models.JsonPartRequest, **kwargs: Any - ) -> None: + async def json_part(self, body: _models.JsonPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains json part and binary part. :param body: Required. @@ -238,7 +226,7 @@ async def json_part( # pylint: disable=inconsistent-return-statements """ @overload - async def json_part(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def json_part(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains json part and binary part. :param body: Required. @@ -248,9 +236,7 @@ async def json_part(self, body: JSON, **kwargs: Any) -> None: # pylint: disable :raises ~corehttp.exceptions.HttpResponseError: """ - async def json_part( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.JsonPartRequest, JSON], **kwargs: Any - ) -> None: + async def json_part(self, body: Union[_models.JsonPartRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains json part and binary part. :param body: Is either a JsonPartRequest type or a JSON type. Required. @@ -259,7 +245,7 @@ async def json_part( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,9 +289,7 @@ async def json_part( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def binary_array_parts( # pylint: disable=inconsistent-return-statements - self, body: _models.BinaryArrayPartsRequest, **kwargs: Any - ) -> None: + async def binary_array_parts(self, body: _models.BinaryArrayPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -316,9 +300,7 @@ async def binary_array_parts( # pylint: disable=inconsistent-return-statements """ @overload - async def binary_array_parts( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def binary_array_parts(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -328,9 +310,7 @@ async def binary_array_parts( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def binary_array_parts( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BinaryArrayPartsRequest, JSON], **kwargs: Any - ) -> None: + async def binary_array_parts(self, body: Union[_models.BinaryArrayPartsRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Is either a BinaryArrayPartsRequest type or a JSON type. Required. @@ -339,7 +319,7 @@ async def binary_array_parts( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -383,9 +363,7 @@ async def binary_array_parts( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def multi_binary_parts( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiBinaryPartsRequest, **kwargs: Any - ) -> None: + async def multi_binary_parts(self, body: _models.MultiBinaryPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -396,9 +374,7 @@ async def multi_binary_parts( # pylint: disable=inconsistent-return-statements """ @overload - async def multi_binary_parts( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def multi_binary_parts(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -408,9 +384,7 @@ async def multi_binary_parts( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def multi_binary_parts( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.MultiBinaryPartsRequest, JSON], **kwargs: Any - ) -> None: + async def multi_binary_parts(self, body: Union[_models.MultiBinaryPartsRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Is either a MultiBinaryPartsRequest type or a JSON type. Required. @@ -419,7 +393,7 @@ async def multi_binary_parts( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -463,9 +437,7 @@ async def multi_binary_parts( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def check_file_name_and_content_type( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiPartRequest, **kwargs: Any - ) -> None: + async def check_file_name_and_content_type(self, body: _models.MultiPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -476,9 +448,7 @@ async def check_file_name_and_content_type( # pylint: disable=inconsistent-retu """ @overload - async def check_file_name_and_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def check_file_name_and_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -488,7 +458,7 @@ async def check_file_name_and_content_type( # pylint: disable=inconsistent-retu :raises ~corehttp.exceptions.HttpResponseError: """ - async def check_file_name_and_content_type( # pylint: disable=inconsistent-return-statements + async def check_file_name_and_content_type( self, body: Union[_models.MultiPartRequest, JSON], **kwargs: Any ) -> None: """Test content-type: multipart/form-data. @@ -499,7 +469,7 @@ async def check_file_name_and_content_type( # pylint: disable=inconsistent-retu :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -543,9 +513,7 @@ async def check_file_name_and_content_type( # pylint: disable=inconsistent-retu return cls(pipeline_response, None, {}) # type: ignore @overload - async def anonymous_model( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def anonymous_model(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -556,9 +524,7 @@ async def anonymous_model( # pylint: disable=inconsistent-return-statements """ @overload - async def anonymous_model( # pylint: disable=inconsistent-return-statements - self, *, profile_image: FileType, **kwargs: Any - ) -> None: + async def anonymous_model(self, *, profile_image: FileType, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :keyword profile_image: Required. @@ -568,9 +534,7 @@ async def anonymous_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def anonymous_model( # pylint: disable=inconsistent-return-statements - self, body: JSON = _Unset, *, profile_image: FileType = _Unset, **kwargs: Any - ) -> None: + async def anonymous_model(self, body: JSON = _Unset, *, profile_image: FileType = _Unset, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Is one of the following types: JSON Required. @@ -581,7 +545,7 @@ async def anonymous_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -655,9 +619,7 @@ def __init__(self, *args, **kwargs) -> None: ) @overload - async def json_array_and_file_array( # pylint: disable=inconsistent-return-statements - self, body: _models.ComplexHttpPartsModelRequest, **kwargs: Any - ) -> None: + async def json_array_and_file_array(self, body: _models.ComplexHttpPartsModelRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -668,9 +630,7 @@ async def json_array_and_file_array( # pylint: disable=inconsistent-return-stat """ @overload - async def json_array_and_file_array( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def json_array_and_file_array(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -680,7 +640,7 @@ async def json_array_and_file_array( # pylint: disable=inconsistent-return-stat :raises ~corehttp.exceptions.HttpResponseError: """ - async def json_array_and_file_array( # pylint: disable=inconsistent-return-statements + async def json_array_and_file_array( self, body: Union[_models.ComplexHttpPartsModelRequest, JSON], **kwargs: Any ) -> None: """Test content-type: multipart/form-data for mixed scenarios. @@ -691,7 +651,7 @@ async def json_array_and_file_array( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -753,7 +713,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements + async def image_jpeg_content_type( self, body: _models.FileWithHttpPartSpecificContentTypeRequest, **kwargs: Any ) -> None: """Test content-type: multipart/form-data. @@ -766,9 +726,7 @@ async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statem """ @overload - async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def image_jpeg_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -778,7 +736,7 @@ async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statem :raises ~corehttp.exceptions.HttpResponseError: """ - async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements + async def image_jpeg_content_type( self, body: Union[_models.FileWithHttpPartSpecificContentTypeRequest, JSON], **kwargs: Any ) -> None: """Test content-type: multipart/form-data. @@ -790,7 +748,7 @@ async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -834,7 +792,7 @@ async def image_jpeg_content_type( # pylint: disable=inconsistent-return-statem return cls(pipeline_response, None, {}) # type: ignore @overload - async def required_content_type( # pylint: disable=inconsistent-return-statements + async def required_content_type( self, body: _models.FileWithHttpPartRequiredContentTypeRequest, **kwargs: Any ) -> None: """Test content-type: multipart/form-data. @@ -847,9 +805,7 @@ async def required_content_type( # pylint: disable=inconsistent-return-statemen """ @overload - async def required_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def required_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -859,7 +815,7 @@ async def required_content_type( # pylint: disable=inconsistent-return-statemen :raises ~corehttp.exceptions.HttpResponseError: """ - async def required_content_type( # pylint: disable=inconsistent-return-statements + async def required_content_type( self, body: Union[_models.FileWithHttpPartRequiredContentTypeRequest, JSON], **kwargs: Any ) -> None: """Test content-type: multipart/form-data. @@ -871,7 +827,7 @@ async def required_content_type( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -915,7 +871,7 @@ async def required_content_type( # pylint: disable=inconsistent-return-statemen return cls(pipeline_response, None, {}) # type: ignore @overload - async def optional_content_type( # pylint: disable=inconsistent-return-statements + async def optional_content_type( self, body: _models.FileWithHttpPartOptionalContentTypeRequest, **kwargs: Any ) -> None: """Test content-type: multipart/form-data for optional content type. @@ -928,9 +884,7 @@ async def optional_content_type( # pylint: disable=inconsistent-return-statemen """ @overload - async def optional_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + async def optional_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for optional content type. :param body: Required. @@ -940,7 +894,7 @@ async def optional_content_type( # pylint: disable=inconsistent-return-statemen :raises ~corehttp.exceptions.HttpResponseError: """ - async def optional_content_type( # pylint: disable=inconsistent-return-statements + async def optional_content_type( self, body: Union[_models.FileWithHttpPartOptionalContentTypeRequest, JSON], **kwargs: Any ) -> None: """Test content-type: multipart/form-data for optional content type. @@ -952,7 +906,7 @@ async def optional_content_type( # pylint: disable=inconsistent-return-statemen :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1014,9 +968,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def float( # pylint: disable=inconsistent-return-statements - self, body: _models.FloatRequest, **kwargs: Any - ) -> None: + async def float(self, body: _models.FloatRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for non string. :param body: Required. @@ -1027,7 +979,7 @@ async def float( # pylint: disable=inconsistent-return-statements """ @overload - async def float(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def float(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for non string. :param body: Required. @@ -1037,9 +989,7 @@ async def float(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inc :raises ~corehttp.exceptions.HttpResponseError: """ - async def float( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FloatRequest, JSON], **kwargs: Any - ) -> None: + async def float(self, body: Union[_models.FloatRequest, JSON], **kwargs: Any) -> None: """Test content-type: multipart/form-data for non string. :param body: Is either a FloatRequest type or a JSON type. Required. @@ -1048,7 +998,7 @@ async def float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/models/_models.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/models/_models.py index 6f003305ab5..ea469322952 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +13,6 @@ from .._vendor import FileType if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/operations/_operations.py index 67009e97022..a25a3b841de 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -28,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -176,9 +176,7 @@ def __init__(self, *args, **kwargs): self.http_parts = FormDataHttpPartsOperations(self._client, self._config, self._serialize, self._deserialize) @overload - def basic( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiPartRequest, **kwargs: Any - ) -> None: + def basic(self, body: _models.MultiPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -189,7 +187,7 @@ def basic( # pylint: disable=inconsistent-return-statements """ @overload - def basic(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def basic(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -210,7 +208,7 @@ def basic( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -254,9 +252,7 @@ def basic( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def file_array_and_basic( # pylint: disable=inconsistent-return-statements - self, body: _models.ComplexPartsRequest, **kwargs: Any - ) -> None: + def file_array_and_basic(self, body: _models.ComplexPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -267,7 +263,7 @@ def file_array_and_basic( # pylint: disable=inconsistent-return-statements """ @overload - def file_array_and_basic(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def file_array_and_basic(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -288,7 +284,7 @@ def file_array_and_basic( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -332,9 +328,7 @@ def file_array_and_basic( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def json_part( # pylint: disable=inconsistent-return-statements - self, body: _models.JsonPartRequest, **kwargs: Any - ) -> None: + def json_part(self, body: _models.JsonPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains json part and binary part. :param body: Required. @@ -345,7 +339,7 @@ def json_part( # pylint: disable=inconsistent-return-statements """ @overload - def json_part(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def json_part(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains json part and binary part. :param body: Required. @@ -366,7 +360,7 @@ def json_part( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -410,9 +404,7 @@ def json_part( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def binary_array_parts( # pylint: disable=inconsistent-return-statements - self, body: _models.BinaryArrayPartsRequest, **kwargs: Any - ) -> None: + def binary_array_parts(self, body: _models.BinaryArrayPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -423,7 +415,7 @@ def binary_array_parts( # pylint: disable=inconsistent-return-statements """ @overload - def binary_array_parts(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def binary_array_parts(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -444,7 +436,7 @@ def binary_array_parts( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -488,9 +480,7 @@ def binary_array_parts( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def multi_binary_parts( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiBinaryPartsRequest, **kwargs: Any - ) -> None: + def multi_binary_parts(self, body: _models.MultiBinaryPartsRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -501,7 +491,7 @@ def multi_binary_parts( # pylint: disable=inconsistent-return-statements """ @overload - def multi_binary_parts(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def multi_binary_parts(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for scenario contains multi binary parts. :param body: Required. @@ -522,7 +512,7 @@ def multi_binary_parts( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -566,9 +556,7 @@ def multi_binary_parts( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def check_file_name_and_content_type( # pylint: disable=inconsistent-return-statements - self, body: _models.MultiPartRequest, **kwargs: Any - ) -> None: + def check_file_name_and_content_type(self, body: _models.MultiPartRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -579,9 +567,7 @@ def check_file_name_and_content_type( # pylint: disable=inconsistent-return-sta """ @overload - def check_file_name_and_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + def check_file_name_and_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -602,7 +588,7 @@ def check_file_name_and_content_type( # pylint: disable=inconsistent-return-sta :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -646,7 +632,7 @@ def check_file_name_and_content_type( # pylint: disable=inconsistent-return-sta return cls(pipeline_response, None, {}) # type: ignore @overload - def anonymous_model(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def anonymous_model(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -657,9 +643,7 @@ def anonymous_model(self, body: JSON, **kwargs: Any) -> None: # pylint: disable """ @overload - def anonymous_model( # pylint: disable=inconsistent-return-statements - self, *, profile_image: FileType, **kwargs: Any - ) -> None: + def anonymous_model(self, *, profile_image: FileType, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :keyword profile_image: Required. @@ -682,7 +666,7 @@ def anonymous_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -756,9 +740,7 @@ def __init__(self, *args, **kwargs): ) @overload - def json_array_and_file_array( # pylint: disable=inconsistent-return-statements - self, body: _models.ComplexHttpPartsModelRequest, **kwargs: Any - ) -> None: + def json_array_and_file_array(self, body: _models.ComplexHttpPartsModelRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -769,9 +751,7 @@ def json_array_and_file_array( # pylint: disable=inconsistent-return-statements """ @overload - def json_array_and_file_array( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + def json_array_and_file_array(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for mixed scenarios. :param body: Required. @@ -792,7 +772,7 @@ def json_array_and_file_array( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,9 +834,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements - self, body: _models.FileWithHttpPartSpecificContentTypeRequest, **kwargs: Any - ) -> None: + def image_jpeg_content_type(self, body: _models.FileWithHttpPartSpecificContentTypeRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -867,9 +845,7 @@ def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements """ @overload - def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + def image_jpeg_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -891,7 +867,7 @@ def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -935,9 +911,7 @@ def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def required_content_type( # pylint: disable=inconsistent-return-statements - self, body: _models.FileWithHttpPartRequiredContentTypeRequest, **kwargs: Any - ) -> None: + def required_content_type(self, body: _models.FileWithHttpPartRequiredContentTypeRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -948,9 +922,7 @@ def required_content_type( # pylint: disable=inconsistent-return-statements """ @overload - def required_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + def required_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data. :param body: Required. @@ -972,7 +944,7 @@ def required_content_type( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1016,9 +988,7 @@ def required_content_type( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def optional_content_type( # pylint: disable=inconsistent-return-statements - self, body: _models.FileWithHttpPartOptionalContentTypeRequest, **kwargs: Any - ) -> None: + def optional_content_type(self, body: _models.FileWithHttpPartOptionalContentTypeRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for optional content type. :param body: Required. @@ -1029,9 +999,7 @@ def optional_content_type( # pylint: disable=inconsistent-return-statements """ @overload - def optional_content_type( # pylint: disable=inconsistent-return-statements - self, body: JSON, **kwargs: Any - ) -> None: + def optional_content_type(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for optional content type. :param body: Required. @@ -1053,7 +1021,7 @@ def optional_content_type( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1115,9 +1083,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def float( # pylint: disable=inconsistent-return-statements - self, body: _models.FloatRequest, **kwargs: Any - ) -> None: + def float(self, body: _models.FloatRequest, **kwargs: Any) -> None: """Test content-type: multipart/form-data for non string. :param body: Required. @@ -1128,7 +1094,7 @@ def float( # pylint: disable=inconsistent-return-statements """ @overload - def float(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + def float(self, body: JSON, **kwargs: Any) -> None: """Test content-type: multipart/form-data for non string. :param body: Required. @@ -1149,7 +1115,7 @@ def float( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_operations/_operations.py index 6f5492f09ed..0e41e089d9d 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -76,7 +75,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.User"]: maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_serialization.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_vendor.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_vendor.py index 9ff1575ab52..e95a1579495 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import PageableClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_operations/_operations.py index ee116d7cf3c..572c8eed1bf 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +52,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.User"]: maxpagesize = kwargs.pop("maxpagesize", None) cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_vendor.py index cc484903c7b..e1c0af6d4ad 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import PageableClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/models/_models.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/models/_models.py index fa7c4238166..d1482c0edbd 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_model_base.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_serialization.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/_operations.py index e19f3bd3ac9..894388f04cf 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -55,7 +55,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +84,7 @@ async def get(self, **kwargs: Any) -> _models.SimpleModel: :rtype: ~payload.xml.models.SimpleModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -135,9 +135,7 @@ async def get(self, **kwargs: Any) -> _models.SimpleModel: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.SimpleModel, **kwargs: Any - ) -> None: + async def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: """put. :param input: Required. @@ -146,7 +144,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -212,7 +210,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithSimpleArrays: :rtype: ~payload.xml.models.ModelWithSimpleArrays :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -263,9 +261,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithSimpleArrays: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithSimpleArrays, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithSimpleArrays, **kwargs: Any) -> None: """put. :param input: Required. @@ -274,7 +270,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -340,7 +336,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithArrayOfModel: :rtype: ~payload.xml.models.ModelWithArrayOfModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -391,9 +387,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithArrayOfModel: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithArrayOfModel, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithArrayOfModel, **kwargs: Any) -> None: """put. :param input: Required. @@ -402,7 +396,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,7 +462,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithOptionalField: :rtype: ~payload.xml.models.ModelWithOptionalField :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -519,9 +513,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithOptionalField: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithOptionalField, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithOptionalField, **kwargs: Any) -> None: """put. :param input: Required. @@ -530,7 +522,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -596,7 +588,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithAttributes: :rtype: ~payload.xml.models.ModelWithAttributes :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -647,9 +639,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithAttributes: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithAttributes, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithAttributes, **kwargs: Any) -> None: """put. :param input: Required. @@ -658,7 +648,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -724,7 +714,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithUnwrappedArray: :rtype: ~payload.xml.models.ModelWithUnwrappedArray :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -775,9 +765,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithUnwrappedArray: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithUnwrappedArray, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithUnwrappedArray, **kwargs: Any) -> None: """put. :param input: Required. @@ -786,7 +774,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,7 +840,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedArrays: :rtype: ~payload.xml.models.ModelWithRenamedArrays :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -903,9 +891,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedArrays: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithRenamedArrays, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithRenamedArrays, **kwargs: Any) -> None: """put. :param input: Required. @@ -914,7 +900,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,7 +966,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedFields: :rtype: ~payload.xml.models.ModelWithRenamedFields :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1031,9 +1017,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedFields: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithRenamedFields, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithRenamedFields, **kwargs: Any) -> None: """put. :param input: Required. @@ -1042,7 +1026,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1108,7 +1092,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEmptyArray: :rtype: ~payload.xml.models.ModelWithEmptyArray :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1159,9 +1143,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEmptyArray: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithEmptyArray, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithEmptyArray, **kwargs: Any) -> None: """put. :param input: Required. @@ -1170,7 +1152,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1236,7 +1218,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithText: :rtype: ~payload.xml.models.ModelWithText :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1287,9 +1269,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithText: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithText, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithText, **kwargs: Any) -> None: """put. :param input: Required. @@ -1298,7 +1278,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1364,7 +1344,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithDictionary: :rtype: ~payload.xml.models.ModelWithDictionary :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1415,9 +1395,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithDictionary: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithDictionary, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithDictionary, **kwargs: Any) -> None: """put. :param input: Required. @@ -1426,7 +1404,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1492,7 +1470,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEncodedNames: :rtype: ~payload.xml.models.ModelWithEncodedNames :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1543,9 +1521,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEncodedNames: return deserialized # type: ignore - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithEncodedNames, **kwargs: Any - ) -> None: + async def put(self, input: _models.ModelWithEncodedNames, **kwargs: Any) -> None: """put. :param input: Required. @@ -1554,7 +1530,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/_models.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/_models.py index e782204f523..b4721c99981 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/_operations.py index c66cddcfea3..0d9b7f204d6 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -30,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -386,7 +386,7 @@ def get(self, **kwargs: Any) -> _models.SimpleModel: :rtype: ~payload.xml.models.SimpleModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -446,7 +446,7 @@ def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -512,7 +512,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithSimpleArrays: :rtype: ~payload.xml.models.ModelWithSimpleArrays :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -574,7 +574,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -640,7 +640,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithArrayOfModel: :rtype: ~payload.xml.models.ModelWithArrayOfModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -702,7 +702,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -768,7 +768,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithOptionalField: :rtype: ~payload.xml.models.ModelWithOptionalField :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -830,7 +830,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -896,7 +896,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithAttributes: :rtype: ~payload.xml.models.ModelWithAttributes :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -958,7 +958,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1024,7 +1024,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithUnwrappedArray: :rtype: ~payload.xml.models.ModelWithUnwrappedArray :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1086,7 +1086,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1152,7 +1152,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithRenamedArrays: :rtype: ~payload.xml.models.ModelWithRenamedArrays :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1214,7 +1214,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1280,7 +1280,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithRenamedFields: :rtype: ~payload.xml.models.ModelWithRenamedFields :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1342,7 +1342,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1408,7 +1408,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithEmptyArray: :rtype: ~payload.xml.models.ModelWithEmptyArray :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1470,7 +1470,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1536,7 +1536,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithText: :rtype: ~payload.xml.models.ModelWithText :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1598,7 +1598,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1664,7 +1664,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithDictionary: :rtype: ~payload.xml.models.ModelWithDictionary :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1726,7 +1726,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1792,7 +1792,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithEncodedNames: :rtype: ~payload.xml.models.ModelWithEncodedNames :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1854,7 +1854,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py index d40b8908b7b..e5895c12346 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py @@ -18,9 +18,7 @@ from ._serialization import Deserializer, Serializer -class ResiliencyServiceDrivenClient( - ResiliencyServiceDrivenClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class ResiliencyServiceDrivenClient(ResiliencyServiceDrivenClientOperationsMixin): """Test that we can grow up a service spec and service deployment into a multi-versioned service with full client support. diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/_operations.py index ebffef3d8bd..6246a0f9cd9 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -83,7 +82,7 @@ def from_none(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -136,7 +135,7 @@ def from_one_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -189,7 +188,7 @@ def from_one_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_serialization.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_vendor.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_vendor.py index 8a5bb127b4d..5c5fb36628e 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ResiliencyServiceDrivenClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py index 755ada8379a..9bf207bb162 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py @@ -18,9 +18,7 @@ from ._operations import ResiliencyServiceDrivenClientOperationsMixin -class ResiliencyServiceDrivenClient( - ResiliencyServiceDrivenClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class ResiliencyServiceDrivenClient(ResiliencyServiceDrivenClientOperationsMixin): """Test that we can grow up a service spec and service deployment into a multi-versioned service with full client support. diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/_operations.py index acaa9c9a173..a9d05c09c4c 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +46,7 @@ async def from_none(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88,9 +87,7 @@ async def from_none(self, **kwargs: Any) -> bool: return cls(pipeline_response, None, {}) # type: ignore return 200 <= response.status_code <= 299 - async def from_one_required( # pylint: disable=inconsistent-return-statements - self, *, parameter: str, **kwargs: Any - ) -> None: + async def from_one_required(self, *, parameter: str, **kwargs: Any) -> None: """Test that currently accepts one required parameter, will be updated in next spec to accept a new optional parameter as well. @@ -100,7 +97,7 @@ async def from_one_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -141,9 +138,7 @@ async def from_one_required( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def from_one_optional( # pylint: disable=inconsistent-return-statements - self, *, parameter: Optional[str] = None, **kwargs: Any - ) -> None: + async def from_one_optional(self, *, parameter: Optional[str] = None, **kwargs: Any) -> None: """Test that currently accepts one optional parameter, will be updated in next spec to accept a new optional parameter as well. @@ -153,7 +148,7 @@ async def from_one_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_vendor.py index d0263c78846..cade67efe2f 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ResiliencyServiceDrivenClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py index 8f480919ee9..b4ae31c6f61 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py @@ -18,9 +18,7 @@ from ._serialization import Deserializer, Serializer -class ResiliencyServiceDrivenClient( - ResiliencyServiceDrivenClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class ResiliencyServiceDrivenClient(ResiliencyServiceDrivenClientOperationsMixin): """Test that we can grow up a service spec and service deployment into a multi-versioned service with full client support. diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/_operations.py index 97780851026..d63fb8a1af2 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -28,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -107,7 +106,7 @@ def add_operation(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -159,7 +158,7 @@ def from_none(self, *, new_parameter: Optional[str] = None, **kwargs: Any) -> bo :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -218,7 +217,7 @@ def from_one_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -277,7 +276,7 @@ def from_one_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_serialization.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_vendor.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_vendor.py index 8a5bb127b4d..5c5fb36628e 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ResiliencyServiceDrivenClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py index 9be828c92e2..8cb5bc3f840 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py @@ -18,9 +18,7 @@ from ._operations import ResiliencyServiceDrivenClientOperationsMixin -class ResiliencyServiceDrivenClient( - ResiliencyServiceDrivenClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class ResiliencyServiceDrivenClient(ResiliencyServiceDrivenClientOperationsMixin): """Test that we can grow up a service spec and service deployment into a multi-versioned service with full client support. diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/_operations.py index 2306a251132..a7f6b4815e2 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,15 +42,15 @@ class ResiliencyServiceDrivenClientOperationsMixin( # pylint: disable=name-too- @api_version_validation( method_added_on="v2", - ) # pylint: disable=inconsistent-return-statements - async def add_operation(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + ) + async def add_operation(self, **kwargs: Any) -> None: """Added operation. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -103,7 +102,7 @@ async def from_none(self, *, new_parameter: Optional[str] = None, **kwargs: Any) :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -147,10 +146,8 @@ async def from_none(self, *, new_parameter: Optional[str] = None, **kwargs: Any) @api_version_validation( params_added_on={"v2": ["new_parameter"]}, - ) # pylint: disable=inconsistent-return-statements - async def from_one_required( # pylint: disable=inconsistent-return-statements - self, *, parameter: str, new_parameter: Optional[str] = None, **kwargs: Any - ) -> None: + ) + async def from_one_required(self, *, parameter: str, new_parameter: Optional[str] = None, **kwargs: Any) -> None: """Operation that grew up from accepting one required parameter to accepting a required parameter and an optional parameter. @@ -162,7 +159,7 @@ async def from_one_required( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -206,8 +203,8 @@ async def from_one_required( # pylint: disable=inconsistent-return-statements @api_version_validation( params_added_on={"v2": ["new_parameter"]}, - ) # pylint: disable=inconsistent-return-statements - async def from_one_optional( # pylint: disable=inconsistent-return-statements + ) + async def from_one_optional( self, *, parameter: Optional[str] = None, new_parameter: Optional[str] = None, **kwargs: Any ) -> None: """Tests that we can grow up an operation from accepting one optional parameter to accepting two @@ -221,7 +218,7 @@ async def from_one_optional( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_vendor.py index d0263c78846..cade67efe2f 100644 --- a/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ResiliencyServiceDrivenClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/_model_base.py b/packages/typespec-python/test/unbranded/generated/routes/routes/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/_serialization.py b/packages/typespec-python/test/unbranded/generated/routes/routes/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/_vendor.py b/packages/typespec-python/test/unbranded/generated/routes/routes/_vendor.py index 2b0992a70cf..387297776d9 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RoutesClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_vendor.py index b8940d79aee..ed1dd039cf3 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RoutesClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/_operations.py index 647b657fea4..76cf6390af6 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -73,7 +73,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -111,7 +111,7 @@ def __init__(self, *args, **kwargs) -> None: self._client, self._config, self._serialize, self._deserialize ) - async def template_only(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def template_only(self, param: str, **kwargs: Any) -> None: """template_only. :param param: Required. @@ -120,7 +120,7 @@ async def template_only(self, param: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -157,7 +157,7 @@ async def template_only(self, param: str, **kwargs: Any) -> None: # pylint: dis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def explicit(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def explicit(self, param: str, **kwargs: Any) -> None: """explicit. :param param: Required. @@ -166,7 +166,7 @@ async def explicit(self, param: str, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -203,9 +203,7 @@ async def explicit(self, param: str, **kwargs: Any) -> None: # pylint: disable= if cls: return cls(pipeline_response, None, {}) # type: ignore - async def annotation_only( # pylint: disable=inconsistent-return-statements - self, param: str, **kwargs: Any - ) -> None: + async def annotation_only(self, param: str, **kwargs: Any) -> None: """annotation_only. :param param: Required. @@ -214,7 +212,7 @@ async def annotation_only( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -276,9 +274,7 @@ def __init__(self, *args, **kwargs) -> None: self._client, self._config, self._serialize, self._deserialize ) - async def template_only( # pylint: disable=inconsistent-return-statements - self, *, param: str, **kwargs: Any - ) -> None: + async def template_only(self, *, param: str, **kwargs: Any) -> None: """template_only. :keyword param: Required. @@ -287,7 +283,7 @@ async def template_only( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -324,7 +320,7 @@ async def template_only( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def explicit(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def explicit(self, *, param: str, **kwargs: Any) -> None: """explicit. :keyword param: Required. @@ -333,7 +329,7 @@ async def explicit(self, *, param: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -370,9 +366,7 @@ async def explicit(self, *, param: str, **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def annotation_only( # pylint: disable=inconsistent-return-statements - self, *, param: str, **kwargs: Any - ) -> None: + async def annotation_only(self, *, param: str, **kwargs: Any) -> None: """annotation_only. :keyword param: Required. @@ -381,7 +375,7 @@ async def annotation_only( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -436,14 +430,14 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def fixed(self, **kwargs: Any) -> None: """fixed. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,14 +476,14 @@ async def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re class RoutesClientOperationsMixin(RoutesClientMixinABC): - async def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def fixed(self, **kwargs: Any) -> None: """fixed. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -543,7 +537,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def template(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def template(self, param: str, **kwargs: Any) -> None: """template. :param param: Required. @@ -552,7 +546,7 @@ async def template(self, param: str, **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -589,7 +583,7 @@ async def template(self, param: str, **kwargs: Any) -> None: # pylint: disable= if cls: return cls(pipeline_response, None, {}) # type: ignore - async def annotation(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def annotation(self, param: str, **kwargs: Any) -> None: """annotation. :param param: Required. @@ -598,7 +592,7 @@ async def annotation(self, param: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -803,7 +797,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -812,7 +806,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -849,7 +843,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -858,7 +852,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -895,9 +889,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -906,7 +898,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -961,7 +953,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -970,7 +962,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1007,7 +999,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1016,7 +1008,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1053,9 +1045,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1064,7 +1054,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1119,7 +1109,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1128,7 +1118,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1165,7 +1155,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1174,7 +1164,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1211,9 +1201,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1222,7 +1210,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1277,7 +1265,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1286,7 +1274,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1323,7 +1311,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1332,7 +1320,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1369,9 +1357,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1380,7 +1366,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1435,7 +1421,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1444,7 +1430,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1481,7 +1467,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1490,7 +1476,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1527,9 +1513,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1538,7 +1522,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1593,7 +1577,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1602,7 +1586,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1639,7 +1623,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1648,7 +1632,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1685,9 +1669,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1696,7 +1678,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1751,7 +1733,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1760,7 +1742,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1797,7 +1779,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1806,7 +1788,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1843,9 +1825,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -1854,7 +1834,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1909,7 +1889,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, param: str, **kwargs: Any) -> None: """primitive. :param param: Required. @@ -1918,7 +1898,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1955,7 +1935,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, param: List[str], **kwargs: Any) -> None: """array. :param param: Required. @@ -1964,7 +1944,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2001,9 +1981,7 @@ async def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disab if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, param: Dict[str, int], **kwargs: Any) -> None: """record. :param param: Required. @@ -2012,7 +1990,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2067,7 +2045,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, *, param: str, **kwargs: Any) -> None: """primitive. :keyword param: Required. @@ -2076,7 +2054,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2113,7 +2091,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, *, param: List[str], **kwargs: Any) -> None: """array. :keyword param: Required. @@ -2122,7 +2100,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2159,9 +2137,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, *, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: """record. :keyword param: Required. @@ -2170,7 +2146,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2225,7 +2201,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, *, param: str, **kwargs: Any) -> None: """primitive. :keyword param: Required. @@ -2234,7 +2210,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2271,7 +2247,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, *, param: List[str], **kwargs: Any) -> None: """array. :keyword param: Required. @@ -2280,7 +2256,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2317,9 +2293,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, *, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: """record. :keyword param: Required. @@ -2328,7 +2302,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2383,7 +2357,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, *, param: str, **kwargs: Any) -> None: """primitive. :keyword param: Required. @@ -2392,7 +2366,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2429,7 +2403,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, *, param: List[str], **kwargs: Any) -> None: """array. :keyword param: Required. @@ -2438,7 +2412,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2475,9 +2449,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, *, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: """record. :keyword param: Required. @@ -2486,7 +2458,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2541,7 +2513,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def primitive(self, *, param: str, **kwargs: Any) -> None: """primitive. :keyword param: Required. @@ -2550,7 +2522,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2587,7 +2559,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disa if cls: return cls(pipeline_response, None, {}) # type: ignore - async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def array(self, *, param: List[str], **kwargs: Any) -> None: """array. :keyword param: Required. @@ -2596,7 +2568,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2633,9 +2605,7 @@ async def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: di if cls: return cls(pipeline_response, None, {}) # type: ignore - async def record( # pylint: disable=inconsistent-return-statements - self, *, param: Dict[str, int], **kwargs: Any - ) -> None: + async def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: """record. :keyword param: Required. @@ -2644,7 +2614,7 @@ async def record( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/operations/_operations.py index 2f5be3d05ad..a4694834201 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -27,7 +27,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -703,7 +703,7 @@ def template_only(self, param: str, **kwargs: Any) -> None: # pylint: disable=i :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -749,7 +749,7 @@ def explicit(self, param: str, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -795,7 +795,7 @@ def annotation_only(self, param: str, **kwargs: Any) -> None: # pylint: disable :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -866,7 +866,7 @@ def template_only(self, *, param: str, **kwargs: Any) -> None: # pylint: disabl :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -912,7 +912,7 @@ def explicit(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -958,7 +958,7 @@ def annotation_only(self, *, param: str, **kwargs: Any) -> None: # pylint: disa :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1020,7 +1020,7 @@ def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1066,7 +1066,7 @@ def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1129,7 +1129,7 @@ def template(self, param: str, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1175,7 +1175,7 @@ def annotation(self, param: str, **kwargs: Any) -> None: # pylint: disable=inco :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1389,7 +1389,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1435,7 +1435,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1481,7 +1481,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1545,7 +1545,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1591,7 +1591,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1637,7 +1637,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1701,7 +1701,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1747,7 +1747,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1793,7 +1793,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1857,7 +1857,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1903,7 +1903,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1949,7 +1949,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2013,7 +2013,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2059,7 +2059,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2105,7 +2105,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2169,7 +2169,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2215,7 +2215,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2261,7 +2261,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2325,7 +2325,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2371,7 +2371,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2417,7 +2417,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2481,7 +2481,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2527,7 +2527,7 @@ def array(self, param: List[str], **kwargs: Any) -> None: # pylint: disable=inc :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2573,7 +2573,7 @@ def record(self, param: Dict[str, int], **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2637,7 +2637,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2683,7 +2683,7 @@ def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2729,7 +2729,7 @@ def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2793,7 +2793,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2839,7 +2839,7 @@ def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2885,7 +2885,7 @@ def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2949,7 +2949,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2995,7 +2995,7 @@ def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3041,7 +3041,7 @@ def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3105,7 +3105,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3151,7 +3151,7 @@ def array(self, *, param: List[str], **kwargs: Any) -> None: # pylint: disable= :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3197,7 +3197,7 @@ def record(self, *, param: Dict[str, int], **kwargs: Any) -> None: # pylint: di :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_serialization.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py index fbf4c7aa8c8..06f9f683137 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +55,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: _models.JsonEncodedNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -72,9 +71,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -88,9 +85,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -103,9 +98,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.JsonEncodedNameModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def send(self, body: Union[_models.JsonEncodedNameModel, JSON, IO[bytes]], **kwargs: Any) -> None: """send. :param body: Is one of the following types: JsonEncodedNameModel, JSON, IO[bytes] Required. @@ -114,7 +107,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -167,7 +160,7 @@ async def get(self, **kwargs: Any) -> _models.JsonEncodedNameModel: :rtype: ~serialization.encodedname.json.models.JsonEncodedNameModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/models/_models.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/models/_models.py index b55d68d7061..988d8e74422 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py index c207f44ee85..4596700b926 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -87,7 +86,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def send( # pylint: disable=inconsistent-return-statements + def send( self, body: _models.JsonEncodedNameModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -103,9 +102,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -119,9 +116,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -145,7 +140,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -198,7 +193,7 @@ def get(self, **kwargs: Any) -> _models.JsonEncodedNameModel: :rtype: ~serialization.encodedname.json.models.JsonEncodedNameModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_configuration.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_configuration.py index 2fe40571549..c1cf530f6d9 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class NotDefinedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotDefinedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotDefinedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/_operations.py index 21bbcdc5a3f..6c9a743970c 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +49,7 @@ def valid(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_serialization.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_vendor.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_vendor.py index 4922802a253..7248df71de7 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotDefinedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_configuration.py index 7344e0528a6..26c5a42f157 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class NotDefinedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotDefinedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotDefinedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/_operations.py index 875f9f70090..f6155678282 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,7 +39,7 @@ async def valid(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_vendor.py index db5385d9d54..84ff4fc7608 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotDefinedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_client.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_client.py index 681611dee09..44a4ee449f8 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_client.py @@ -18,7 +18,7 @@ from ._serialization import Deserializer, Serializer -class MultipleClient(MultipleClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultipleClient(MultipleClientOperationsMixin): """MultipleClient. :param endpoint: Pass in http://localhost:3000 for endpoint. Required. diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_model_base.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_operations/_operations.py index 7be504b89a8..a363720a312 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -64,7 +63,7 @@ def no_operation_params(self, **kwargs: Any) -> None: # pylint: disable=inconsi :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,7 +111,7 @@ def with_operation_path_param( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_serialization.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_vendor.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_vendor.py index 61d3301744b..854dfb5fb21 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultipleClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_client.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_client.py index 1a307b1385a..9d651bbf756 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_client.py @@ -18,7 +18,7 @@ from ._operations import MultipleClientOperationsMixin -class MultipleClient(MultipleClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class MultipleClient(MultipleClientOperationsMixin): """MultipleClient. :param endpoint: Pass in http://localhost:3000 for endpoint. Required. diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_operations/_operations.py index eee691fcd1b..30d9168df1f 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -29,21 +28,21 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class MultipleClientOperationsMixin(MultipleClientMixinABC): - async def no_operation_params(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def no_operation_params(self, **kwargs: Any) -> None: """no_operation_params. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80,9 +79,7 @@ async def no_operation_params(self, **kwargs: Any) -> None: # pylint: disable=i if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_operation_path_param( # pylint: disable=inconsistent-return-statements - self, keyword: str, **kwargs: Any - ) -> None: + async def with_operation_path_param(self, keyword: str, **kwargs: Any) -> None: """with_operation_path_param. :param keyword: Required. @@ -91,7 +88,7 @@ async def with_operation_path_param( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_vendor.py index e87acdb0464..312416aa0d9 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MultipleClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_model_base.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_operations/_operations.py index 97009e1d46c..dc356eb6c18 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +49,7 @@ def my_op(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_serialization.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_vendor.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_vendor.py index 524c554a317..a7372a5bb1d 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SingleClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_operations/_operations.py index ce9469efe8d..43800ec4049 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,7 +25,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,7 +39,7 @@ async def my_op(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_vendor.py index 9056cfd9c68..66de1c5d0a5 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SingleClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_configuration.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_configuration.py index d25f095f116..25c04497f1e 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class NotVersionedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotVersionedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotVersionedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_operations/_operations.py index 63ea6e82ade..ea1b9b2fece 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -79,7 +78,7 @@ def without_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -123,7 +122,7 @@ def with_query_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -168,7 +167,7 @@ def with_path_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_serialization.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_vendor.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_vendor.py index cc3dbb86dd6..6e7821d04f9 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotVersionedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_configuration.py index 8c4180c37a6..86e5644d002 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class NotVersionedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotVersionedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotVersionedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/_operations.py index 2aa4119040d..cc3d6660f2c 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +43,7 @@ async def without_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88,7 +87,7 @@ async def with_query_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -133,7 +132,7 @@ async def with_path_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_vendor.py index 68e18babf5a..a5eb09e0bc3 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotVersionedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_client.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_client.py index b9c666a2fad..415155bf9f8 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_client.py @@ -18,7 +18,7 @@ from ._serialization import Deserializer, Serializer -class VersionedClient(VersionedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class VersionedClient(VersionedClientOperationsMixin): """Illustrates versioned server. :param endpoint: Need to be set as 'http://localhost:3000' in client. Required. diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_configuration.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_configuration.py index a872af0110f..96d2d73c012 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class VersionedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VersionedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VersionedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_model_base.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_operations/_operations.py index 9bb8a408150..15c209a7619 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -27,7 +26,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -90,7 +89,7 @@ def without_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,7 +133,7 @@ def with_query_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -179,7 +178,7 @@ def with_path_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -224,7 +223,7 @@ def with_query_old_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_serialization.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_vendor.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_vendor.py index c59c2a37e9c..c084315b11d 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VersionedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_client.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_client.py index 49951909cc1..e64d9f286f7 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_client.py @@ -18,7 +18,7 @@ from ._operations import VersionedClientOperationsMixin -class VersionedClient(VersionedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class VersionedClient(VersionedClientOperationsMixin): """Illustrates versioned server. :param endpoint: Need to be set as 'http://localhost:3000' in client. Required. diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_configuration.py index 83541e7be1f..ec7f7c6b97b 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class VersionedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VersionedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VersionedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_operations/_operations.py index 6102e32f824..b86ddc9bf23 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +44,7 @@ async def without_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89,7 +88,7 @@ async def with_query_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,7 +133,7 @@ async def with_path_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -179,7 +178,7 @@ async def with_query_old_api_version(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_vendor.py index 07eee2e2022..88d05de2b3b 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VersionedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_configuration.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_configuration.py index f82944d842a..b81d42da2eb 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ConditionalRequestClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ConditionalRequestClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ConditionalRequestClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/_operations.py index 705e6c7c356..87cdc1a5828 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp import MatchConditions from corehttp.exceptions import ( @@ -30,7 +29,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -122,7 +121,7 @@ def post_if_match( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -180,7 +179,7 @@ def post_if_none_match( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -236,7 +235,7 @@ def head_if_modified_since(self, *, if_modified_since: Optional[datetime.datetim :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +287,7 @@ def post_if_unmodified_since( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_serialization.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_vendor.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_vendor.py index 34905d1f891..761b91e56d1 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_vendor.py @@ -13,7 +13,6 @@ from ._configuration import ConditionalRequestClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_configuration.py index cf6f79cd5de..982c0598258 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ConditionalRequestClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ConditionalRequestClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ConditionalRequestClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/_operations.py index 7690fb60dc5..87f6a7139fa 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp import MatchConditions from corehttp.exceptions import ( @@ -34,14 +33,14 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class ConditionalRequestClientOperationsMixin(ConditionalRequestClientMixinABC): - async def post_if_match( # pylint: disable=inconsistent-return-statements + async def post_if_match( self, *, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any ) -> None: """Check when only If-Match in header is defined. @@ -55,7 +54,7 @@ async def post_if_match( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -99,7 +98,7 @@ async def post_if_match( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def post_if_none_match( # pylint: disable=inconsistent-return-statements + async def post_if_none_match( self, *, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any ) -> None: """Check when only If-None-Match in header is defined. @@ -113,7 +112,7 @@ async def post_if_none_match( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -171,7 +170,7 @@ async def head_if_modified_since( :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -209,7 +208,7 @@ async def head_if_modified_since( return cls(pipeline_response, None, {}) # type: ignore return 200 <= response.status_code <= 299 - async def post_if_unmodified_since( # pylint: disable=inconsistent-return-statements + async def post_if_unmodified_since( self, *, if_unmodified_since: Optional[datetime.datetime] = None, **kwargs: Any ) -> None: """Check when only If-Unmodified-Since in header is defined. @@ -223,7 +222,7 @@ async def post_if_unmodified_since( # pylint: disable=inconsistent-return-state :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_vendor.py index 84433d5d9a1..b18a919f6cd 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_vendor.py @@ -13,7 +13,6 @@ from ._configuration import ConditionalRequestClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_configuration.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_configuration.py index d11d4c07181..5c1f00532af 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class RepeatabilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RepeatabilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RepeatabilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_operations/_operations.py index 748c344bfd4..40700eeb78a 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar import uuid from corehttp.exceptions import ( @@ -29,7 +28,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -63,7 +62,7 @@ def immediate_success(self, **kwargs: Any) -> None: # pylint: disable=inconsist :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_serialization.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_vendor.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_vendor.py index 83eb66848e1..5ea275ad10d 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RepeatabilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_configuration.py index c464839e339..d3c18a9a06e 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class RepeatabilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RepeatabilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RepeatabilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/_operations.py index e7b1c2e056a..433c378db87 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -26,21 +25,21 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class RepeatabilityClientOperationsMixin(RepeatabilityClientMixinABC): - async def immediate_success(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def immediate_success(self, **kwargs: Any) -> None: """Check we recognize Repeatability-Request-ID and Repeatability-First-Sent. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_vendor.py index 8ccdb9d16b6..6674f18d383 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RepeatabilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_configuration.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_configuration.py index 4d0802ea0fe..d8d040e705a 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class SpecialWordsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class SpecialWordsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for SpecialWordsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_model_base.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_serialization.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_configuration.py index 3876b1c6728..a866c9d7741 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class SpecialWordsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class SpecialWordsClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for SpecialWordsClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/_operations.py index 00046c5b76c..8d74adf0721 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -132,7 +132,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -156,9 +156,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def with_and( # pylint: disable=inconsistent-return-statements - self, body: _models.AndModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_and(self, body: _models.AndModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -172,9 +170,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements """ @overload - async def with_and( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_and(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -188,9 +184,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements """ @overload - async def with_and( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_and(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -203,9 +197,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_and( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.AndModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_and(self, body: Union[_models.AndModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_and. :param body: Is one of the following types: AndModel, JSON, IO[bytes] Required. @@ -214,7 +206,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -261,9 +253,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_as( # pylint: disable=inconsistent-return-statements - self, body: _models.AsModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_as(self, body: _models.AsModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -277,9 +267,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements """ @overload - async def with_as( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_as(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -293,9 +281,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements """ @overload - async def with_as( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_as(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -308,9 +294,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_as( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.AsModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_as(self, body: Union[_models.AsModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_as. :param body: Is one of the following types: AsModel, JSON, IO[bytes] Required. @@ -319,7 +303,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -366,7 +350,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_assert( # pylint: disable=inconsistent-return-statements + async def with_assert( self, body: _models.AssertModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_assert. @@ -382,9 +366,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements """ @overload - async def with_assert( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_assert(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_assert. :param body: Required. @@ -398,9 +380,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements """ @overload - async def with_assert( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_assert(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_assert. :param body: Required. @@ -413,9 +393,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_assert( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.AssertModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_assert(self, body: Union[_models.AssertModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_assert. :param body: Is one of the following types: AssertModel, JSON, IO[bytes] Required. @@ -424,7 +402,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -471,7 +449,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_async( # pylint: disable=inconsistent-return-statements + async def with_async( self, body: _models.AsyncModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_async. @@ -487,9 +465,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements """ @overload - async def with_async( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_async(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_async. :param body: Required. @@ -503,9 +479,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements """ @overload - async def with_async( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_async(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_async. :param body: Required. @@ -518,9 +492,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_async( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.AsyncModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_async(self, body: Union[_models.AsyncModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_async. :param body: Is one of the following types: AsyncModel, JSON, IO[bytes] Required. @@ -529,7 +501,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -576,7 +548,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_await( # pylint: disable=inconsistent-return-statements + async def with_await( self, body: _models.AwaitModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_await. @@ -592,9 +564,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements """ @overload - async def with_await( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_await(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_await. :param body: Required. @@ -608,9 +578,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements """ @overload - async def with_await( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_await(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_await. :param body: Required. @@ -623,9 +591,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_await( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.AwaitModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_await(self, body: Union[_models.AwaitModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_await. :param body: Is one of the following types: AwaitModel, JSON, IO[bytes] Required. @@ -634,7 +600,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -681,7 +647,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_break( # pylint: disable=inconsistent-return-statements + async def with_break( self, body: _models.BreakModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_break. @@ -697,9 +663,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements """ @overload - async def with_break( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_break(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_break. :param body: Required. @@ -713,9 +677,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements """ @overload - async def with_break( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_break(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_break. :param body: Required. @@ -728,9 +690,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_break( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BreakModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_break(self, body: Union[_models.BreakModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_break. :param body: Is one of the following types: BreakModel, JSON, IO[bytes] Required. @@ -739,7 +699,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -786,7 +746,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_class( # pylint: disable=inconsistent-return-statements + async def with_class( self, body: _models.ClassModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_class. @@ -802,9 +762,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements """ @overload - async def with_class( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_class(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_class. :param body: Required. @@ -818,9 +776,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements """ @overload - async def with_class( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_class(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_class. :param body: Required. @@ -833,9 +789,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_class( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ClassModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_class(self, body: Union[_models.ClassModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_class. :param body: Is one of the following types: ClassModel, JSON, IO[bytes] Required. @@ -844,7 +798,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -891,7 +845,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_constructor( # pylint: disable=inconsistent-return-statements + async def with_constructor( self, body: _models.Constructor, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_constructor. @@ -907,9 +861,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements """ @overload - async def with_constructor( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_constructor(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_constructor. :param body: Required. @@ -923,9 +875,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements """ @overload - async def with_constructor( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_constructor(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_constructor. :param body: Required. @@ -938,9 +888,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_constructor( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.Constructor, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_constructor(self, body: Union[_models.Constructor, JSON, IO[bytes]], **kwargs: Any) -> None: """with_constructor. :param body: Is one of the following types: Constructor, JSON, IO[bytes] Required. @@ -949,7 +897,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -996,7 +944,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_continue( # pylint: disable=inconsistent-return-statements + async def with_continue( self, body: _models.ContinueModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_continue. @@ -1012,9 +960,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements """ @overload - async def with_continue( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_continue(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_continue. :param body: Required. @@ -1028,9 +974,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements """ @overload - async def with_continue( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_continue(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_continue. :param body: Required. @@ -1043,9 +987,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_continue( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ContinueModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_continue(self, body: Union[_models.ContinueModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_continue. :param body: Is one of the following types: ContinueModel, JSON, IO[bytes] Required. @@ -1054,7 +996,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1101,9 +1043,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_def( # pylint: disable=inconsistent-return-statements - self, body: _models.DefModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_def(self, body: _models.DefModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -1117,9 +1057,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements """ @overload - async def with_def( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_def(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -1133,9 +1071,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements """ @overload - async def with_def( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_def(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -1148,9 +1084,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_def( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DefModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_def(self, body: Union[_models.DefModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_def. :param body: Is one of the following types: DefModel, JSON, IO[bytes] Required. @@ -1159,7 +1093,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1206,9 +1140,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_del( # pylint: disable=inconsistent-return-statements - self, body: _models.DelModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_del(self, body: _models.DelModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -1222,9 +1154,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements """ @overload - async def with_del( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_del(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -1238,9 +1168,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements """ @overload - async def with_del( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_del(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -1253,9 +1181,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_del( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DelModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_del(self, body: Union[_models.DelModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_del. :param body: Is one of the following types: DelModel, JSON, IO[bytes] Required. @@ -1264,7 +1190,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1311,7 +1237,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_elif( # pylint: disable=inconsistent-return-statements + async def with_elif( self, body: _models.ElifModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_elif. @@ -1327,9 +1253,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements """ @overload - async def with_elif( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_elif(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_elif. :param body: Required. @@ -1343,9 +1267,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements """ @overload - async def with_elif( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_elif(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_elif. :param body: Required. @@ -1358,9 +1280,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_elif( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ElifModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_elif(self, body: Union[_models.ElifModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_elif. :param body: Is one of the following types: ElifModel, JSON, IO[bytes] Required. @@ -1369,7 +1289,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1416,7 +1336,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_else( # pylint: disable=inconsistent-return-statements + async def with_else( self, body: _models.ElseModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_else. @@ -1432,9 +1352,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements """ @overload - async def with_else( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_else(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_else. :param body: Required. @@ -1448,9 +1366,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements """ @overload - async def with_else( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_else(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_else. :param body: Required. @@ -1463,9 +1379,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_else( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ElseModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_else(self, body: Union[_models.ElseModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_else. :param body: Is one of the following types: ElseModel, JSON, IO[bytes] Required. @@ -1474,7 +1388,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1521,7 +1435,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_except( # pylint: disable=inconsistent-return-statements + async def with_except( self, body: _models.ExceptModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_except. @@ -1537,9 +1451,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements """ @overload - async def with_except( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_except(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_except. :param body: Required. @@ -1553,9 +1465,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements """ @overload - async def with_except( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_except(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_except. :param body: Required. @@ -1568,9 +1478,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_except( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExceptModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_except(self, body: Union[_models.ExceptModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_except. :param body: Is one of the following types: ExceptModel, JSON, IO[bytes] Required. @@ -1579,7 +1487,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1626,7 +1534,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_exec( # pylint: disable=inconsistent-return-statements + async def with_exec( self, body: _models.ExecModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_exec. @@ -1642,9 +1550,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements """ @overload - async def with_exec( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_exec(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_exec. :param body: Required. @@ -1658,9 +1564,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements """ @overload - async def with_exec( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_exec(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_exec. :param body: Required. @@ -1673,9 +1577,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_exec( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExecModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_exec(self, body: Union[_models.ExecModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_exec. :param body: Is one of the following types: ExecModel, JSON, IO[bytes] Required. @@ -1684,7 +1586,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1731,7 +1633,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_finally( # pylint: disable=inconsistent-return-statements + async def with_finally( self, body: _models.FinallyModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_finally. @@ -1747,9 +1649,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements """ @overload - async def with_finally( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_finally(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_finally. :param body: Required. @@ -1763,9 +1663,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements """ @overload - async def with_finally( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_finally(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_finally. :param body: Required. @@ -1778,9 +1676,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_finally( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FinallyModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_finally(self, body: Union[_models.FinallyModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_finally. :param body: Is one of the following types: FinallyModel, JSON, IO[bytes] Required. @@ -1789,7 +1685,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1836,9 +1732,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_for( # pylint: disable=inconsistent-return-statements - self, body: _models.ForModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_for(self, body: _models.ForModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -1852,9 +1746,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements """ @overload - async def with_for( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_for(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -1868,9 +1760,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements """ @overload - async def with_for( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_for(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -1883,9 +1773,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_for( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ForModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_for(self, body: Union[_models.ForModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_for. :param body: Is one of the following types: ForModel, JSON, IO[bytes] Required. @@ -1894,7 +1782,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1941,7 +1829,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_from( # pylint: disable=inconsistent-return-statements + async def with_from( self, body: _models.FromModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_from. @@ -1957,9 +1845,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements """ @overload - async def with_from( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_from(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_from. :param body: Required. @@ -1973,9 +1859,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements """ @overload - async def with_from( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_from(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_from. :param body: Required. @@ -1988,9 +1872,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_from( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FromModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_from(self, body: Union[_models.FromModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_from. :param body: Is one of the following types: FromModel, JSON, IO[bytes] Required. @@ -1999,7 +1881,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2046,7 +1928,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_global( # pylint: disable=inconsistent-return-statements + async def with_global( self, body: _models.GlobalModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_global. @@ -2062,9 +1944,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements """ @overload - async def with_global( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_global(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_global. :param body: Required. @@ -2078,9 +1958,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements """ @overload - async def with_global( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_global(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_global. :param body: Required. @@ -2093,9 +1971,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_global( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.GlobalModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_global(self, body: Union[_models.GlobalModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_global. :param body: Is one of the following types: GlobalModel, JSON, IO[bytes] Required. @@ -2104,7 +1980,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,9 +2027,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_if( # pylint: disable=inconsistent-return-statements - self, body: _models.IfModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_if(self, body: _models.IfModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -2167,9 +2041,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements """ @overload - async def with_if( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_if(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -2183,9 +2055,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements """ @overload - async def with_if( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_if(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -2198,9 +2068,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_if( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IfModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_if(self, body: Union[_models.IfModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_if. :param body: Is one of the following types: IfModel, JSON, IO[bytes] Required. @@ -2209,7 +2077,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2256,7 +2124,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_import( # pylint: disable=inconsistent-return-statements + async def with_import( self, body: _models.ImportModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_import. @@ -2272,9 +2140,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements """ @overload - async def with_import( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_import(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_import. :param body: Required. @@ -2288,9 +2154,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements """ @overload - async def with_import( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_import(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_import. :param body: Required. @@ -2303,9 +2167,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_import( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ImportModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_import(self, body: Union[_models.ImportModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_import. :param body: Is one of the following types: ImportModel, JSON, IO[bytes] Required. @@ -2314,7 +2176,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2361,9 +2223,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_in( # pylint: disable=inconsistent-return-statements - self, body: _models.InModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_in(self, body: _models.InModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -2377,9 +2237,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements """ @overload - async def with_in( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_in(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -2393,9 +2251,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements """ @overload - async def with_in( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_in(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -2408,9 +2264,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_in( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.InModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_in(self, body: Union[_models.InModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_in. :param body: Is one of the following types: InModel, JSON, IO[bytes] Required. @@ -2419,7 +2273,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2466,9 +2320,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_is( # pylint: disable=inconsistent-return-statements - self, body: _models.IsModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_is(self, body: _models.IsModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -2482,9 +2334,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements """ @overload - async def with_is( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_is(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -2498,9 +2348,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements """ @overload - async def with_is( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_is(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -2513,9 +2361,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_is( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_is(self, body: Union[_models.IsModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_is. :param body: Is one of the following types: IsModel, JSON, IO[bytes] Required. @@ -2524,7 +2370,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2571,7 +2417,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_lambda( # pylint: disable=inconsistent-return-statements + async def with_lambda( self, body: _models.LambdaModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_lambda. @@ -2587,9 +2433,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements """ @overload - async def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_lambda(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_lambda. :param body: Required. @@ -2603,9 +2447,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements """ @overload - async def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_lambda(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_lambda. :param body: Required. @@ -2618,9 +2460,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.LambdaModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_lambda(self, body: Union[_models.LambdaModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_lambda. :param body: Is one of the following types: LambdaModel, JSON, IO[bytes] Required. @@ -2629,7 +2469,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2676,9 +2516,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_not( # pylint: disable=inconsistent-return-statements - self, body: _models.NotModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_not(self, body: _models.NotModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -2692,9 +2530,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements """ @overload - async def with_not( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_not(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -2708,9 +2544,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements """ @overload - async def with_not( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_not(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -2723,9 +2557,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_not( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.NotModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_not(self, body: Union[_models.NotModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_not. :param body: Is one of the following types: NotModel, JSON, IO[bytes] Required. @@ -2734,7 +2566,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2781,9 +2613,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_or( # pylint: disable=inconsistent-return-statements - self, body: _models.OrModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_or(self, body: _models.OrModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -2797,9 +2627,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements """ @overload - async def with_or( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_or(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -2813,9 +2641,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements """ @overload - async def with_or( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_or(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -2828,9 +2654,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_or( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.OrModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_or(self, body: Union[_models.OrModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_or. :param body: Is one of the following types: OrModel, JSON, IO[bytes] Required. @@ -2839,7 +2663,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2886,7 +2710,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_pass( # pylint: disable=inconsistent-return-statements + async def with_pass( self, body: _models.PassModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_pass. @@ -2902,9 +2726,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements """ @overload - async def with_pass( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_pass(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_pass. :param body: Required. @@ -2918,9 +2740,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements """ @overload - async def with_pass( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_pass(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_pass. :param body: Required. @@ -2933,9 +2753,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_pass( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PassModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_pass(self, body: Union[_models.PassModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_pass. :param body: Is one of the following types: PassModel, JSON, IO[bytes] Required. @@ -2944,7 +2762,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2991,7 +2809,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_raise( # pylint: disable=inconsistent-return-statements + async def with_raise( self, body: _models.RaiseModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_raise. @@ -3007,9 +2825,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements """ @overload - async def with_raise( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_raise(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_raise. :param body: Required. @@ -3023,9 +2839,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements """ @overload - async def with_raise( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_raise(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_raise. :param body: Required. @@ -3038,9 +2852,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_raise( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.RaiseModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_raise(self, body: Union[_models.RaiseModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_raise. :param body: Is one of the following types: RaiseModel, JSON, IO[bytes] Required. @@ -3049,7 +2861,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3096,7 +2908,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_return( # pylint: disable=inconsistent-return-statements + async def with_return( self, body: _models.ReturnModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_return. @@ -3112,9 +2924,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements """ @overload - async def with_return( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_return(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_return. :param body: Required. @@ -3128,9 +2938,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements """ @overload - async def with_return( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_return(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_return. :param body: Required. @@ -3143,9 +2951,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_return( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ReturnModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_return(self, body: Union[_models.ReturnModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_return. :param body: Is one of the following types: ReturnModel, JSON, IO[bytes] Required. @@ -3154,7 +2960,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3201,9 +3007,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_try( # pylint: disable=inconsistent-return-statements - self, body: _models.TryModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_try(self, body: _models.TryModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -3217,9 +3021,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements """ @overload - async def with_try( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_try(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -3233,9 +3035,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements """ @overload - async def with_try( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_try(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -3248,9 +3048,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_try( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.TryModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_try(self, body: Union[_models.TryModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_try. :param body: Is one of the following types: TryModel, JSON, IO[bytes] Required. @@ -3259,7 +3057,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3306,7 +3104,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_while( # pylint: disable=inconsistent-return-statements + async def with_while( self, body: _models.WhileModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_while. @@ -3322,9 +3120,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements """ @overload - async def with_while( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_while(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_while. :param body: Required. @@ -3338,9 +3134,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements """ @overload - async def with_while( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_while(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_while. :param body: Required. @@ -3353,9 +3147,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_while( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.WhileModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_while(self, body: Union[_models.WhileModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_while. :param body: Is one of the following types: WhileModel, JSON, IO[bytes] Required. @@ -3364,7 +3156,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3411,7 +3203,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_with( # pylint: disable=inconsistent-return-statements + async def with_with( self, body: _models.WithModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_with. @@ -3427,9 +3219,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements """ @overload - async def with_with( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_with(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_with. :param body: Required. @@ -3443,9 +3233,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements """ @overload - async def with_with( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_with(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_with. :param body: Required. @@ -3458,9 +3246,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_with( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.WithModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_with(self, body: Union[_models.WithModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_with. :param body: Is one of the following types: WithModel, JSON, IO[bytes] Required. @@ -3469,7 +3255,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3516,7 +3302,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def with_yield( # pylint: disable=inconsistent-return-statements + async def with_yield( self, body: _models.YieldModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_yield. @@ -3532,9 +3318,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements """ @overload - async def with_yield( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_yield(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_yield. :param body: Required. @@ -3548,9 +3332,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements """ @overload - async def with_yield( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def with_yield(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_yield. :param body: Required. @@ -3563,9 +3345,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def with_yield( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.YieldModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def with_yield(self, body: Union[_models.YieldModel, JSON, IO[bytes]], **kwargs: Any) -> None: """with_yield. :param body: Is one of the following types: YieldModel, JSON, IO[bytes] Required. @@ -3574,7 +3354,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3639,7 +3419,7 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - async def same_as_model( # pylint: disable=inconsistent-return-statements + async def same_as_model( self, body: _models.SameAsModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """same_as_model. @@ -3655,9 +3435,7 @@ async def same_as_model( # pylint: disable=inconsistent-return-statements """ @overload - async def same_as_model( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def same_as_model(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """same_as_model. :param body: Required. @@ -3671,9 +3449,7 @@ async def same_as_model( # pylint: disable=inconsistent-return-statements """ @overload - async def same_as_model( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def same_as_model(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """same_as_model. :param body: Required. @@ -3686,9 +3462,7 @@ async def same_as_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def same_as_model( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SameAsModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def same_as_model(self, body: Union[_models.SameAsModel, JSON, IO[bytes]], **kwargs: Any) -> None: """same_as_model. :param body: Is one of the following types: SameAsModel, JSON, IO[bytes] Required. @@ -3697,7 +3471,7 @@ async def same_as_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3761,14 +3535,14 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def and_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def and_method(self, **kwargs: Any) -> None: """and_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3804,14 +3578,14 @@ async def and_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste if cls: return cls(pipeline_response, None, {}) # type: ignore - async def as_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def as_method(self, **kwargs: Any) -> None: """as_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3847,14 +3621,14 @@ async def as_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten if cls: return cls(pipeline_response, None, {}) # type: ignore - async def assert_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def assert_method(self, **kwargs: Any) -> None: """assert_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3890,14 +3664,14 @@ async def assert_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi if cls: return cls(pipeline_response, None, {}) # type: ignore - async def async_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def async_method(self, **kwargs: Any) -> None: """async_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3933,14 +3707,14 @@ async def async_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def await_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def await_method(self, **kwargs: Any) -> None: """await_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3976,14 +3750,14 @@ async def await_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def break_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def break_method(self, **kwargs: Any) -> None: """break_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4019,14 +3793,14 @@ async def break_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def class_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def class_method(self, **kwargs: Any) -> None: """class_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4062,14 +3836,14 @@ async def class_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def constructor(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def constructor(self, **kwargs: Any) -> None: """constructor. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4105,14 +3879,14 @@ async def constructor(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def continue_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def continue_method(self, **kwargs: Any) -> None: """continue_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4148,14 +3922,14 @@ async def continue_method(self, **kwargs: Any) -> None: # pylint: disable=incon if cls: return cls(pipeline_response, None, {}) # type: ignore - async def def_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def def_method(self, **kwargs: Any) -> None: """def_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4191,14 +3965,14 @@ async def def_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste if cls: return cls(pipeline_response, None, {}) # type: ignore - async def del_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def del_method(self, **kwargs: Any) -> None: """del_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4234,14 +4008,14 @@ async def del_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste if cls: return cls(pipeline_response, None, {}) # type: ignore - async def elif_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def elif_method(self, **kwargs: Any) -> None: """elif_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4277,14 +4051,14 @@ async def elif_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def else_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def else_method(self, **kwargs: Any) -> None: """else_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4320,14 +4094,14 @@ async def else_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def except_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def except_method(self, **kwargs: Any) -> None: """except_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4363,14 +4137,14 @@ async def except_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi if cls: return cls(pipeline_response, None, {}) # type: ignore - async def exec_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def exec_method(self, **kwargs: Any) -> None: """exec_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4406,14 +4180,14 @@ async def exec_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def finally_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def finally_method(self, **kwargs: Any) -> None: """finally_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4449,14 +4223,14 @@ async def finally_method(self, **kwargs: Any) -> None: # pylint: disable=incons if cls: return cls(pipeline_response, None, {}) # type: ignore - async def for_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def for_method(self, **kwargs: Any) -> None: """for_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4492,14 +4266,14 @@ async def for_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste if cls: return cls(pipeline_response, None, {}) # type: ignore - async def from_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def from_method(self, **kwargs: Any) -> None: """from_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4535,14 +4309,14 @@ async def from_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def global_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def global_method(self, **kwargs: Any) -> None: """global_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4578,14 +4352,14 @@ async def global_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi if cls: return cls(pipeline_response, None, {}) # type: ignore - async def if_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def if_method(self, **kwargs: Any) -> None: """if_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4621,14 +4395,14 @@ async def if_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten if cls: return cls(pipeline_response, None, {}) # type: ignore - async def import_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def import_method(self, **kwargs: Any) -> None: """import_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4664,14 +4438,14 @@ async def import_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi if cls: return cls(pipeline_response, None, {}) # type: ignore - async def in_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def in_method(self, **kwargs: Any) -> None: """in_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4707,14 +4481,14 @@ async def in_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten if cls: return cls(pipeline_response, None, {}) # type: ignore - async def is_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def is_method(self, **kwargs: Any) -> None: """is_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4750,14 +4524,14 @@ async def is_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten if cls: return cls(pipeline_response, None, {}) # type: ignore - async def lambda_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def lambda_method(self, **kwargs: Any) -> None: """lambda_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4793,14 +4567,14 @@ async def lambda_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi if cls: return cls(pipeline_response, None, {}) # type: ignore - async def not_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def not_method(self, **kwargs: Any) -> None: """not_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4836,14 +4610,14 @@ async def not_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste if cls: return cls(pipeline_response, None, {}) # type: ignore - async def or_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def or_method(self, **kwargs: Any) -> None: """or_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4879,14 +4653,14 @@ async def or_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten if cls: return cls(pipeline_response, None, {}) # type: ignore - async def pass_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def pass_method(self, **kwargs: Any) -> None: """pass_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4922,14 +4696,14 @@ async def pass_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def raise_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def raise_method(self, **kwargs: Any) -> None: """raise_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4965,14 +4739,14 @@ async def raise_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def return_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def return_method(self, **kwargs: Any) -> None: """return_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5008,14 +4782,14 @@ async def return_method(self, **kwargs: Any) -> None: # pylint: disable=inconsi if cls: return cls(pipeline_response, None, {}) # type: ignore - async def try_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def try_method(self, **kwargs: Any) -> None: """try_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5051,14 +4825,14 @@ async def try_method(self, **kwargs: Any) -> None: # pylint: disable=inconsiste if cls: return cls(pipeline_response, None, {}) # type: ignore - async def while_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def while_method(self, **kwargs: Any) -> None: """while_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5094,14 +4868,14 @@ async def while_method(self, **kwargs: Any) -> None: # pylint: disable=inconsis if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def with_method(self, **kwargs: Any) -> None: """with_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5137,14 +4911,14 @@ async def with_method(self, **kwargs: Any) -> None: # pylint: disable=inconsist if cls: return cls(pipeline_response, None, {}) # type: ignore - async def yield_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def yield_method(self, **kwargs: Any) -> None: """yield_method. :return: None :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5198,9 +4972,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def with_and( # pylint: disable=inconsistent-return-statements - self, *, and_parameter: str, **kwargs: Any - ) -> None: + async def with_and(self, *, and_parameter: str, **kwargs: Any) -> None: """with_and. :keyword and_parameter: Required. @@ -5209,7 +4981,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5246,9 +5018,7 @@ async def with_and( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_as( # pylint: disable=inconsistent-return-statements - self, *, as_parameter: str, **kwargs: Any - ) -> None: + async def with_as(self, *, as_parameter: str, **kwargs: Any) -> None: """with_as. :keyword as_parameter: Required. @@ -5257,7 +5027,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5294,9 +5064,7 @@ async def with_as( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_assert( # pylint: disable=inconsistent-return-statements - self, *, assert_parameter: str, **kwargs: Any - ) -> None: + async def with_assert(self, *, assert_parameter: str, **kwargs: Any) -> None: """with_assert. :keyword assert_parameter: Required. @@ -5305,7 +5073,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5342,9 +5110,7 @@ async def with_assert( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_async( # pylint: disable=inconsistent-return-statements - self, *, async_parameter: str, **kwargs: Any - ) -> None: + async def with_async(self, *, async_parameter: str, **kwargs: Any) -> None: """with_async. :keyword async_parameter: Required. @@ -5353,7 +5119,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5390,9 +5156,7 @@ async def with_async( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_await( # pylint: disable=inconsistent-return-statements - self, *, await_parameter: str, **kwargs: Any - ) -> None: + async def with_await(self, *, await_parameter: str, **kwargs: Any) -> None: """with_await. :keyword await_parameter: Required. @@ -5401,7 +5165,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5438,9 +5202,7 @@ async def with_await( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_break( # pylint: disable=inconsistent-return-statements - self, *, break_parameter: str, **kwargs: Any - ) -> None: + async def with_break(self, *, break_parameter: str, **kwargs: Any) -> None: """with_break. :keyword break_parameter: Required. @@ -5449,7 +5211,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5486,9 +5248,7 @@ async def with_break( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_class( # pylint: disable=inconsistent-return-statements - self, *, class_parameter: str, **kwargs: Any - ) -> None: + async def with_class(self, *, class_parameter: str, **kwargs: Any) -> None: """with_class. :keyword class_parameter: Required. @@ -5497,7 +5257,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5534,9 +5294,7 @@ async def with_class( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_constructor( # pylint: disable=inconsistent-return-statements - self, *, constructor: str, **kwargs: Any - ) -> None: + async def with_constructor(self, *, constructor: str, **kwargs: Any) -> None: """with_constructor. :keyword constructor: Required. @@ -5545,7 +5303,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5582,9 +5340,7 @@ async def with_constructor( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_continue( # pylint: disable=inconsistent-return-statements - self, *, continue_parameter: str, **kwargs: Any - ) -> None: + async def with_continue(self, *, continue_parameter: str, **kwargs: Any) -> None: """with_continue. :keyword continue_parameter: Required. @@ -5593,7 +5349,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5630,9 +5386,7 @@ async def with_continue( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_def( # pylint: disable=inconsistent-return-statements - self, *, def_parameter: str, **kwargs: Any - ) -> None: + async def with_def(self, *, def_parameter: str, **kwargs: Any) -> None: """with_def. :keyword def_parameter: Required. @@ -5641,7 +5395,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5678,9 +5432,7 @@ async def with_def( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_del( # pylint: disable=inconsistent-return-statements - self, *, del_parameter: str, **kwargs: Any - ) -> None: + async def with_del(self, *, del_parameter: str, **kwargs: Any) -> None: """with_del. :keyword del_parameter: Required. @@ -5689,7 +5441,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5726,9 +5478,7 @@ async def with_del( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_elif( # pylint: disable=inconsistent-return-statements - self, *, elif_parameter: str, **kwargs: Any - ) -> None: + async def with_elif(self, *, elif_parameter: str, **kwargs: Any) -> None: """with_elif. :keyword elif_parameter: Required. @@ -5737,7 +5487,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5774,9 +5524,7 @@ async def with_elif( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_else( # pylint: disable=inconsistent-return-statements - self, *, else_parameter: str, **kwargs: Any - ) -> None: + async def with_else(self, *, else_parameter: str, **kwargs: Any) -> None: """with_else. :keyword else_parameter: Required. @@ -5785,7 +5533,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5822,9 +5570,7 @@ async def with_else( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_except( # pylint: disable=inconsistent-return-statements - self, *, except_parameter: str, **kwargs: Any - ) -> None: + async def with_except(self, *, except_parameter: str, **kwargs: Any) -> None: """with_except. :keyword except_parameter: Required. @@ -5833,7 +5579,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5870,9 +5616,7 @@ async def with_except( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_exec( # pylint: disable=inconsistent-return-statements - self, *, exec_parameter: str, **kwargs: Any - ) -> None: + async def with_exec(self, *, exec_parameter: str, **kwargs: Any) -> None: """with_exec. :keyword exec_parameter: Required. @@ -5881,7 +5625,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5918,9 +5662,7 @@ async def with_exec( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_finally( # pylint: disable=inconsistent-return-statements - self, *, finally_parameter: str, **kwargs: Any - ) -> None: + async def with_finally(self, *, finally_parameter: str, **kwargs: Any) -> None: """with_finally. :keyword finally_parameter: Required. @@ -5929,7 +5671,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5966,9 +5708,7 @@ async def with_finally( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_for( # pylint: disable=inconsistent-return-statements - self, *, for_parameter: str, **kwargs: Any - ) -> None: + async def with_for(self, *, for_parameter: str, **kwargs: Any) -> None: """with_for. :keyword for_parameter: Required. @@ -5977,7 +5717,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6014,9 +5754,7 @@ async def with_for( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_from( # pylint: disable=inconsistent-return-statements - self, *, from_parameter: str, **kwargs: Any - ) -> None: + async def with_from(self, *, from_parameter: str, **kwargs: Any) -> None: """with_from. :keyword from_parameter: Required. @@ -6025,7 +5763,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6062,9 +5800,7 @@ async def with_from( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_global( # pylint: disable=inconsistent-return-statements - self, *, global_parameter: str, **kwargs: Any - ) -> None: + async def with_global(self, *, global_parameter: str, **kwargs: Any) -> None: """with_global. :keyword global_parameter: Required. @@ -6073,7 +5809,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6110,9 +5846,7 @@ async def with_global( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_if( # pylint: disable=inconsistent-return-statements - self, *, if_parameter: str, **kwargs: Any - ) -> None: + async def with_if(self, *, if_parameter: str, **kwargs: Any) -> None: """with_if. :keyword if_parameter: Required. @@ -6121,7 +5855,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6158,9 +5892,7 @@ async def with_if( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_import( # pylint: disable=inconsistent-return-statements - self, *, import_parameter: str, **kwargs: Any - ) -> None: + async def with_import(self, *, import_parameter: str, **kwargs: Any) -> None: """with_import. :keyword import_parameter: Required. @@ -6169,7 +5901,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6206,9 +5938,7 @@ async def with_import( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_in( # pylint: disable=inconsistent-return-statements - self, *, in_parameter: str, **kwargs: Any - ) -> None: + async def with_in(self, *, in_parameter: str, **kwargs: Any) -> None: """with_in. :keyword in_parameter: Required. @@ -6217,7 +5947,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6254,9 +5984,7 @@ async def with_in( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_is( # pylint: disable=inconsistent-return-statements - self, *, is_parameter: str, **kwargs: Any - ) -> None: + async def with_is(self, *, is_parameter: str, **kwargs: Any) -> None: """with_is. :keyword is_parameter: Required. @@ -6265,7 +5993,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6302,9 +6030,7 @@ async def with_is( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_lambda( # pylint: disable=inconsistent-return-statements - self, *, lambda_parameter: str, **kwargs: Any - ) -> None: + async def with_lambda(self, *, lambda_parameter: str, **kwargs: Any) -> None: """with_lambda. :keyword lambda_parameter: Required. @@ -6313,7 +6039,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6350,9 +6076,7 @@ async def with_lambda( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_not( # pylint: disable=inconsistent-return-statements - self, *, not_parameter: str, **kwargs: Any - ) -> None: + async def with_not(self, *, not_parameter: str, **kwargs: Any) -> None: """with_not. :keyword not_parameter: Required. @@ -6361,7 +6085,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6398,9 +6122,7 @@ async def with_not( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_or( # pylint: disable=inconsistent-return-statements - self, *, or_parameter: str, **kwargs: Any - ) -> None: + async def with_or(self, *, or_parameter: str, **kwargs: Any) -> None: """with_or. :keyword or_parameter: Required. @@ -6409,7 +6131,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6446,9 +6168,7 @@ async def with_or( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_pass( # pylint: disable=inconsistent-return-statements - self, *, pass_parameter: str, **kwargs: Any - ) -> None: + async def with_pass(self, *, pass_parameter: str, **kwargs: Any) -> None: """with_pass. :keyword pass_parameter: Required. @@ -6457,7 +6177,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6494,9 +6214,7 @@ async def with_pass( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_raise( # pylint: disable=inconsistent-return-statements - self, *, raise_parameter: str, **kwargs: Any - ) -> None: + async def with_raise(self, *, raise_parameter: str, **kwargs: Any) -> None: """with_raise. :keyword raise_parameter: Required. @@ -6505,7 +6223,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6542,9 +6260,7 @@ async def with_raise( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_return( # pylint: disable=inconsistent-return-statements - self, *, return_parameter: str, **kwargs: Any - ) -> None: + async def with_return(self, *, return_parameter: str, **kwargs: Any) -> None: """with_return. :keyword return_parameter: Required. @@ -6553,7 +6269,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6590,9 +6306,7 @@ async def with_return( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_try( # pylint: disable=inconsistent-return-statements - self, *, try_parameter: str, **kwargs: Any - ) -> None: + async def with_try(self, *, try_parameter: str, **kwargs: Any) -> None: """with_try. :keyword try_parameter: Required. @@ -6601,7 +6315,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6638,9 +6352,7 @@ async def with_try( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_while( # pylint: disable=inconsistent-return-statements - self, *, while_parameter: str, **kwargs: Any - ) -> None: + async def with_while(self, *, while_parameter: str, **kwargs: Any) -> None: """with_while. :keyword while_parameter: Required. @@ -6649,7 +6361,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6686,9 +6398,7 @@ async def with_while( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_with( # pylint: disable=inconsistent-return-statements - self, *, with_parameter: str, **kwargs: Any - ) -> None: + async def with_with(self, *, with_parameter: str, **kwargs: Any) -> None: """with_with. :keyword with_parameter: Required. @@ -6697,7 +6407,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6734,9 +6444,7 @@ async def with_with( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_yield( # pylint: disable=inconsistent-return-statements - self, *, yield_parameter: str, **kwargs: Any - ) -> None: + async def with_yield(self, *, yield_parameter: str, **kwargs: Any) -> None: """with_yield. :keyword yield_parameter: Required. @@ -6745,7 +6453,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6782,9 +6490,7 @@ async def with_yield( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def with_cancellation_token( # pylint: disable=inconsistent-return-statements - self, *, cancellation_token: str, **kwargs: Any - ) -> None: + async def with_cancellation_token(self, *, cancellation_token: str, **kwargs: Any) -> None: """with_cancellation_token. :keyword cancellation_token: Required. @@ -6793,7 +6499,7 @@ async def with_cancellation_token( # pylint: disable=inconsistent-return-statem :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/_models.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/_models.py index e0cf4a93c9e..8422fe1f587 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/_models.py @@ -1,5 +1,5 @@ -# coding=utf-8 # pylint: disable=too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/_operations.py index c7ea927bade..c2995e1b081 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -30,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -1176,9 +1176,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def with_and( # pylint: disable=inconsistent-return-statements - self, body: _models.AndModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_and(self, body: _models.AndModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -1192,9 +1190,7 @@ def with_and( # pylint: disable=inconsistent-return-statements """ @overload - def with_and( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_and(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -1208,9 +1204,7 @@ def with_and( # pylint: disable=inconsistent-return-statements """ @overload - def with_and( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_and(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_and. :param body: Required. @@ -1234,7 +1228,7 @@ def with_and( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1281,9 +1275,7 @@ def with_and( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_as( # pylint: disable=inconsistent-return-statements - self, body: _models.AsModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_as(self, body: _models.AsModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -1297,9 +1289,7 @@ def with_as( # pylint: disable=inconsistent-return-statements """ @overload - def with_as( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_as(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -1313,9 +1303,7 @@ def with_as( # pylint: disable=inconsistent-return-statements """ @overload - def with_as( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_as(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_as. :param body: Required. @@ -1339,7 +1327,7 @@ def with_as( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1386,9 +1374,7 @@ def with_as( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_assert( # pylint: disable=inconsistent-return-statements - self, body: _models.AssertModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_assert(self, body: _models.AssertModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_assert. :param body: Required. @@ -1402,9 +1388,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements """ @overload - def with_assert( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_assert(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_assert. :param body: Required. @@ -1418,9 +1402,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements """ @overload - def with_assert( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_assert(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_assert. :param body: Required. @@ -1444,7 +1426,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,9 +1473,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_async( # pylint: disable=inconsistent-return-statements - self, body: _models.AsyncModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_async(self, body: _models.AsyncModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_async. :param body: Required. @@ -1507,9 +1487,7 @@ def with_async( # pylint: disable=inconsistent-return-statements """ @overload - def with_async( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_async(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_async. :param body: Required. @@ -1523,9 +1501,7 @@ def with_async( # pylint: disable=inconsistent-return-statements """ @overload - def with_async( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_async(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_async. :param body: Required. @@ -1549,7 +1525,7 @@ def with_async( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1596,9 +1572,7 @@ def with_async( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_await( # pylint: disable=inconsistent-return-statements - self, body: _models.AwaitModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_await(self, body: _models.AwaitModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_await. :param body: Required. @@ -1612,9 +1586,7 @@ def with_await( # pylint: disable=inconsistent-return-statements """ @overload - def with_await( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_await(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_await. :param body: Required. @@ -1628,9 +1600,7 @@ def with_await( # pylint: disable=inconsistent-return-statements """ @overload - def with_await( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_await(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_await. :param body: Required. @@ -1654,7 +1624,7 @@ def with_await( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1701,9 +1671,7 @@ def with_await( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_break( # pylint: disable=inconsistent-return-statements - self, body: _models.BreakModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_break(self, body: _models.BreakModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_break. :param body: Required. @@ -1717,9 +1685,7 @@ def with_break( # pylint: disable=inconsistent-return-statements """ @overload - def with_break( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_break(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_break. :param body: Required. @@ -1733,9 +1699,7 @@ def with_break( # pylint: disable=inconsistent-return-statements """ @overload - def with_break( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_break(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_break. :param body: Required. @@ -1759,7 +1723,7 @@ def with_break( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1806,9 +1770,7 @@ def with_break( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_class( # pylint: disable=inconsistent-return-statements - self, body: _models.ClassModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_class(self, body: _models.ClassModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_class. :param body: Required. @@ -1822,9 +1784,7 @@ def with_class( # pylint: disable=inconsistent-return-statements """ @overload - def with_class( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_class(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_class. :param body: Required. @@ -1838,9 +1798,7 @@ def with_class( # pylint: disable=inconsistent-return-statements """ @overload - def with_class( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_class(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_class. :param body: Required. @@ -1864,7 +1822,7 @@ def with_class( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1911,7 +1869,7 @@ def with_class( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_constructor( # pylint: disable=inconsistent-return-statements + def with_constructor( self, body: _models.Constructor, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_constructor. @@ -1927,9 +1885,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements """ @overload - def with_constructor( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_constructor(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_constructor. :param body: Required. @@ -1943,9 +1899,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements """ @overload - def with_constructor( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_constructor(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_constructor. :param body: Required. @@ -1969,7 +1923,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2016,7 +1970,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_continue( # pylint: disable=inconsistent-return-statements + def with_continue( self, body: _models.ContinueModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_continue. @@ -2032,9 +1986,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements """ @overload - def with_continue( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_continue(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_continue. :param body: Required. @@ -2048,9 +2000,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements """ @overload - def with_continue( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_continue(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_continue. :param body: Required. @@ -2074,7 +2024,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2121,9 +2071,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_def( # pylint: disable=inconsistent-return-statements - self, body: _models.DefModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_def(self, body: _models.DefModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -2137,9 +2085,7 @@ def with_def( # pylint: disable=inconsistent-return-statements """ @overload - def with_def( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_def(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -2153,9 +2099,7 @@ def with_def( # pylint: disable=inconsistent-return-statements """ @overload - def with_def( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_def(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_def. :param body: Required. @@ -2179,7 +2123,7 @@ def with_def( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2226,9 +2170,7 @@ def with_def( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_del( # pylint: disable=inconsistent-return-statements - self, body: _models.DelModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_del(self, body: _models.DelModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -2242,9 +2184,7 @@ def with_del( # pylint: disable=inconsistent-return-statements """ @overload - def with_del( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_del(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -2258,9 +2198,7 @@ def with_del( # pylint: disable=inconsistent-return-statements """ @overload - def with_del( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_del(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_del. :param body: Required. @@ -2284,7 +2222,7 @@ def with_del( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2331,9 +2269,7 @@ def with_del( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_elif( # pylint: disable=inconsistent-return-statements - self, body: _models.ElifModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_elif(self, body: _models.ElifModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_elif. :param body: Required. @@ -2347,9 +2283,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements """ @overload - def with_elif( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_elif(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_elif. :param body: Required. @@ -2363,9 +2297,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements """ @overload - def with_elif( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_elif(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_elif. :param body: Required. @@ -2389,7 +2321,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2436,9 +2368,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_else( # pylint: disable=inconsistent-return-statements - self, body: _models.ElseModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_else(self, body: _models.ElseModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_else. :param body: Required. @@ -2452,9 +2382,7 @@ def with_else( # pylint: disable=inconsistent-return-statements """ @overload - def with_else( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_else(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_else. :param body: Required. @@ -2468,9 +2396,7 @@ def with_else( # pylint: disable=inconsistent-return-statements """ @overload - def with_else( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_else(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_else. :param body: Required. @@ -2494,7 +2420,7 @@ def with_else( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2541,9 +2467,7 @@ def with_else( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_except( # pylint: disable=inconsistent-return-statements - self, body: _models.ExceptModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_except(self, body: _models.ExceptModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_except. :param body: Required. @@ -2557,9 +2481,7 @@ def with_except( # pylint: disable=inconsistent-return-statements """ @overload - def with_except( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_except(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_except. :param body: Required. @@ -2573,9 +2495,7 @@ def with_except( # pylint: disable=inconsistent-return-statements """ @overload - def with_except( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_except(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_except. :param body: Required. @@ -2599,7 +2519,7 @@ def with_except( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2646,9 +2566,7 @@ def with_except( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_exec( # pylint: disable=inconsistent-return-statements - self, body: _models.ExecModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_exec(self, body: _models.ExecModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_exec. :param body: Required. @@ -2662,9 +2580,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements """ @overload - def with_exec( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_exec(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_exec. :param body: Required. @@ -2678,9 +2594,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements """ @overload - def with_exec( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_exec(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_exec. :param body: Required. @@ -2704,7 +2618,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2751,7 +2665,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_finally( # pylint: disable=inconsistent-return-statements + def with_finally( self, body: _models.FinallyModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """with_finally. @@ -2767,9 +2681,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements """ @overload - def with_finally( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_finally(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_finally. :param body: Required. @@ -2783,9 +2695,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements """ @overload - def with_finally( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_finally(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_finally. :param body: Required. @@ -2809,7 +2719,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2856,9 +2766,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_for( # pylint: disable=inconsistent-return-statements - self, body: _models.ForModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_for(self, body: _models.ForModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -2872,9 +2780,7 @@ def with_for( # pylint: disable=inconsistent-return-statements """ @overload - def with_for( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_for(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -2888,9 +2794,7 @@ def with_for( # pylint: disable=inconsistent-return-statements """ @overload - def with_for( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_for(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_for. :param body: Required. @@ -2914,7 +2818,7 @@ def with_for( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2961,9 +2865,7 @@ def with_for( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_from( # pylint: disable=inconsistent-return-statements - self, body: _models.FromModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_from(self, body: _models.FromModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_from. :param body: Required. @@ -2977,9 +2879,7 @@ def with_from( # pylint: disable=inconsistent-return-statements """ @overload - def with_from( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_from(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_from. :param body: Required. @@ -2993,9 +2893,7 @@ def with_from( # pylint: disable=inconsistent-return-statements """ @overload - def with_from( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_from(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_from. :param body: Required. @@ -3019,7 +2917,7 @@ def with_from( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3066,9 +2964,7 @@ def with_from( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_global( # pylint: disable=inconsistent-return-statements - self, body: _models.GlobalModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_global(self, body: _models.GlobalModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_global. :param body: Required. @@ -3082,9 +2978,7 @@ def with_global( # pylint: disable=inconsistent-return-statements """ @overload - def with_global( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_global(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_global. :param body: Required. @@ -3098,9 +2992,7 @@ def with_global( # pylint: disable=inconsistent-return-statements """ @overload - def with_global( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_global(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_global. :param body: Required. @@ -3124,7 +3016,7 @@ def with_global( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3171,9 +3063,7 @@ def with_global( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_if( # pylint: disable=inconsistent-return-statements - self, body: _models.IfModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_if(self, body: _models.IfModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -3187,9 +3077,7 @@ def with_if( # pylint: disable=inconsistent-return-statements """ @overload - def with_if( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_if(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -3203,9 +3091,7 @@ def with_if( # pylint: disable=inconsistent-return-statements """ @overload - def with_if( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_if(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_if. :param body: Required. @@ -3229,7 +3115,7 @@ def with_if( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3276,9 +3162,7 @@ def with_if( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_import( # pylint: disable=inconsistent-return-statements - self, body: _models.ImportModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_import(self, body: _models.ImportModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_import. :param body: Required. @@ -3292,9 +3176,7 @@ def with_import( # pylint: disable=inconsistent-return-statements """ @overload - def with_import( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_import(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_import. :param body: Required. @@ -3308,9 +3190,7 @@ def with_import( # pylint: disable=inconsistent-return-statements """ @overload - def with_import( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_import(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_import. :param body: Required. @@ -3334,7 +3214,7 @@ def with_import( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3381,9 +3261,7 @@ def with_import( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_in( # pylint: disable=inconsistent-return-statements - self, body: _models.InModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_in(self, body: _models.InModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -3397,9 +3275,7 @@ def with_in( # pylint: disable=inconsistent-return-statements """ @overload - def with_in( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_in(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -3413,9 +3289,7 @@ def with_in( # pylint: disable=inconsistent-return-statements """ @overload - def with_in( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_in(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_in. :param body: Required. @@ -3439,7 +3313,7 @@ def with_in( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3486,9 +3360,7 @@ def with_in( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_is( # pylint: disable=inconsistent-return-statements - self, body: _models.IsModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_is(self, body: _models.IsModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -3502,9 +3374,7 @@ def with_is( # pylint: disable=inconsistent-return-statements """ @overload - def with_is( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_is(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -3518,9 +3388,7 @@ def with_is( # pylint: disable=inconsistent-return-statements """ @overload - def with_is( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_is(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_is. :param body: Required. @@ -3544,7 +3412,7 @@ def with_is( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3591,9 +3459,7 @@ def with_is( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: _models.LambdaModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_lambda(self, body: _models.LambdaModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_lambda. :param body: Required. @@ -3607,9 +3473,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements """ @overload - def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_lambda(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_lambda. :param body: Required. @@ -3623,9 +3487,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements """ @overload - def with_lambda( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_lambda(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_lambda. :param body: Required. @@ -3649,7 +3511,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3696,9 +3558,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_not( # pylint: disable=inconsistent-return-statements - self, body: _models.NotModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_not(self, body: _models.NotModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -3712,9 +3572,7 @@ def with_not( # pylint: disable=inconsistent-return-statements """ @overload - def with_not( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_not(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -3728,9 +3586,7 @@ def with_not( # pylint: disable=inconsistent-return-statements """ @overload - def with_not( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_not(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_not. :param body: Required. @@ -3754,7 +3610,7 @@ def with_not( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3801,9 +3657,7 @@ def with_not( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_or( # pylint: disable=inconsistent-return-statements - self, body: _models.OrModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_or(self, body: _models.OrModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -3817,9 +3671,7 @@ def with_or( # pylint: disable=inconsistent-return-statements """ @overload - def with_or( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_or(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -3833,9 +3685,7 @@ def with_or( # pylint: disable=inconsistent-return-statements """ @overload - def with_or( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_or(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_or. :param body: Required. @@ -3859,7 +3709,7 @@ def with_or( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3906,9 +3756,7 @@ def with_or( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_pass( # pylint: disable=inconsistent-return-statements - self, body: _models.PassModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_pass(self, body: _models.PassModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_pass. :param body: Required. @@ -3922,9 +3770,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements """ @overload - def with_pass( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_pass(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_pass. :param body: Required. @@ -3938,9 +3784,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements """ @overload - def with_pass( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_pass(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_pass. :param body: Required. @@ -3964,7 +3808,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4011,9 +3855,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_raise( # pylint: disable=inconsistent-return-statements - self, body: _models.RaiseModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_raise(self, body: _models.RaiseModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_raise. :param body: Required. @@ -4027,9 +3869,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements """ @overload - def with_raise( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_raise(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_raise. :param body: Required. @@ -4043,9 +3883,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements """ @overload - def with_raise( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_raise(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_raise. :param body: Required. @@ -4069,7 +3907,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4116,9 +3954,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_return( # pylint: disable=inconsistent-return-statements - self, body: _models.ReturnModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_return(self, body: _models.ReturnModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_return. :param body: Required. @@ -4132,9 +3968,7 @@ def with_return( # pylint: disable=inconsistent-return-statements """ @overload - def with_return( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_return(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_return. :param body: Required. @@ -4148,9 +3982,7 @@ def with_return( # pylint: disable=inconsistent-return-statements """ @overload - def with_return( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_return(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_return. :param body: Required. @@ -4174,7 +4006,7 @@ def with_return( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4221,9 +4053,7 @@ def with_return( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_try( # pylint: disable=inconsistent-return-statements - self, body: _models.TryModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_try(self, body: _models.TryModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -4237,9 +4067,7 @@ def with_try( # pylint: disable=inconsistent-return-statements """ @overload - def with_try( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_try(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -4253,9 +4081,7 @@ def with_try( # pylint: disable=inconsistent-return-statements """ @overload - def with_try( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_try(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_try. :param body: Required. @@ -4279,7 +4105,7 @@ def with_try( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4326,9 +4152,7 @@ def with_try( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_while( # pylint: disable=inconsistent-return-statements - self, body: _models.WhileModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_while(self, body: _models.WhileModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_while. :param body: Required. @@ -4342,9 +4166,7 @@ def with_while( # pylint: disable=inconsistent-return-statements """ @overload - def with_while( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_while(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_while. :param body: Required. @@ -4358,9 +4180,7 @@ def with_while( # pylint: disable=inconsistent-return-statements """ @overload - def with_while( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_while(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_while. :param body: Required. @@ -4384,7 +4204,7 @@ def with_while( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4431,9 +4251,7 @@ def with_while( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_with( # pylint: disable=inconsistent-return-statements - self, body: _models.WithModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_with(self, body: _models.WithModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_with. :param body: Required. @@ -4447,9 +4265,7 @@ def with_with( # pylint: disable=inconsistent-return-statements """ @overload - def with_with( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_with(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_with. :param body: Required. @@ -4463,9 +4279,7 @@ def with_with( # pylint: disable=inconsistent-return-statements """ @overload - def with_with( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_with(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_with. :param body: Required. @@ -4489,7 +4303,7 @@ def with_with( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4536,9 +4350,7 @@ def with_with( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def with_yield( # pylint: disable=inconsistent-return-statements - self, body: _models.YieldModel, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_yield(self, body: _models.YieldModel, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_yield. :param body: Required. @@ -4552,9 +4364,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements """ @overload - def with_yield( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_yield(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """with_yield. :param body: Required. @@ -4568,9 +4378,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements """ @overload - def with_yield( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def with_yield(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """with_yield. :param body: Required. @@ -4594,7 +4402,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4659,7 +4467,7 @@ def __init__(self, *args, **kwargs): self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload - def same_as_model( # pylint: disable=inconsistent-return-statements + def same_as_model( self, body: _models.SameAsModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """same_as_model. @@ -4675,9 +4483,7 @@ def same_as_model( # pylint: disable=inconsistent-return-statements """ @overload - def same_as_model( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def same_as_model(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """same_as_model. :param body: Required. @@ -4691,9 +4497,7 @@ def same_as_model( # pylint: disable=inconsistent-return-statements """ @overload - def same_as_model( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def same_as_model(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """same_as_model. :param body: Required. @@ -4717,7 +4521,7 @@ def same_as_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4788,7 +4592,7 @@ def and_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4831,7 +4635,7 @@ def as_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4874,7 +4678,7 @@ def assert_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4917,7 +4721,7 @@ def async_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4960,7 +4764,7 @@ def await_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5003,7 +4807,7 @@ def break_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5046,7 +4850,7 @@ def class_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5089,7 +4893,7 @@ def constructor(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5132,7 +4936,7 @@ def continue_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5175,7 +4979,7 @@ def def_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5218,7 +5022,7 @@ def del_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5261,7 +5065,7 @@ def elif_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5304,7 +5108,7 @@ def else_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5347,7 +5151,7 @@ def except_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5390,7 +5194,7 @@ def exec_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5433,7 +5237,7 @@ def finally_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5476,7 +5280,7 @@ def for_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5519,7 +5323,7 @@ def from_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5562,7 +5366,7 @@ def global_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5605,7 +5409,7 @@ def if_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5648,7 +5452,7 @@ def import_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5691,7 +5495,7 @@ def in_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5734,7 +5538,7 @@ def is_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5777,7 +5581,7 @@ def lambda_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5820,7 +5624,7 @@ def not_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5863,7 +5667,7 @@ def or_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5906,7 +5710,7 @@ def pass_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5949,7 +5753,7 @@ def raise_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5992,7 +5796,7 @@ def return_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6035,7 +5839,7 @@ def try_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6078,7 +5882,7 @@ def while_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6121,7 +5925,7 @@ def with_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6164,7 +5968,7 @@ def yield_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6227,7 +6031,7 @@ def with_and(self, *, and_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6273,7 +6077,7 @@ def with_as(self, *, as_parameter: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6321,7 +6125,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6369,7 +6173,7 @@ def with_async( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6417,7 +6221,7 @@ def with_await( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6465,7 +6269,7 @@ def with_break( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6513,7 +6317,7 @@ def with_class( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6561,7 +6365,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6609,7 +6413,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6655,7 +6459,7 @@ def with_def(self, *, def_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6701,7 +6505,7 @@ def with_del(self, *, del_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6749,7 +6553,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6797,7 +6601,7 @@ def with_else( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6845,7 +6649,7 @@ def with_except( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6893,7 +6697,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6941,7 +6745,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6987,7 +6791,7 @@ def with_for(self, *, for_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7035,7 +6839,7 @@ def with_from( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7083,7 +6887,7 @@ def with_global( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7129,7 +6933,7 @@ def with_if(self, *, if_parameter: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7177,7 +6981,7 @@ def with_import( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7223,7 +7027,7 @@ def with_in(self, *, in_parameter: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7269,7 +7073,7 @@ def with_is(self, *, is_parameter: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7317,7 +7121,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7363,7 +7167,7 @@ def with_not(self, *, not_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7409,7 +7213,7 @@ def with_or(self, *, or_parameter: str, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7457,7 +7261,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7505,7 +7309,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7553,7 +7357,7 @@ def with_return( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7599,7 +7403,7 @@ def with_try(self, *, try_parameter: str, **kwargs: Any) -> None: # pylint: dis :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7647,7 +7451,7 @@ def with_while( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7695,7 +7499,7 @@ def with_with( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7743,7 +7547,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7791,7 +7595,7 @@ def with_cancellation_token( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_configuration.py b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_configuration.py index 30c0d2c547b..d847d11cc00 100644 --- a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class TemplatedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TemplatedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TemplatedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_model_base.py b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_operations/_operations.py index de8eddd921e..15f1f286e49 100644 --- a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -150,7 +149,7 @@ def numeric_type(self, input: Union[_models.Int32Type, JSON, IO[bytes]], **kwarg :rtype: ~type.model.templated.models.Int32Type :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +266,7 @@ def float32_type( :rtype: ~type.model.templated.models.Float32ValuesType :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -384,7 +383,7 @@ def int32_type( :rtype: ~type.model.templated.models.Int32ValuesType :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_serialization.py b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_vendor.py b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_vendor.py index 05eb7acf494..fd15832a3d7 100644 --- a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import TemplatedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_configuration.py index bfc99d1d1bb..4e2dd061d24 100644 --- a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class TemplatedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TemplatedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TemplatedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_operations/_operations.py index 7a2a748b011..9be3f59d9a5 100644 --- a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -102,7 +101,7 @@ async def numeric_type(self, input: Union[_models.Int32Type, JSON, IO[bytes]], * :rtype: ~type.model.templated.models.Int32Type :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -219,7 +218,7 @@ async def float32_type( :rtype: ~type.model.templated.models.Float32ValuesType :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -336,7 +335,7 @@ async def int32_type( :rtype: ~type.model.templated.models.Int32ValuesType :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_vendor.py index a963de7386e..be4faa323e3 100644 --- a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import TemplatedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/models/_models.py b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/models/_models.py index d77a49c20cd..e4712bd66c5 100644 --- a/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/type-model-templated/type/model/templated/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/_operations.py index 9a0d8ccbc6a..990ab8dcb69 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -62,7 +62,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -91,7 +91,7 @@ async def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -140,9 +140,7 @@ async def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -156,9 +154,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -171,9 +167,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [int] type or a IO[bytes] type. Required. @@ -182,7 +176,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +247,7 @@ async def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -302,9 +296,7 @@ async def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -318,9 +310,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -333,9 +323,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [int] type or a IO[bytes] type. Required. @@ -344,7 +332,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -415,7 +403,7 @@ async def get(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -464,9 +452,7 @@ async def get(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -480,9 +466,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -495,9 +479,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[bool], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [bool] type or a IO[bytes] type. Required. @@ -506,7 +488,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -577,7 +559,7 @@ async def get(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -626,9 +608,7 @@ async def get(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -642,9 +622,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -657,9 +635,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [str] type or a IO[bytes] type. Required. @@ -668,7 +644,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -739,7 +715,7 @@ async def get(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -788,9 +764,7 @@ async def get(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -804,9 +778,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -819,9 +791,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[float], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[float], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [float] type or a IO[bytes] type. Required. @@ -830,7 +800,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -901,7 +871,7 @@ async def get(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -950,7 +920,7 @@ async def get(self, **kwargs: Any) -> List[datetime.datetime]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -966,9 +936,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -981,9 +949,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[datetime.datetime], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [datetime.datetime] type or a IO[bytes] type. Required. @@ -992,7 +958,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1063,7 +1029,7 @@ async def get(self, **kwargs: Any) -> List[datetime.timedelta]: :rtype: list[~datetime.timedelta] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1112,7 +1078,7 @@ async def get(self, **kwargs: Any) -> List[datetime.timedelta]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1128,9 +1094,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1143,9 +1107,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[datetime.timedelta], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[datetime.timedelta], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [datetime.timedelta] type or a IO[bytes] type. Required. @@ -1154,7 +1116,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1225,7 +1187,7 @@ async def get(self, **kwargs: Any) -> List[Any]: :rtype: list[any] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1274,9 +1236,7 @@ async def get(self, **kwargs: Any) -> List[Any]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[Any], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[Any], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1290,9 +1250,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1305,9 +1263,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[Any], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[Any], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [Any] type or a IO[bytes] type. Required. @@ -1316,7 +1272,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1387,7 +1343,7 @@ async def get(self, **kwargs: Any) -> List[_models.InnerModel]: :rtype: list[~typetest.array.models.InnerModel] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1436,7 +1392,7 @@ async def get(self, **kwargs: Any) -> List[_models.InnerModel]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1452,9 +1408,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1467,9 +1421,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[_models.InnerModel], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[_models.InnerModel], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [InnerModel] type or a IO[bytes] type. Required. @@ -1478,7 +1430,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1549,7 +1501,7 @@ async def get(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1598,9 +1550,7 @@ async def get(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1614,9 +1564,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1629,9 +1577,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[float], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[float], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [float] type or a IO[bytes] type. Required. @@ -1640,7 +1586,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1711,7 +1657,7 @@ async def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1760,9 +1706,7 @@ async def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1776,9 +1720,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1791,9 +1733,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[int], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [int] type or a IO[bytes] type. Required. @@ -1802,7 +1742,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1873,7 +1813,7 @@ async def get(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1922,9 +1862,7 @@ async def get(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1938,9 +1876,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1953,9 +1889,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[bool], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [bool] type or a IO[bytes] type. Required. @@ -1964,7 +1898,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2035,7 +1969,7 @@ async def get(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2084,9 +2018,7 @@ async def get(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2100,9 +2032,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2115,9 +2045,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[str], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[str], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [str] type or a IO[bytes] type. Required. @@ -2126,7 +2054,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2197,7 +2125,7 @@ async def get(self, **kwargs: Any) -> List[_models.InnerModel]: :rtype: list[~typetest.array.models.InnerModel] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2246,7 +2174,7 @@ async def get(self, **kwargs: Any) -> List[_models.InnerModel]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -2262,9 +2190,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2277,9 +2203,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[List[_models.InnerModel], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[List[_models.InnerModel], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a [InnerModel] type or a IO[bytes] type. Required. @@ -2288,7 +2212,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/models/_models.py index a19b6981acf..a1fbf557299 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/_operations.py index c07ba6fb9ec..083c8ed0534 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -457,7 +457,7 @@ def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -506,9 +506,7 @@ def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -522,9 +520,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -548,7 +544,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -619,7 +615,7 @@ def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -668,9 +664,7 @@ def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -684,9 +678,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -710,7 +702,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -781,7 +773,7 @@ def get(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -830,9 +822,7 @@ def get(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -846,9 +836,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -872,7 +860,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -943,7 +931,7 @@ def get(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -992,9 +980,7 @@ def get(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1008,9 +994,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1034,7 +1018,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1105,7 +1089,7 @@ def get(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1154,9 +1138,7 @@ def get(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1170,9 +1152,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1196,7 +1176,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1267,7 +1247,7 @@ def get(self, **kwargs: Any) -> List[datetime.datetime]: :rtype: list[~datetime.datetime] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1316,9 +1296,7 @@ def get(self, **kwargs: Any) -> List[datetime.datetime]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[datetime.datetime], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1332,9 +1310,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1358,7 +1334,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1429,7 +1405,7 @@ def get(self, **kwargs: Any) -> List[datetime.timedelta]: :rtype: list[~datetime.timedelta] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1478,9 +1454,7 @@ def get(self, **kwargs: Any) -> List[datetime.timedelta]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1494,9 +1468,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1520,7 +1492,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1591,7 +1563,7 @@ def get(self, **kwargs: Any) -> List[Any]: :rtype: list[any] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1640,9 +1612,7 @@ def get(self, **kwargs: Any) -> List[Any]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[Any], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[Any], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1656,9 +1626,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1682,7 +1650,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1753,7 +1721,7 @@ def get(self, **kwargs: Any) -> List[_models.InnerModel]: :rtype: list[~typetest.array.models.InnerModel] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1802,9 +1770,7 @@ def get(self, **kwargs: Any) -> List[_models.InnerModel]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1818,9 +1784,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1844,7 +1808,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1915,7 +1879,7 @@ def get(self, **kwargs: Any) -> List[float]: :rtype: list[float] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1964,9 +1928,7 @@ def get(self, **kwargs: Any) -> List[float]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1980,9 +1942,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2006,7 +1966,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2077,7 +2037,7 @@ def get(self, **kwargs: Any) -> List[int]: :rtype: list[int] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2126,9 +2086,7 @@ def get(self, **kwargs: Any) -> List[int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2142,9 +2100,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2168,7 +2124,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2239,7 +2195,7 @@ def get(self, **kwargs: Any) -> List[bool]: :rtype: list[bool] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2288,9 +2244,7 @@ def get(self, **kwargs: Any) -> List[bool]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2304,9 +2258,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2330,7 +2282,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2401,7 +2353,7 @@ def get(self, **kwargs: Any) -> List[str]: :rtype: list[str] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2450,9 +2402,7 @@ def get(self, **kwargs: Any) -> List[str]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2466,9 +2416,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2492,7 +2440,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2563,7 +2511,7 @@ def get(self, **kwargs: Any) -> List[_models.InnerModel]: :rtype: list[~typetest.array.models.InnerModel] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2612,9 +2560,7 @@ def get(self, **kwargs: Any) -> List[_models.InnerModel]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: List[_models.InnerModel], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2628,9 +2574,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2654,7 +2598,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_configuration.py index 953591dcf67..89d79b42a2a 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for DictionaryClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py index bc4921c62db..dc1b9eb5056 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for DictionaryClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py index 5c54f50296c..2fad291aaa2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -56,7 +56,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -85,7 +85,7 @@ async def get(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,9 +134,7 @@ async def get(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -150,9 +148,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -165,9 +161,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: int} type or a IO[bytes] type. Required. @@ -176,7 +170,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -247,7 +241,7 @@ async def get(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -296,9 +290,7 @@ async def get(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -312,9 +304,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -327,9 +317,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: int} type or a IO[bytes] type. Required. @@ -338,7 +326,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -409,7 +397,7 @@ async def get(self, **kwargs: Any) -> Dict[str, bool]: :rtype: dict[str, bool] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -458,9 +446,7 @@ async def get(self, **kwargs: Any) -> Dict[str, bool]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -474,9 +460,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -489,9 +473,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: bool} type or a IO[bytes] type. Required. @@ -500,7 +482,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -571,7 +553,7 @@ async def get(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -620,9 +602,7 @@ async def get(self, **kwargs: Any) -> Dict[str, str]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -636,9 +616,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -651,9 +629,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, str], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, str], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: str} type or a IO[bytes] type. Required. @@ -662,7 +638,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -733,7 +709,7 @@ async def get(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -782,9 +758,7 @@ async def get(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -798,9 +772,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -813,9 +785,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: float} type or a IO[bytes] type. Required. @@ -824,7 +794,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -895,7 +865,7 @@ async def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: :rtype: dict[str, ~datetime.datetime] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -944,7 +914,7 @@ async def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -960,9 +930,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -975,9 +943,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: datetime.datetime} type or a IO[bytes] type. Required. @@ -986,7 +952,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1057,7 +1023,7 @@ async def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: :rtype: dict[str, ~datetime.timedelta] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1106,7 +1072,7 @@ async def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1122,9 +1088,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1137,9 +1101,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, datetime.timedelta], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, datetime.timedelta], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: datetime.timedelta} type or a IO[bytes] type. Required. @@ -1148,7 +1110,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1219,7 +1181,7 @@ async def get(self, **kwargs: Any) -> Dict[str, Any]: :rtype: dict[str, any] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1268,9 +1230,7 @@ async def get(self, **kwargs: Any) -> Dict[str, Any]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1284,9 +1244,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1299,9 +1257,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, Any], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, Any], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: Any} type or a IO[bytes] type. Required. @@ -1310,7 +1266,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1381,7 +1337,7 @@ async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: :rtype: dict[str, ~typetest.dictionary.models.InnerModel] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1430,7 +1386,7 @@ async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1446,9 +1402,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1461,9 +1415,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. @@ -1472,7 +1424,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1543,7 +1495,7 @@ async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: :rtype: dict[str, ~typetest.dictionary.models.InnerModel] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1592,7 +1544,7 @@ async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1608,9 +1560,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1623,9 +1573,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. @@ -1634,7 +1582,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1705,7 +1653,7 @@ async def get(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1754,9 +1702,7 @@ async def get(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1770,9 +1716,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1785,9 +1729,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: """put. :param body: Is either a {str: float} type or a IO[bytes] type. Required. @@ -1796,7 +1738,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/models/_models.py index 5301bf1739d..18046d10ba4 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py index f7324da1da4..58c2a035a79 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -373,7 +373,7 @@ def get(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -422,9 +422,7 @@ def get(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -438,9 +436,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -464,7 +460,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -535,7 +531,7 @@ def get(self, **kwargs: Any) -> Dict[str, int]: :rtype: dict[str, int] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -584,9 +580,7 @@ def get(self, **kwargs: Any) -> Dict[str, int]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -600,9 +594,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -626,7 +618,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -697,7 +689,7 @@ def get(self, **kwargs: Any) -> Dict[str, bool]: :rtype: dict[str, bool] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -746,9 +738,7 @@ def get(self, **kwargs: Any) -> Dict[str, bool]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -762,9 +752,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -788,7 +776,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -859,7 +847,7 @@ def get(self, **kwargs: Any) -> Dict[str, str]: :rtype: dict[str, str] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -908,9 +896,7 @@ def get(self, **kwargs: Any) -> Dict[str, str]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -924,9 +910,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -950,7 +934,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1021,7 +1005,7 @@ def get(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1070,9 +1054,7 @@ def get(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1086,9 +1068,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1112,7 +1092,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1183,7 +1163,7 @@ def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: :rtype: dict[str, ~datetime.datetime] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1232,9 +1212,7 @@ def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1248,9 +1226,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1274,7 +1250,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1345,7 +1321,7 @@ def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: :rtype: dict[str, ~datetime.timedelta] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1394,7 +1370,7 @@ def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1410,9 +1386,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1436,7 +1410,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1507,7 +1481,7 @@ def get(self, **kwargs: Any) -> Dict[str, Any]: :rtype: dict[str, any] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1556,9 +1530,7 @@ def get(self, **kwargs: Any) -> Dict[str, Any]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1572,9 +1544,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1598,7 +1568,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1669,7 +1639,7 @@ def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: :rtype: dict[str, ~typetest.dictionary.models.InnerModel] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1718,7 +1688,7 @@ def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1734,9 +1704,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1760,7 +1728,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1831,7 +1799,7 @@ def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: :rtype: dict[str, ~typetest.dictionary.models.InnerModel] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1880,7 +1848,7 @@ def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put. @@ -1896,9 +1864,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -1922,7 +1888,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1993,7 +1959,7 @@ def get(self, **kwargs: Any) -> Dict[str, float]: :rtype: dict[str, float] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2042,9 +2008,7 @@ def get(self, **kwargs: Any) -> Dict[str, float]: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2058,9 +2022,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param body: Required. @@ -2084,7 +2046,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_configuration.py index 22ab7648dae..ec4b919d1cc 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ExtensibleClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ExtensibleClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ExtensibleClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_configuration.py index f1119d11ec2..af035d8ff41 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ExtensibleClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ExtensibleClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ExtensibleClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py index 0df2d33c009..1e0a3702d07 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from corehttp.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -65,7 +64,7 @@ async def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekE :rtype: str or ~typetest.enum.extensible.models.DaysOfWeekExtensibleEnum :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -120,7 +119,7 @@ async def get_unknown_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWee :rtype: str or ~typetest.enum.extensible.models.DaysOfWeekExtensibleEnum :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -168,9 +167,7 @@ async def get_unknown_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWee return deserialized # type: ignore - async def put_known_value( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.DaysOfWeekExtensibleEnum], **kwargs: Any - ) -> None: + async def put_known_value(self, body: Union[str, _models.DaysOfWeekExtensibleEnum], **kwargs: Any) -> None: """put_known_value. :param body: Known values are: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", @@ -180,7 +177,7 @@ async def put_known_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -221,9 +218,7 @@ async def put_known_value( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def put_unknown_value( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.DaysOfWeekExtensibleEnum], **kwargs: Any - ) -> None: + async def put_unknown_value(self, body: Union[str, _models.DaysOfWeekExtensibleEnum], **kwargs: Any) -> None: """put_unknown_value. :param body: Known values are: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", @@ -233,7 +228,7 @@ async def put_unknown_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py index 189a29baed0..c6b30aa8512 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from corehttp.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -117,7 +116,7 @@ def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekExtensi :rtype: str or ~typetest.enum.extensible.models.DaysOfWeekExtensibleEnum :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -172,7 +171,7 @@ def get_unknown_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekExten :rtype: str or ~typetest.enum.extensible.models.DaysOfWeekExtensibleEnum :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -232,7 +231,7 @@ def put_known_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -285,7 +284,7 @@ def put_unknown_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py index 8207a206ae6..5a1503e45c2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from corehttp.exceptions import ( ClientAuthenticationError, @@ -35,7 +34,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -64,7 +63,7 @@ async def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekE :rtype: str or ~typetest.enum.fixed.models.DaysOfWeekEnum :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,9 +111,7 @@ async def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekE return deserialized # type: ignore - async def put_known_value( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.DaysOfWeekEnum], **kwargs: Any - ) -> None: + async def put_known_value(self, body: Union[str, _models.DaysOfWeekEnum], **kwargs: Any) -> None: """putKnownValue. :param body: _. Known values are: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", @@ -124,7 +121,7 @@ async def put_known_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -165,9 +162,7 @@ async def put_known_value( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def put_unknown_value( # pylint: disable=inconsistent-return-statements - self, body: Union[str, _models.DaysOfWeekEnum], **kwargs: Any - ) -> None: + async def put_unknown_value(self, body: Union[str, _models.DaysOfWeekEnum], **kwargs: Any) -> None: """putUnknownValue. :param body: _. Known values are: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", @@ -177,7 +172,7 @@ async def put_unknown_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py index bd317d2baae..ab713f1dd2e 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, Callable, Dict, Optional, TypeVar, Union from corehttp.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -103,7 +102,7 @@ def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekEnum]: :rtype: str or ~typetest.enum.fixed.models.DaysOfWeekEnum :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -163,7 +162,7 @@ def put_known_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -216,7 +215,7 @@ def put_unknown_value( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_operations/_operations.py index d865af5812b..85bcdec26d5 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -90,9 +89,7 @@ def build_empty_post_round_trip_empty_request(**kwargs: Any) -> HttpRequest: # class EmptyClientOperationsMixin(EmptyClientMixinABC): @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, input: _models.EmptyInput, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, input: _models.EmptyInput, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_empty. :param input: Required. @@ -106,9 +103,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_empty. :param input: Required. @@ -122,9 +117,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - def put_empty( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_empty(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_empty. :param input: Required. @@ -148,7 +141,7 @@ def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -201,7 +194,7 @@ def get_empty(self, **kwargs: Any) -> _models.EmptyOutput: :rtype: ~typetest.model.empty.models.EmptyOutput :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -308,7 +301,7 @@ def post_round_trip_empty( :rtype: ~typetest.model.empty.models.EmptyInputOutput :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_vendor.py index 99bf61c3402..8e821b99968 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import EmptyClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_operations/_operations.py index da20d984870..0d83f374cab 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +45,7 @@ class EmptyClientOperationsMixin(EmptyClientMixinABC): @overload - async def put_empty( # pylint: disable=inconsistent-return-statements + async def put_empty( self, input: _models.EmptyInput, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_empty. @@ -62,9 +61,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_empty. :param input: Required. @@ -78,9 +75,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements """ @overload - async def put_empty( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_empty(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_empty. :param input: Required. @@ -93,9 +88,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_empty( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.EmptyInput, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_empty(self, input: Union[_models.EmptyInput, JSON, IO[bytes]], **kwargs: Any) -> None: """put_empty. :param input: Is one of the following types: EmptyInput, JSON, IO[bytes] Required. @@ -104,7 +97,7 @@ async def put_empty( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -157,7 +150,7 @@ async def get_empty(self, **kwargs: Any) -> _models.EmptyOutput: :rtype: ~typetest.model.empty.models.EmptyOutput :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -264,7 +257,7 @@ async def post_round_trip_empty( :rtype: ~typetest.model.empty.models.EmptyInputOutput :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_vendor.py index 1b6e4f71dc2..2b6182bfd46 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import EmptyClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/models/_models.py index 222acdb3b5d..b870ebe87d3 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_configuration.py index f8296190db2..72832a9bef5 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class EnumDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class EnumDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for EnumDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/_operations.py index 1a810eafbc0..96c619960f6 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -175,7 +174,7 @@ def get_extensible_model(self, **kwargs: Any) -> _models.Dog: :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -224,7 +223,7 @@ def get_extensible_model(self, **kwargs: Any) -> _models.Dog: return deserialized # type: ignore @overload - def put_extensible_model( # pylint: disable=inconsistent-return-statements + def put_extensible_model( self, input: _models.Dog, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Send model with extensible enum discriminator type. @@ -240,9 +239,7 @@ def put_extensible_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_extensible_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_extensible_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with extensible enum discriminator type. :param input: Dog to create. Required. @@ -256,9 +253,7 @@ def put_extensible_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_extensible_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_extensible_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with extensible enum discriminator type. :param input: Dog to create. Required. @@ -282,7 +277,7 @@ def put_extensible_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -335,7 +330,7 @@ def get_extensible_model_missing_discriminator(self, **kwargs: Any) -> _models.D :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -390,7 +385,7 @@ def get_extensible_model_wrong_discriminator(self, **kwargs: Any) -> _models.Dog :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -445,7 +440,7 @@ def get_fixed_model(self, **kwargs: Any) -> _models.Snake: :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -494,9 +489,7 @@ def get_fixed_model(self, **kwargs: Any) -> _models.Snake: return deserialized # type: ignore @overload - def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: _models.Snake, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_fixed_model(self, input: _models.Snake, *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Required. @@ -510,9 +503,7 @@ def put_fixed_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_fixed_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Required. @@ -526,9 +517,7 @@ def put_fixed_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_fixed_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Required. @@ -552,7 +541,7 @@ def put_fixed_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -605,7 +594,7 @@ def get_fixed_model_missing_discriminator(self, **kwargs: Any) -> _models.Snake: :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -660,7 +649,7 @@ def get_fixed_model_wrong_discriminator(self, **kwargs: Any) -> _models.Snake: :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_vendor.py index 652e694d7b7..9bb368894f0 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import EnumDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_configuration.py index 0b2abfbda1a..cf42e2d3ac2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class EnumDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class EnumDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for EnumDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/_operations.py index e5c211579be..0abeacc347f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -42,7 +41,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +56,7 @@ async def get_extensible_model(self, **kwargs: Any) -> _models.Dog: :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -106,7 +105,7 @@ async def get_extensible_model(self, **kwargs: Any) -> _models.Dog: return deserialized # type: ignore @overload - async def put_extensible_model( # pylint: disable=inconsistent-return-statements + async def put_extensible_model( self, input: _models.Dog, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Send model with extensible enum discriminator type. @@ -122,9 +121,7 @@ async def put_extensible_model( # pylint: disable=inconsistent-return-statement """ @overload - async def put_extensible_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_extensible_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with extensible enum discriminator type. :param input: Dog to create. Required. @@ -138,7 +135,7 @@ async def put_extensible_model( # pylint: disable=inconsistent-return-statement """ @overload - async def put_extensible_model( # pylint: disable=inconsistent-return-statements + async def put_extensible_model( self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Send model with extensible enum discriminator type. @@ -153,9 +150,7 @@ async def put_extensible_model( # pylint: disable=inconsistent-return-statement :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_extensible_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Dog, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_extensible_model(self, input: Union[_models.Dog, JSON, IO[bytes]], **kwargs: Any) -> None: """Send model with extensible enum discriminator type. :param input: Dog to create. Is one of the following types: Dog, JSON, IO[bytes] Required. @@ -164,7 +159,7 @@ async def put_extensible_model( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -219,7 +214,7 @@ async def get_extensible_model_missing_discriminator( # pylint: disable=name-to :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -274,7 +269,7 @@ async def get_extensible_model_wrong_discriminator(self, **kwargs: Any) -> _mode :rtype: ~typetest.model.enumdiscriminator.models.Dog :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -329,7 +324,7 @@ async def get_fixed_model(self, **kwargs: Any) -> _models.Snake: :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -378,7 +373,7 @@ async def get_fixed_model(self, **kwargs: Any) -> _models.Snake: return deserialized # type: ignore @overload - async def put_fixed_model( # pylint: disable=inconsistent-return-statements + async def put_fixed_model( self, input: _models.Snake, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Send model with fixed enum discriminator type. @@ -394,9 +389,7 @@ async def put_fixed_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_fixed_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Required. @@ -410,9 +403,7 @@ async def put_fixed_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_fixed_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Required. @@ -425,9 +416,7 @@ async def put_fixed_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_fixed_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Snake, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_fixed_model(self, input: Union[_models.Snake, JSON, IO[bytes]], **kwargs: Any) -> None: """Send model with fixed enum discriminator type. :param input: Snake to create. Is one of the following types: Snake, JSON, IO[bytes] Required. @@ -436,7 +425,7 @@ async def put_fixed_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -489,7 +478,7 @@ async def get_fixed_model_missing_discriminator(self, **kwargs: Any) -> _models. :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -544,7 +533,7 @@ async def get_fixed_model_wrong_discriminator(self, **kwargs: Any) -> _models.Sn :rtype: ~typetest.model.enumdiscriminator.models.Snake :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_vendor.py index e84e47ad8c5..a93d1d31ab0 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import EnumDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/models/_models.py index ef2b451d543..e4a5d4a06f4 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -79,7 +78,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=SnakeKind.COBRA, **kwargs) @@ -148,5 +147,5 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind=DogKind.GOLDEN, **kwargs) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_configuration.py index df3a5a7afe3..db370902a2a 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class NestedDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NestedDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NestedDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/_operations.py index ef83051f8d7..00683ec2c49 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -143,7 +142,7 @@ def get_model(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -192,9 +191,7 @@ def get_model(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -208,9 +205,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -224,9 +219,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -250,7 +243,7 @@ def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,7 +296,7 @@ def get_recursive_model(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,7 +345,7 @@ def get_recursive_model(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements + def put_recursive_model( self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -368,9 +361,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_recursive_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -384,9 +375,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_recursive_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -410,7 +399,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -463,7 +452,7 @@ def get_missing_discriminator(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -518,7 +507,7 @@ def get_wrong_discriminator(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_vendor.py index 7b1f4018242..6614c62392b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NestedDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_configuration.py index e1b2bb90504..d8f35780d1a 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class NestedDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NestedDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NestedDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/_operations.py index 0e3f97ac0e3..3bda3c8c7f0 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -40,7 +39,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +54,7 @@ async def get_model(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -104,9 +103,7 @@ async def get_model(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -120,9 +117,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -136,9 +131,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -151,9 +144,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Fish, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_model(self, input: Union[_models.Fish, JSON, IO[bytes]], **kwargs: Any) -> None: """put_model. :param input: Is one of the following types: Fish, JSON, IO[bytes] Required. @@ -162,7 +153,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -215,7 +206,7 @@ async def get_recursive_model(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -264,7 +255,7 @@ async def get_recursive_model(self, **kwargs: Any) -> _models.Fish: return deserialized # type: ignore @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements + async def put_recursive_model( self, input: _models.Fish, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -280,9 +271,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_recursive_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -296,7 +285,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements + async def put_recursive_model( self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -311,9 +300,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Fish, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_recursive_model(self, input: Union[_models.Fish, JSON, IO[bytes]], **kwargs: Any) -> None: """put_recursive_model. :param input: Is one of the following types: Fish, JSON, IO[bytes] Required. @@ -322,7 +309,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -375,7 +362,7 @@ async def get_missing_discriminator(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -430,7 +417,7 @@ async def get_wrong_discriminator(self, **kwargs: Any) -> _models.Fish: :rtype: ~typetest.model.nesteddiscriminator.models.Fish :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_vendor.py index 1a7873c9fa5..d8aa7e4f3d3 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NestedDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/models/_models.py index 2593e47ec01..878d2246843 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_discriminator, rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -92,7 +90,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="shark", **kwargs) @@ -126,7 +124,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, sharktype="goblin", **kwargs) @@ -170,7 +168,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="salmon", **kwargs) @@ -204,5 +202,5 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, sharktype="saw", **kwargs) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_configuration.py index 9276542817f..eb509c6634b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class NotDiscriminatedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotDiscriminatedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotDiscriminatedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/_operations.py index 59375df8f62..988b4700a6a 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -90,9 +89,7 @@ def build_not_discriminated_put_valid_request(**kwargs: Any) -> HttpRequest: # class NotDiscriminatedClientOperationsMixin(NotDiscriminatedClientMixinABC): @overload - def post_valid( # pylint: disable=inconsistent-return-statements - self, input: _models.Siamese, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_valid(self, input: _models.Siamese, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_valid. :param input: Required. @@ -106,9 +103,7 @@ def post_valid( # pylint: disable=inconsistent-return-statements """ @overload - def post_valid( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_valid(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_valid. :param input: Required. @@ -122,9 +117,7 @@ def post_valid( # pylint: disable=inconsistent-return-statements """ @overload - def post_valid( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_valid(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_valid. :param input: Required. @@ -148,7 +141,7 @@ def post_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -201,7 +194,7 @@ def get_valid(self, **kwargs: Any) -> _models.Siamese: :rtype: ~typetest.model.notdiscriminated.models.Siamese :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -302,7 +295,7 @@ def put_valid(self, input: Union[_models.Siamese, JSON, IO[bytes]], **kwargs: An :rtype: ~typetest.model.notdiscriminated.models.Siamese :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_vendor.py index 11c198f2b44..1e53ea98147 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotDiscriminatedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_configuration.py index 38a1720dc33..dca25103fc6 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class NotDiscriminatedClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class NotDiscriminatedClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for NotDiscriminatedClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/_operations.py index ad11918a678..e7a49e0ce17 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +45,7 @@ class NotDiscriminatedClientOperationsMixin(NotDiscriminatedClientMixinABC): @overload - async def post_valid( # pylint: disable=inconsistent-return-statements + async def post_valid( self, input: _models.Siamese, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_valid. @@ -62,9 +61,7 @@ async def post_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def post_valid( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_valid(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_valid. :param input: Required. @@ -78,9 +75,7 @@ async def post_valid( # pylint: disable=inconsistent-return-statements """ @overload - async def post_valid( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_valid(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_valid. :param input: Required. @@ -93,9 +88,7 @@ async def post_valid( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def post_valid( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Siamese, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_valid(self, input: Union[_models.Siamese, JSON, IO[bytes]], **kwargs: Any) -> None: """post_valid. :param input: Is one of the following types: Siamese, JSON, IO[bytes] Required. @@ -104,7 +97,7 @@ async def post_valid( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -157,7 +150,7 @@ async def get_valid(self, **kwargs: Any) -> _models.Siamese: :rtype: ~typetest.model.notdiscriminated.models.Siamese :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -260,7 +253,7 @@ async def put_valid(self, input: Union[_models.Siamese, JSON, IO[bytes]], **kwar :rtype: ~typetest.model.notdiscriminated.models.Siamese :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_vendor.py index 8c32931b7d9..166e9896d73 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import NotDiscriminatedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/models/_models.py index d65ac4f73c4..6b7873261de 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_configuration.py index 7bbdad21a66..e2ab4e1d7b0 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class RecursiveClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RecursiveClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RecursiveClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_operations/_operations.py index 6d5b957a14e..c5e68543eda 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -73,9 +72,7 @@ def build_recursive_get_request(**kwargs: Any) -> HttpRequest: class RecursiveClientOperationsMixin(RecursiveClientMixinABC): @overload - def put( # pylint: disable=inconsistent-return-statements - self, input: _models.Extension, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, input: _models.Extension, *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -89,9 +86,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -105,9 +100,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -131,7 +124,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -184,7 +177,7 @@ def get(self, **kwargs: Any) -> _models.Extension: :rtype: ~typetest.model.recursive.models.Extension :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_vendor.py index 2a32a4b424e..ebd076d199c 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RecursiveClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_configuration.py index cbd48678075..147badaf112 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class RecursiveClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RecursiveClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RecursiveClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/_operations.py index 20b1eef25ff..3ce4bf4e220 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,9 +41,7 @@ class RecursiveClientOperationsMixin(RecursiveClientMixinABC): @overload - async def put( # pylint: disable=inconsistent-return-statements - self, input: _models.Extension, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, input: _models.Extension, *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -58,9 +55,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -74,9 +69,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put. :param input: Required. @@ -89,9 +82,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Extension, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, input: Union[_models.Extension, JSON, IO[bytes]], **kwargs: Any) -> None: """put. :param input: Is one of the following types: Extension, JSON, IO[bytes] Required. @@ -100,7 +91,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -153,7 +144,7 @@ async def get(self, **kwargs: Any) -> _models.Extension: :rtype: ~typetest.model.recursive.models.Extension :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_vendor.py index 3bd85f41f5b..ab255e30027 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RecursiveClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/models/_models.py index 8c3d2d6df68..a91533ef0b4 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -72,5 +70,5 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_configuration.py index e5283bf9130..8060fac76df 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class SingleDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class SingleDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for SingleDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/_operations.py index f54d3a18b7e..73d346a8b15 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -157,7 +156,7 @@ def get_model(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -206,9 +205,7 @@ def get_model(self, **kwargs: Any) -> _models.Bird: return deserialized # type: ignore @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -222,9 +219,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -238,9 +233,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -264,7 +257,7 @@ def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -317,7 +310,7 @@ def get_recursive_model(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -366,7 +359,7 @@ def get_recursive_model(self, **kwargs: Any) -> _models.Bird: return deserialized # type: ignore @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements + def put_recursive_model( self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -382,9 +375,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_recursive_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -398,9 +389,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_recursive_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -424,7 +413,7 @@ def put_recursive_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -477,7 +466,7 @@ def get_missing_discriminator(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -532,7 +521,7 @@ def get_wrong_discriminator(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -587,7 +576,7 @@ def get_legacy_model(self, **kwargs: Any) -> _models.Dinosaur: :rtype: ~typetest.model.singlediscriminator.models.Dinosaur :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_vendor.py index 0bc38171ca5..247f23b52ee 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SingleDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_configuration.py index b810495056d..c066a82f737 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class SingleDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class SingleDiscriminatorClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for SingleDiscriminatorClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/_operations.py index 68e008efd2c..6879cf2d328 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -41,7 +40,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +55,7 @@ async def get_model(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -105,9 +104,7 @@ async def get_model(self, **kwargs: Any) -> _models.Bird: return deserialized # type: ignore @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -121,9 +118,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -137,9 +132,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -152,9 +145,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Bird, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_model(self, input: Union[_models.Bird, JSON, IO[bytes]], **kwargs: Any) -> None: """put_model. :param input: Is one of the following types: Bird, JSON, IO[bytes] Required. @@ -163,7 +154,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -216,7 +207,7 @@ async def get_recursive_model(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -265,7 +256,7 @@ async def get_recursive_model(self, **kwargs: Any) -> _models.Bird: return deserialized # type: ignore @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements + async def put_recursive_model( self, input: _models.Bird, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -281,9 +272,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_recursive_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_recursive_model. :param input: Required. @@ -297,7 +286,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_recursive_model( # pylint: disable=inconsistent-return-statements + async def put_recursive_model( self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_recursive_model. @@ -312,9 +301,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_recursive_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.Bird, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_recursive_model(self, input: Union[_models.Bird, JSON, IO[bytes]], **kwargs: Any) -> None: """put_recursive_model. :param input: Is one of the following types: Bird, JSON, IO[bytes] Required. @@ -323,7 +310,7 @@ async def put_recursive_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -376,7 +363,7 @@ async def get_missing_discriminator(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -431,7 +418,7 @@ async def get_wrong_discriminator(self, **kwargs: Any) -> _models.Bird: :rtype: ~typetest.model.singlediscriminator.models.Bird :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -486,7 +473,7 @@ async def get_legacy_model(self, **kwargs: Any) -> _models.Dinosaur: :rtype: ~typetest.model.singlediscriminator.models.Dinosaur :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_vendor.py index e1b5f203db8..200444c4397 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import SingleDiscriminatorClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py index 465839c5bbe..43362049b05 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_discriminator, rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -134,7 +132,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="eagle", **kwargs) @@ -165,7 +163,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="goose", **kwargs) @@ -196,7 +194,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="seagull", **kwargs) @@ -227,7 +225,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="sparrow", **kwargs) @@ -258,5 +256,5 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="t-rex", **kwargs) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_operations/_operations.py index 5a3bbd523c3..69557545304 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -90,9 +89,7 @@ def build_usage_input_and_output_request(**kwargs: Any) -> HttpRequest: class UsageClientOperationsMixin(UsageClientMixinABC): @overload - def input( # pylint: disable=inconsistent-return-statements - self, input: _models.InputRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def input(self, input: _models.InputRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -106,9 +103,7 @@ def input( # pylint: disable=inconsistent-return-statements """ @overload - def input( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def input(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -122,9 +117,7 @@ def input( # pylint: disable=inconsistent-return-statements """ @overload - def input( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def input(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -148,7 +141,7 @@ def input( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -201,7 +194,7 @@ def output(self, **kwargs: Any) -> _models.OutputRecord: :rtype: ~typetest.model.usage.models.OutputRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -308,7 +301,7 @@ def input_and_output( :rtype: ~typetest.model.usage.models.InputOutputRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_vendor.py index 5a3b1af229a..2b2976dc864 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import UsageClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_operations/_operations.py index 68045998235..3a431eb6c9d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -37,7 +36,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -46,9 +45,7 @@ class UsageClientOperationsMixin(UsageClientMixinABC): @overload - async def input( # pylint: disable=inconsistent-return-statements - self, input: _models.InputRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def input(self, input: _models.InputRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -62,9 +59,7 @@ async def input( # pylint: disable=inconsistent-return-statements """ @overload - async def input( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def input(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -78,9 +73,7 @@ async def input( # pylint: disable=inconsistent-return-statements """ @overload - async def input( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def input(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """input. :param input: Required. @@ -93,9 +86,7 @@ async def input( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def input( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.InputRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def input(self, input: Union[_models.InputRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """input. :param input: Is one of the following types: InputRecord, JSON, IO[bytes] Required. @@ -104,7 +95,7 @@ async def input( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -157,7 +148,7 @@ async def output(self, **kwargs: Any) -> _models.OutputRecord: :rtype: ~typetest.model.usage.models.OutputRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -264,7 +255,7 @@ async def input_and_output( :rtype: ~typetest.model.usage.models.InputOutputRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_vendor.py index 85ad19eb8b3..3809635dd1d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import UsageClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/models/_models.py index 1c61d901bfd..d30c18f95c3 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_configuration.py index 05300a0021e..21b0b50711b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_operations/_operations.py index b8dacd90e5e..400a206103f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -207,7 +206,7 @@ def get_model( :rtype: ~typetest.model.visibility.models.VisibilityModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -318,7 +317,7 @@ def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **k :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -366,7 +365,7 @@ def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **k return 200 <= response.status_code <= 299 @overload - def put_model( # pylint: disable=inconsistent-return-statements + def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -382,9 +381,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -398,9 +395,7 @@ def put_model( # pylint: disable=inconsistent-return-statements """ @overload - def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -424,7 +419,7 @@ def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -471,7 +466,7 @@ def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_model( # pylint: disable=inconsistent-return-statements + def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -487,9 +482,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -503,9 +496,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -529,7 +520,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -576,7 +567,7 @@ def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def post_model( # pylint: disable=inconsistent-return-statements + def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -592,9 +583,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -608,9 +597,7 @@ def post_model( # pylint: disable=inconsistent-return-statements """ @overload - def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -634,7 +621,7 @@ def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -681,7 +668,7 @@ def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def delete_model( # pylint: disable=inconsistent-return-statements + def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -697,9 +684,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -713,9 +698,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -739,7 +722,7 @@ def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -844,7 +827,7 @@ def put_read_only_model( :rtype: ~typetest.model.visibility.models.ReadOnlyModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_vendor.py index 9580c4fd83c..2199f704036 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_configuration.py index ede5d37d3bb..b10f0634c40 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class VisibilityClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for VisibilityClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/_operations.py index a42b151e752..a801f9d19ee 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -41,7 +40,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -108,7 +107,7 @@ async def get_model( :rtype: ~typetest.model.visibility.models.VisibilityModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -219,7 +218,7 @@ async def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes] :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -267,7 +266,7 @@ async def head_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes] return 200 <= response.status_code <= 299 @overload - async def put_model( # pylint: disable=inconsistent-return-statements + async def put_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """put_model. @@ -283,9 +282,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -299,9 +296,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements """ @overload - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """put_model. :param input: Required. @@ -314,9 +309,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """put_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -325,7 +318,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -372,7 +365,7 @@ async def put_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_model( # pylint: disable=inconsistent-return-statements + async def patch_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """patch_model. @@ -388,9 +381,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -404,9 +395,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def patch_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """patch_model. :param input: Required. @@ -419,9 +408,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """patch_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -430,7 +417,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -477,7 +464,7 @@ async def patch_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def post_model( # pylint: disable=inconsistent-return-statements + async def post_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """post_model. @@ -493,9 +480,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -509,9 +494,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements """ @overload - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def post_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """post_model. :param input: Required. @@ -524,9 +507,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def post_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def post_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """post_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -535,7 +516,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -582,7 +563,7 @@ async def post_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def delete_model( # pylint: disable=inconsistent-return-statements + async def delete_model( self, input: _models.VisibilityModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """delete_model. @@ -598,9 +579,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -614,9 +593,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements """ @overload - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def delete_model(self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """delete_model. :param input: Required. @@ -629,9 +606,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def delete_model( # pylint: disable=inconsistent-return-statements - self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def delete_model(self, input: Union[_models.VisibilityModel, JSON, IO[bytes]], **kwargs: Any) -> None: """delete_model. :param input: Is one of the following types: VisibilityModel, JSON, IO[bytes] Required. @@ -640,7 +615,7 @@ async def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -745,7 +720,7 @@ async def put_read_only_model( :rtype: ~typetest.model.visibility.models.ReadOnlyModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_vendor.py index cda31dbee44..3c4774dc815 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import VisibilityClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/models/_models.py index fd597699495..3a3fc57c5ee 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_configuration.py index 3ecbdca8266..327c92b19e9 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AdditionalPropertiesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_configuration.py index 2c6fe254add..160836058f7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class AdditionalPropertiesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for AdditionalPropertiesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py index cf4b340277f..fda08e4ac12 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -97,7 +97,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -128,7 +128,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties :rtype: ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -177,7 +177,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsUnknownAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -193,9 +193,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -209,9 +207,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -224,7 +220,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.ExtendsUnknownAdditionalProperties, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -237,7 +233,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -310,7 +306,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalPropertiesDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -359,7 +355,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsUnknownAdditionalPropertiesDerived, *, @@ -380,9 +376,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -396,9 +390,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -411,7 +403,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.ExtendsUnknownAdditionalPropertiesDerived, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -425,7 +417,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -498,7 +490,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalPropertiesDiscriminated :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -547,7 +539,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsUnknownAdditionalPropertiesDiscriminated, *, @@ -568,9 +560,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -584,9 +574,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -599,7 +587,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.ExtendsUnknownAdditionalPropertiesDiscriminated, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -613,7 +601,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -685,7 +673,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsUnknownAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -734,7 +722,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsUnknownAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -750,9 +738,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -766,9 +752,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -781,9 +765,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsUnknownAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IsUnknownAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IsUnknownAdditionalProperties, JSON, @@ -794,7 +776,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -866,7 +848,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDeriv :rtype: ~typetest.property.additionalproperties.models.IsUnknownAdditionalPropertiesDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -915,7 +897,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDeriv return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsUnknownAdditionalPropertiesDerived, *, @@ -935,9 +917,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -951,9 +931,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -966,7 +944,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.IsUnknownAdditionalPropertiesDerived, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -979,7 +957,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1052,7 +1030,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscr ~typetest.property.additionalproperties.models.IsUnknownAdditionalPropertiesDiscriminated :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1101,7 +1079,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscr return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsUnknownAdditionalPropertiesDiscriminated, *, @@ -1122,9 +1100,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1138,9 +1114,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1153,7 +1127,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.IsUnknownAdditionalPropertiesDiscriminated, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -1167,7 +1141,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1239,7 +1213,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsStringAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1288,7 +1262,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsStringAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1304,9 +1278,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1320,9 +1292,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1335,9 +1305,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExtendsStringAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.ExtendsStringAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: ExtendsStringAdditionalProperties, JSON, @@ -1348,7 +1316,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1420,7 +1388,7 @@ async def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsStringAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1469,7 +1437,7 @@ async def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsStringAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1485,9 +1453,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1501,9 +1467,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1516,9 +1480,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsStringAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IsStringAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IsStringAdditionalProperties, JSON, IO[bytes] @@ -1529,7 +1491,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1600,7 +1562,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadStringRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadStringRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1649,7 +1611,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadStringRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadStringRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1665,9 +1627,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1681,9 +1641,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1696,9 +1654,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadStringRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadStringRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadStringRecord, JSON, IO[bytes] Required. @@ -1708,7 +1664,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1780,7 +1736,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsFloatAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1829,7 +1785,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsFloatAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1845,9 +1801,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1861,9 +1815,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1876,9 +1828,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExtendsFloatAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.ExtendsFloatAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: ExtendsFloatAdditionalProperties, JSON, @@ -1889,7 +1839,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1911,7 @@ async def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsFloatAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2010,7 +1960,7 @@ async def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsFloatAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2026,9 +1976,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2042,9 +1990,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2057,9 +2003,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsFloatAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IsFloatAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IsFloatAdditionalProperties, JSON, IO[bytes] @@ -2070,7 +2014,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2141,7 +2085,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadFloatRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2190,7 +2134,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadFloatRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2206,9 +2150,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2222,9 +2164,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2237,9 +2177,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadFloatRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadFloatRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadFloatRecord, JSON, IO[bytes] Required. @@ -2249,7 +2187,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2321,7 +2259,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsModelAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2370,7 +2308,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsModelAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2386,9 +2324,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2402,9 +2338,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2417,9 +2351,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExtendsModelAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.ExtendsModelAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: ExtendsModelAdditionalProperties, JSON, @@ -2430,7 +2362,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2502,7 +2434,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsModelAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2551,7 +2483,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsModelAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2567,9 +2499,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2583,9 +2513,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2598,9 +2526,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsModelAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IsModelAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IsModelAdditionalProperties, JSON, IO[bytes] @@ -2611,7 +2537,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2682,7 +2608,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadModelRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2731,7 +2657,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadModelRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2747,9 +2673,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2763,9 +2687,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2778,9 +2700,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadModelRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadModelRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadModelRecord, JSON, IO[bytes] Required. @@ -2790,7 +2710,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2862,7 +2782,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalPropert :rtype: ~typetest.property.additionalproperties.models.ExtendsModelArrayAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2911,7 +2831,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalPropert return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtendsModelArrayAdditionalProperties, *, @@ -2932,9 +2852,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2948,9 +2866,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2963,7 +2879,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.ExtendsModelArrayAdditionalProperties, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -2977,7 +2893,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3049,7 +2965,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsModelArrayAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3098,7 +3014,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IsModelArrayAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3114,9 +3030,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3130,9 +3044,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3145,9 +3057,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IsModelArrayAdditionalProperties, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IsModelArrayAdditionalProperties, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IsModelArrayAdditionalProperties, JSON, @@ -3158,7 +3068,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3229,7 +3139,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadModelArrayRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3278,7 +3188,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadModelArrayRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3294,9 +3204,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3310,9 +3218,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3325,9 +3231,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadModelArrayRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadModelArrayRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadModelArrayRecord, JSON, IO[bytes] @@ -3338,7 +3242,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3410,7 +3314,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadStringRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3459,7 +3363,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadStringRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3475,9 +3379,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3491,9 +3393,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3506,9 +3406,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadStringRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadStringRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadStringRecord, JSON, IO[bytes] @@ -3519,7 +3417,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3591,7 +3489,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadFloatRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3640,7 +3538,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadFloatRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3656,9 +3554,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3672,9 +3568,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3687,9 +3581,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadFloatRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadFloatRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadFloatRecord, JSON, IO[bytes] @@ -3700,7 +3592,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3772,7 +3664,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3821,7 +3713,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadModelRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3837,9 +3729,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3853,9 +3743,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3868,9 +3756,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadModelRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadModelRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadModelRecord, JSON, IO[bytes] @@ -3881,7 +3767,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3953,7 +3839,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelArrayRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4002,7 +3888,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadModelArrayRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4018,9 +3904,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4034,9 +3918,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4049,9 +3931,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadModelArrayRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadModelArrayRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadModelArrayRecord, JSON, @@ -4062,7 +3942,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4134,7 +4014,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadStringDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4183,7 +4063,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadStringDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4199,9 +4079,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4215,9 +4093,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4230,9 +4106,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadStringDerived, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadStringDerived, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadStringDerived, JSON, IO[bytes] @@ -4243,7 +4117,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4315,7 +4189,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadFloatDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4364,7 +4238,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadFloatDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4380,9 +4254,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4396,9 +4268,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4411,9 +4281,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadFloatDerived, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadFloatDerived, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadFloatDerived, JSON, IO[bytes] @@ -4424,7 +4292,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4496,7 +4364,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4545,7 +4413,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadModelDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4561,9 +4429,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4577,9 +4443,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4592,9 +4456,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadModelDerived, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadModelDerived, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadModelDerived, JSON, IO[bytes] @@ -4605,7 +4467,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4677,7 +4539,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelArrayDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4726,7 +4588,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DifferentSpreadModelArrayDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4742,9 +4604,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4758,9 +4618,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4773,9 +4631,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DifferentSpreadModelArrayDerived, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DifferentSpreadModelArrayDerived, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DifferentSpreadModelArrayDerived, JSON, @@ -4786,7 +4642,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4857,7 +4713,7 @@ async def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: :rtype: ~typetest.property.additionalproperties.models.MultipleSpreadRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4906,7 +4762,7 @@ async def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.MultipleSpreadRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4922,9 +4778,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4938,9 +4792,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4953,9 +4805,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.MultipleSpreadRecord, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.MultipleSpreadRecord, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: MultipleSpreadRecord, JSON, IO[bytes] @@ -4966,7 +4816,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5037,7 +4887,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForUnion :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5086,7 +4936,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadRecordForUnion, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5102,9 +4952,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5118,9 +4966,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5133,9 +4979,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadRecordForUnion, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadRecordForUnion, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadRecordForUnion, JSON, IO[bytes] @@ -5146,7 +4990,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5218,7 +5062,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForDiscriminatedUnion: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForDiscriminatedUnion :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5267,7 +5111,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForDiscriminatedUnion: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadRecordForDiscriminatedUnion, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5283,9 +5127,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5299,9 +5141,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5314,9 +5154,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.SpreadRecordForDiscriminatedUnion, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.SpreadRecordForDiscriminatedUnion, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: SpreadRecordForDiscriminatedUnion, JSON, @@ -5327,7 +5165,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5399,7 +5237,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5448,7 +5286,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion, *, @@ -5468,9 +5306,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5484,9 +5320,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5499,7 +5333,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.SpreadRecordForNonDiscriminatedUnion, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -5512,7 +5346,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5584,7 +5418,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion2 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5633,7 +5467,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion2, *, @@ -5654,9 +5488,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5670,9 +5502,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5685,7 +5515,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.SpreadRecordForNonDiscriminatedUnion2, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -5699,7 +5529,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5771,7 +5601,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion3 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5820,7 +5650,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion3, *, @@ -5841,9 +5671,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5857,9 +5685,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5872,7 +5698,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: Union[_models.SpreadRecordForNonDiscriminatedUnion3, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put operation. @@ -5886,7 +5712,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/models/_models.py index fd5716bbcbf..64b06a7ac5a 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/models/_models.py @@ -1,5 +1,5 @@ -# coding=utf-8 # pylint: disable=too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +14,6 @@ from .._model_base import rest_discriminator, rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -262,7 +261,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -525,7 +524,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="derived", **kwargs) @@ -788,7 +787,7 @@ def __init__(self, mapping: Mapping[str, Any]): :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, kind="derived", **kwargs) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py index 65be4e8cfa7..ff0edfa4ded 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -978,7 +978,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1027,7 +1027,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsUnknownAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1043,9 +1043,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1059,9 +1057,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1087,7 +1083,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1160,7 +1156,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDerive ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalPropertiesDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1209,7 +1205,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDerive return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsUnknownAdditionalPropertiesDerived, *, @@ -1230,9 +1226,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1246,9 +1240,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1275,7 +1267,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1348,7 +1340,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDiscri ~typetest.property.additionalproperties.models.ExtendsUnknownAdditionalPropertiesDiscriminated :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1397,7 +1389,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDiscri return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsUnknownAdditionalPropertiesDiscriminated, *, @@ -1418,9 +1410,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1434,9 +1424,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1463,7 +1451,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1535,7 +1523,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsUnknownAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1584,7 +1572,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsUnknownAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1600,9 +1588,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1616,9 +1602,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1644,7 +1628,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1716,7 +1700,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDerived: :rtype: ~typetest.property.additionalproperties.models.IsUnknownAdditionalPropertiesDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1765,7 +1749,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDerived: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsUnknownAdditionalPropertiesDerived, *, @@ -1785,9 +1769,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1801,9 +1783,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1829,7 +1809,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1902,7 +1882,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscriminat ~typetest.property.additionalproperties.models.IsUnknownAdditionalPropertiesDiscriminated :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1951,7 +1931,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscriminat return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsUnknownAdditionalPropertiesDiscriminated, *, @@ -1972,9 +1952,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1988,9 +1966,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2017,7 +1993,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2089,7 +2065,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsStringAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2138,7 +2114,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsStringAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2154,9 +2130,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2170,9 +2144,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2198,7 +2170,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2270,7 +2242,7 @@ def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsStringAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2319,7 +2291,7 @@ def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsStringAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2335,9 +2307,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2351,9 +2321,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2379,7 +2347,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2450,7 +2418,7 @@ def get(self, **kwargs: Any) -> _models.SpreadStringRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadStringRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2499,9 +2467,7 @@ def get(self, **kwargs: Any) -> _models.SpreadStringRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.SpreadStringRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.SpreadStringRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2515,9 +2481,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2531,9 +2495,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2558,7 +2520,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2630,7 +2592,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsFloatAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2679,7 +2641,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsFloatAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2695,9 +2657,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2711,9 +2671,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2739,7 +2697,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2811,7 +2769,7 @@ def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsFloatAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2860,7 +2818,7 @@ def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsFloatAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2876,9 +2834,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2892,9 +2848,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2920,7 +2874,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2991,7 +2945,7 @@ def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadFloatRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3040,9 +2994,7 @@ def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.SpreadFloatRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.SpreadFloatRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3056,9 +3008,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3072,9 +3022,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3099,7 +3047,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3171,7 +3119,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsModelAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3220,7 +3168,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsModelAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3236,9 +3184,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3252,9 +3198,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3280,7 +3224,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3352,7 +3296,7 @@ def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsModelAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3401,7 +3345,7 @@ def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsModelAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3417,9 +3361,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3433,9 +3375,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3461,7 +3401,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3532,7 +3472,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadModelRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3581,9 +3521,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.SpreadModelRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.SpreadModelRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3597,9 +3535,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3613,9 +3549,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3640,7 +3574,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3712,7 +3646,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.ExtendsModelArrayAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3761,7 +3695,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtendsModelArrayAdditionalProperties, *, @@ -3782,9 +3716,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3798,9 +3730,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3827,7 +3757,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3899,7 +3829,7 @@ def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: :rtype: ~typetest.property.additionalproperties.models.IsModelArrayAdditionalProperties :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3948,7 +3878,7 @@ def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.IsModelArrayAdditionalProperties, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3964,9 +3894,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3980,9 +3908,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4008,7 +3934,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4079,7 +4005,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: :rtype: ~typetest.property.additionalproperties.models.SpreadModelArrayRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4128,7 +4054,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.SpreadModelArrayRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4144,9 +4070,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4160,9 +4084,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4188,7 +4110,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4260,7 +4182,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadStringRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4309,7 +4231,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadStringRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4325,9 +4247,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4341,9 +4261,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4369,7 +4287,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4441,7 +4359,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadFloatRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4490,7 +4408,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadFloatRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4506,9 +4424,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4522,9 +4438,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4550,7 +4464,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4622,7 +4536,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4671,7 +4585,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadModelRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4687,9 +4601,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4703,9 +4615,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4731,7 +4641,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4803,7 +4713,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelArrayRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4852,7 +4762,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadModelArrayRecord, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4868,9 +4778,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4884,9 +4792,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4912,7 +4818,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4984,7 +4890,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadStringDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5033,7 +4939,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadStringDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5049,9 +4955,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5065,9 +4969,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5093,7 +4995,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5165,7 +5067,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadFloatDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5214,7 +5116,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadFloatDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5230,9 +5132,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5246,9 +5146,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5274,7 +5172,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5346,7 +5244,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5395,7 +5293,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadModelDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5411,9 +5309,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5427,9 +5323,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5455,7 +5349,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5527,7 +5421,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: :rtype: ~typetest.property.additionalproperties.models.DifferentSpreadModelArrayDerived :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5576,7 +5470,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DifferentSpreadModelArrayDerived, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5592,9 +5486,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5608,9 +5500,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5636,7 +5526,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5707,7 +5597,7 @@ def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: :rtype: ~typetest.property.additionalproperties.models.MultipleSpreadRecord :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5756,9 +5646,7 @@ def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.MultipleSpreadRecord, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.MultipleSpreadRecord, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5772,9 +5660,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5788,9 +5674,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5816,7 +5700,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5887,7 +5771,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForUnion :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5936,9 +5820,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.SpreadRecordForUnion, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.SpreadRecordForUnion, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5952,9 +5834,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5968,9 +5848,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5996,7 +5874,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6068,7 +5946,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForDiscriminatedUnion: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForDiscriminatedUnion :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6117,7 +5995,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForDiscriminatedUnion: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.SpreadRecordForDiscriminatedUnion, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -6133,9 +6011,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6149,9 +6025,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6177,7 +6051,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6249,7 +6123,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6298,7 +6172,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion, *, @@ -6318,9 +6192,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6334,9 +6206,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6362,7 +6232,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6434,7 +6304,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion2: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion2 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6483,7 +6353,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion2: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion2, *, @@ -6504,9 +6374,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6520,9 +6388,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6549,7 +6415,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6621,7 +6487,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion3: :rtype: ~typetest.property.additionalproperties.models.SpreadRecordForNonDiscriminatedUnion3 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6670,7 +6536,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion3: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.SpreadRecordForNonDiscriminatedUnion3, *, @@ -6691,9 +6557,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6707,9 +6571,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -6736,7 +6598,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py index 4bb9fce0a72..73c043e836d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -61,7 +61,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -91,7 +91,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.nullable.models.StringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -146,7 +146,7 @@ async def get_null(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.nullable.models.StringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -195,7 +195,7 @@ async def get_null(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.StringProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -211,7 +211,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -227,7 +227,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -242,9 +242,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_non_null(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: StringProperty, JSON, IO[bytes] Required. @@ -253,7 +251,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -300,7 +298,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.StringProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -316,7 +314,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -332,7 +330,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -347,9 +345,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: StringProperty, JSON, IO[bytes] Required. @@ -358,7 +354,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -429,7 +425,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.nullable.models.BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -484,7 +480,7 @@ async def get_null(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.nullable.models.BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -533,7 +529,7 @@ async def get_null(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.BytesProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -549,7 +545,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -565,7 +561,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -580,9 +576,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_non_null(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: BytesProperty, JSON, IO[bytes] Required. @@ -591,7 +585,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -638,7 +632,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.BytesProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -654,7 +648,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -670,7 +664,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -685,9 +679,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: BytesProperty, JSON, IO[bytes] Required. @@ -696,7 +688,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,7 +759,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.nullable.models.DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -822,7 +814,7 @@ async def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.nullable.models.DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -871,7 +863,7 @@ async def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.DatetimeProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -887,7 +879,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -903,7 +895,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -918,9 +910,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_non_null(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: DatetimeProperty, JSON, IO[bytes] Required. @@ -929,7 +919,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -976,7 +966,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.DatetimeProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -992,7 +982,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1008,7 +998,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1023,9 +1013,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: DatetimeProperty, JSON, IO[bytes] Required. @@ -1034,7 +1022,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1105,7 +1093,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.nullable.models.DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1160,7 +1148,7 @@ async def get_null(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.nullable.models.DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1209,7 +1197,7 @@ async def get_null(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.DurationProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1225,7 +1213,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1241,7 +1229,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1256,9 +1244,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_non_null(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: DurationProperty, JSON, IO[bytes] Required. @@ -1267,7 +1253,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1314,7 +1300,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.DurationProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1330,7 +1316,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1346,7 +1332,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1361,9 +1347,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: DurationProperty, JSON, IO[bytes] Required. @@ -1372,7 +1356,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1443,7 +1427,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.nullable.models.CollectionsByteProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1498,7 +1482,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.nullable.models.CollectionsByteProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1547,7 +1531,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.CollectionsByteProperty, *, @@ -1567,7 +1551,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1583,7 +1567,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1598,7 +1582,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1609,7 +1593,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1656,7 +1640,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.CollectionsByteProperty, *, @@ -1676,7 +1660,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1692,7 +1676,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1707,9 +1691,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: CollectionsByteProperty, JSON, IO[bytes] Required. @@ -1718,7 +1700,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1790,7 +1772,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.nullable.models.CollectionsModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1846,7 +1828,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.nullable.models.CollectionsModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1895,7 +1877,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.CollectionsModelProperty, *, @@ -1915,7 +1897,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1931,7 +1913,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1946,7 +1928,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1957,7 +1939,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2004,7 +1986,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.CollectionsModelProperty, *, @@ -2024,7 +2006,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2040,7 +2022,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2055,9 +2037,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: CollectionsModelProperty, JSON, IO[bytes] Required. @@ -2066,7 +2046,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2138,7 +2118,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsStringProperty :rtype: ~typetest.property.nullable.models.CollectionsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2194,7 +2174,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: :rtype: ~typetest.property.nullable.models.CollectionsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2243,7 +2223,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: return deserialized # type: ignore @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: _models.CollectionsStringProperty, *, @@ -2263,7 +2243,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2279,7 +2259,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2294,7 +2274,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_non_null( # pylint: disable=inconsistent-return-statements + async def patch_non_null( self, body: Union[_models.CollectionsStringProperty, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2306,7 +2286,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2353,7 +2333,7 @@ async def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: _models.CollectionsStringProperty, *, @@ -2373,7 +2353,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2389,7 +2369,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - async def patch_null( # pylint: disable=inconsistent-return-statements + async def patch_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2404,9 +2384,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def patch_null( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsStringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def patch_null(self, body: Union[_models.CollectionsStringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: CollectionsStringProperty, JSON, IO[bytes] @@ -2416,7 +2394,7 @@ async def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/models/_models.py index 66e40cd8fa6..bf865e11e77 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +13,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py index 86339ed9103..71d59a52994 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -457,7 +457,7 @@ def get_non_null(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.nullable.models.StringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -512,7 +512,7 @@ def get_null(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.nullable.models.StringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -561,7 +561,7 @@ def get_null(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.StringProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -577,9 +577,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -593,7 +591,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -619,7 +617,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -666,7 +664,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.StringProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -682,9 +680,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -698,9 +694,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -724,7 +718,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -795,7 +789,7 @@ def get_non_null(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.nullable.models.BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -850,7 +844,7 @@ def get_null(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.nullable.models.BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -899,7 +893,7 @@ def get_null(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.BytesProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -915,9 +909,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -931,7 +923,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -957,7 +949,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1004,7 +996,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.BytesProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1020,9 +1012,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1036,9 +1026,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1062,7 +1050,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1133,7 +1121,7 @@ def get_non_null(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.nullable.models.DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1188,7 +1176,7 @@ def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.nullable.models.DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1237,7 +1225,7 @@ def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.DatetimeProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1253,9 +1241,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1269,7 +1255,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1295,7 +1281,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1342,7 +1328,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.DatetimeProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1358,9 +1344,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1374,9 +1358,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1400,7 +1382,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1471,7 +1453,7 @@ def get_non_null(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.nullable.models.DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1526,7 +1508,7 @@ def get_null(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.nullable.models.DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1575,7 +1557,7 @@ def get_null(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.DurationProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1591,9 +1573,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1607,7 +1587,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1633,7 +1613,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1680,7 +1660,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.DurationProperty, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1696,9 +1676,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1712,9 +1690,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1738,7 +1714,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1809,7 +1785,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.nullable.models.CollectionsByteProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1864,7 +1840,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.nullable.models.CollectionsByteProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1913,7 +1889,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.CollectionsByteProperty, *, @@ -1933,9 +1909,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1949,7 +1923,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1975,7 +1949,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2022,7 +1996,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.CollectionsByteProperty, *, @@ -2042,9 +2016,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2058,9 +2030,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2084,7 +2054,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2156,7 +2126,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.nullable.models.CollectionsModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2212,7 +2182,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.nullable.models.CollectionsModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2261,7 +2231,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.CollectionsModelProperty, *, @@ -2281,9 +2251,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2297,7 +2265,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2323,7 +2291,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2370,7 +2338,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.CollectionsModelProperty, *, @@ -2390,9 +2358,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2406,9 +2372,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2432,7 +2396,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2504,7 +2468,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: :rtype: ~typetest.property.nullable.models.CollectionsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2560,7 +2524,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: :rtype: ~typetest.property.nullable.models.CollectionsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2609,7 +2573,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: return deserialized # type: ignore @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: _models.CollectionsStringProperty, *, @@ -2629,9 +2593,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_non_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2645,7 +2607,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_non_null( # pylint: disable=inconsistent-return-statements + def patch_non_null( self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2672,7 +2634,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2719,7 +2681,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def patch_null( # pylint: disable=inconsistent-return-statements + def patch_null( self, body: _models.CollectionsStringProperty, *, @@ -2739,9 +2701,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2755,9 +2715,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements """ @overload - def patch_null( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any - ) -> None: + def patch_null(self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2782,7 +2740,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py index 1af80cc5996..ed552f0a0fa 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -97,7 +97,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -127,7 +127,7 @@ async def get_all(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.optional.models.StringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -182,7 +182,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.optional.models.StringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -231,7 +231,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -247,9 +247,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -263,9 +261,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -278,9 +274,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: StringProperty, JSON, IO[bytes] Required. @@ -289,7 +283,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -336,7 +330,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -352,9 +346,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -368,9 +360,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -383,9 +373,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: StringProperty, JSON, IO[bytes] Required. @@ -394,7 +382,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -465,7 +453,7 @@ async def get_all(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.optional.models.BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -520,7 +508,7 @@ async def get_default(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.optional.models.BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -569,7 +557,7 @@ async def get_default(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -585,9 +573,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -601,9 +587,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -616,9 +600,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: BytesProperty, JSON, IO[bytes] Required. @@ -627,7 +609,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -674,7 +656,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -690,9 +672,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -706,9 +686,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -721,9 +699,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: BytesProperty, JSON, IO[bytes] Required. @@ -732,7 +708,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -803,7 +779,7 @@ async def get_all(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.optional.models.DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -858,7 +834,7 @@ async def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.optional.models.DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -907,7 +883,7 @@ async def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -923,9 +899,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -939,9 +913,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -954,9 +926,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: DatetimeProperty, JSON, IO[bytes] Required. @@ -965,7 +935,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1012,7 +982,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1028,9 +998,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1044,9 +1012,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1059,9 +1025,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: DatetimeProperty, JSON, IO[bytes] Required. @@ -1070,7 +1034,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1141,7 +1105,7 @@ async def get_all(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.optional.models.DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1196,7 +1160,7 @@ async def get_default(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.optional.models.DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1245,7 +1209,7 @@ async def get_default(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1261,9 +1225,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1277,9 +1239,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1292,9 +1252,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: DurationProperty, JSON, IO[bytes] Required. @@ -1303,7 +1261,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1350,7 +1308,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1366,9 +1324,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1382,9 +1338,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1397,9 +1351,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: DurationProperty, JSON, IO[bytes] Required. @@ -1408,7 +1360,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1479,7 +1431,7 @@ async def get_all(self, **kwargs: Any) -> _models.PlainDateProperty: :rtype: ~typetest.property.optional.models.PlainDateProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1534,7 +1486,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: :rtype: ~typetest.property.optional.models.PlainDateProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1583,7 +1535,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.PlainDateProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1599,9 +1551,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1615,9 +1565,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1630,9 +1578,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PlainDateProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.PlainDateProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: PlainDateProperty, JSON, IO[bytes] Required. @@ -1641,7 +1587,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1688,7 +1634,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.PlainDateProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1704,9 +1650,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1720,9 +1664,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1735,9 +1677,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PlainDateProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.PlainDateProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: PlainDateProperty, JSON, IO[bytes] Required. @@ -1746,7 +1686,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1817,7 +1757,7 @@ async def get_all(self, **kwargs: Any) -> _models.PlainTimeProperty: :rtype: ~typetest.property.optional.models.PlainTimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1872,7 +1812,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: :rtype: ~typetest.property.optional.models.PlainTimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1921,7 +1861,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.PlainTimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -1937,9 +1877,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1953,9 +1891,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1968,9 +1904,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PlainTimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.PlainTimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: PlainTimeProperty, JSON, IO[bytes] Required. @@ -1979,7 +1913,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2026,7 +1960,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.PlainTimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2042,9 +1976,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2058,9 +1990,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2073,9 +2003,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.PlainTimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.PlainTimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: PlainTimeProperty, JSON, IO[bytes] Required. @@ -2084,7 +2012,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2155,7 +2083,7 @@ async def get_all(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.optional.models.CollectionsByteProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2210,7 +2138,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.optional.models.CollectionsByteProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2259,7 +2187,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.CollectionsByteProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2275,9 +2203,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2291,9 +2217,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2306,9 +2230,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: CollectionsByteProperty, JSON, IO[bytes] Required. @@ -2317,7 +2239,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2364,7 +2286,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.CollectionsByteProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2380,9 +2302,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2396,9 +2316,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2411,9 +2329,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.CollectionsByteProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: CollectionsByteProperty, JSON, IO[bytes] Required. @@ -2422,7 +2338,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2494,7 +2410,7 @@ async def get_all(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.optional.models.CollectionsModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2550,7 +2466,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.optional.models.CollectionsModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2599,7 +2515,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2615,9 +2531,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2631,9 +2545,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2646,9 +2558,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: CollectionsModelProperty, JSON, IO[bytes] Required. @@ -2657,7 +2567,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2704,7 +2614,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2720,9 +2630,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2736,9 +2644,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2751,9 +2657,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: CollectionsModelProperty, JSON, IO[bytes] Required. @@ -2762,7 +2666,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2833,7 +2737,7 @@ async def get_all(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.optional.models.StringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2888,7 +2792,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.optional.models.StringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2937,7 +2841,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2953,9 +2857,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2969,9 +2871,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2984,9 +2884,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: StringLiteralProperty, JSON, IO[bytes] Required. @@ -2995,7 +2893,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3042,7 +2940,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3058,9 +2956,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3074,9 +2970,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3089,9 +2983,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: StringLiteralProperty, JSON, IO[bytes] Required. @@ -3100,7 +2992,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3171,7 +3063,7 @@ async def get_all(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.optional.models.IntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3226,7 +3118,7 @@ async def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.optional.models.IntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3275,7 +3167,7 @@ async def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3291,9 +3183,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3307,9 +3197,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3322,9 +3210,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: IntLiteralProperty, JSON, IO[bytes] Required. @@ -3333,7 +3219,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3380,7 +3266,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3396,9 +3282,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3412,9 +3296,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3427,9 +3309,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: IntLiteralProperty, JSON, IO[bytes] Required. @@ -3438,7 +3318,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3509,7 +3389,7 @@ async def get_all(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.optional.models.FloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3564,7 +3444,7 @@ async def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.optional.models.FloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3613,7 +3493,7 @@ async def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3629,9 +3509,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3645,9 +3523,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3660,9 +3536,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: FloatLiteralProperty, JSON, IO[bytes] Required. @@ -3671,7 +3545,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3718,7 +3592,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3734,9 +3608,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3750,9 +3622,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3765,9 +3635,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: FloatLiteralProperty, JSON, IO[bytes] Required. @@ -3776,7 +3644,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3847,7 +3715,7 @@ async def get_all(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.optional.models.BooleanLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3902,7 +3770,7 @@ async def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.optional.models.BooleanLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3951,7 +3819,7 @@ async def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3967,9 +3835,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3983,9 +3849,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3998,9 +3862,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: BooleanLiteralProperty, JSON, IO[bytes] Required. @@ -4009,7 +3871,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4056,7 +3918,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4072,9 +3934,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4088,9 +3948,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4103,9 +3961,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: BooleanLiteralProperty, JSON, IO[bytes] Required. @@ -4114,7 +3970,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4186,7 +4042,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: :rtype: ~typetest.property.optional.models.UnionStringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4242,7 +4098,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty :rtype: ~typetest.property.optional.models.UnionStringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4291,7 +4147,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4307,9 +4163,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4323,9 +4177,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4338,9 +4190,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: UnionStringLiteralProperty, JSON, IO[bytes] @@ -4350,7 +4200,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4397,7 +4247,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4413,9 +4263,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4429,9 +4277,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4444,7 +4290,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put a body with default properties. @@ -4456,7 +4302,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4527,7 +4373,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.optional.models.UnionIntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4582,7 +4428,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.optional.models.UnionIntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4631,7 +4477,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4647,9 +4493,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4663,9 +4507,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4678,9 +4520,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: UnionIntLiteralProperty, JSON, IO[bytes] Required. @@ -4689,7 +4529,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4736,7 +4576,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4752,9 +4592,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4768,9 +4606,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4783,9 +4619,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: UnionIntLiteralProperty, JSON, IO[bytes] Required. @@ -4794,7 +4628,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4866,7 +4700,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.optional.models.UnionFloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4922,7 +4756,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.optional.models.UnionFloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4971,7 +4805,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4987,9 +4821,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5003,9 +4835,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5018,9 +4848,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: UnionFloatLiteralProperty, JSON, IO[bytes] @@ -5030,7 +4858,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5077,7 +4905,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_default( # pylint: disable=inconsistent-return-statements + async def put_default( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -5093,9 +4921,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5109,9 +4935,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements """ @overload - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5124,9 +4948,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_default( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_default(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with default properties. :param body: Is one of the following types: UnionFloatLiteralProperty, JSON, IO[bytes] @@ -5136,7 +4958,7 @@ async def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5208,7 +5030,7 @@ async def get_all(self, **kwargs: Any) -> _models.RequiredAndOptionalProperty: :rtype: ~typetest.property.optional.models.RequiredAndOptionalProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5264,7 +5086,7 @@ async def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalP :rtype: ~typetest.property.optional.models.RequiredAndOptionalProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5313,7 +5135,7 @@ async def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalP return deserialized # type: ignore @overload - async def put_all( # pylint: disable=inconsistent-return-statements + async def put_all( self, body: _models.RequiredAndOptionalProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -5329,9 +5151,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5345,9 +5165,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements """ @overload - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5360,9 +5178,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_all( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.RequiredAndOptionalProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put_all(self, body: Union[_models.RequiredAndOptionalProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put a body with all properties present. :param body: Is one of the following types: RequiredAndOptionalProperty, JSON, IO[bytes] @@ -5372,7 +5188,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5419,7 +5235,7 @@ async def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - async def put_required_only( # pylint: disable=inconsistent-return-statements + async def put_required_only( self, body: _models.RequiredAndOptionalProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with only required properties. @@ -5435,9 +5251,7 @@ async def put_required_only( # pylint: disable=inconsistent-return-statements """ @overload - async def put_required_only( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put_required_only(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with only required properties. :param body: Required. @@ -5451,7 +5265,7 @@ async def put_required_only( # pylint: disable=inconsistent-return-statements """ @overload - async def put_required_only( # pylint: disable=inconsistent-return-statements + async def put_required_only( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with only required properties. @@ -5466,7 +5280,7 @@ async def put_required_only( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put_required_only( # pylint: disable=inconsistent-return-statements + async def put_required_only( self, body: Union[_models.RequiredAndOptionalProperty, JSON, IO[bytes]], **kwargs: Any ) -> None: """Put a body with only required properties. @@ -5478,7 +5292,7 @@ async def put_required_only( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/models/_models.py index f1ecd24fec7..f12c7038f23 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -14,7 +13,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py index b24c8fcd3c5..b1bf7443242 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -965,7 +965,7 @@ def get_all(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.optional.models.StringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1020,7 +1020,7 @@ def get_default(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.optional.models.StringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1069,9 +1069,7 @@ def get_default(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1085,9 +1083,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1101,9 +1097,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1127,7 +1121,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1174,7 +1168,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1190,9 +1184,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1206,9 +1198,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1232,7 +1222,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1303,7 +1293,7 @@ def get_all(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.optional.models.BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1358,7 +1348,7 @@ def get_default(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.optional.models.BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1407,9 +1397,7 @@ def get_default(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1423,9 +1411,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1439,9 +1425,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1465,7 +1449,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1512,7 +1496,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1528,9 +1512,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1544,9 +1526,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1570,7 +1550,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1641,7 +1621,7 @@ def get_all(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.optional.models.DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1696,7 +1676,7 @@ def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.optional.models.DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1745,9 +1725,7 @@ def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1761,9 +1739,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1777,9 +1753,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -1803,7 +1777,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1850,7 +1824,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -1866,9 +1840,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1882,9 +1854,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -1908,7 +1878,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1979,7 +1949,7 @@ def get_all(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.optional.models.DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2034,7 +2004,7 @@ def get_default(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.optional.models.DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2083,9 +2053,7 @@ def get_default(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2099,9 +2067,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2115,9 +2081,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2141,7 +2105,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2188,7 +2152,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2204,9 +2168,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2220,9 +2182,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2246,7 +2206,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2317,7 +2277,7 @@ def get_all(self, **kwargs: Any) -> _models.PlainDateProperty: :rtype: ~typetest.property.optional.models.PlainDateProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2372,7 +2332,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: :rtype: ~typetest.property.optional.models.PlainDateProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2421,7 +2381,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.PlainDateProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2437,9 +2397,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2453,9 +2411,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2479,7 +2435,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2526,7 +2482,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.PlainDateProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2542,9 +2498,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2558,9 +2512,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2584,7 +2536,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2655,7 +2607,7 @@ def get_all(self, **kwargs: Any) -> _models.PlainTimeProperty: :rtype: ~typetest.property.optional.models.PlainTimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2710,7 +2662,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: :rtype: ~typetest.property.optional.models.PlainTimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2759,7 +2711,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.PlainTimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -2775,9 +2727,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2791,9 +2741,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -2817,7 +2765,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2864,7 +2812,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.PlainTimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -2880,9 +2828,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2896,9 +2842,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -2922,7 +2866,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2993,7 +2937,7 @@ def get_all(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.optional.models.CollectionsByteProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3048,7 +2992,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: :rtype: ~typetest.property.optional.models.CollectionsByteProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3097,7 +3041,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.CollectionsByteProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3113,9 +3057,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3129,9 +3071,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3155,7 +3095,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3202,7 +3142,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.CollectionsByteProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3218,9 +3158,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3234,9 +3172,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3260,7 +3196,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3332,7 +3268,7 @@ def get_all(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.optional.models.CollectionsModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3388,7 +3324,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.optional.models.CollectionsModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3437,7 +3373,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3453,9 +3389,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3469,9 +3403,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3495,7 +3427,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3542,7 +3474,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3558,9 +3490,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3574,9 +3504,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3600,7 +3528,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3671,7 +3599,7 @@ def get_all(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.optional.models.StringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3726,7 +3654,7 @@ def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.optional.models.StringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3775,7 +3703,7 @@ def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -3791,9 +3719,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3807,9 +3733,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -3833,7 +3757,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3880,7 +3804,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -3896,9 +3820,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3912,9 +3834,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -3938,7 +3858,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4009,7 +3929,7 @@ def get_all(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.optional.models.IntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4064,7 +3984,7 @@ def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.optional.models.IntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4113,7 +4033,7 @@ def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4129,9 +4049,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4145,9 +4063,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4171,7 +4087,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4218,7 +4134,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4234,9 +4150,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4250,9 +4164,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4276,7 +4188,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4347,7 +4259,7 @@ def get_all(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.optional.models.FloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4402,7 +4314,7 @@ def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.optional.models.FloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4451,7 +4363,7 @@ def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4467,9 +4379,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4483,9 +4393,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4509,7 +4417,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4556,7 +4464,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4572,9 +4480,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4588,9 +4494,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4614,7 +4518,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4685,7 +4589,7 @@ def get_all(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.optional.models.BooleanLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4740,7 +4644,7 @@ def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.optional.models.BooleanLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4789,7 +4693,7 @@ def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -4805,9 +4709,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4821,9 +4723,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -4847,7 +4747,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4894,7 +4794,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -4910,9 +4810,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4926,9 +4824,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -4952,7 +4848,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5024,7 +4920,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: :rtype: ~typetest.property.optional.models.UnionStringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5080,7 +4976,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: :rtype: ~typetest.property.optional.models.UnionStringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5129,7 +5025,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -5145,9 +5041,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5161,9 +5055,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5188,7 +5080,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5235,7 +5127,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -5251,9 +5143,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5267,9 +5157,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5294,7 +5182,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5365,7 +5253,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.optional.models.UnionIntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5420,7 +5308,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.optional.models.UnionIntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5469,7 +5357,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -5485,9 +5373,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5501,9 +5387,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5527,7 +5411,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5574,7 +5458,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -5590,9 +5474,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5606,9 +5488,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5632,7 +5512,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5704,7 +5584,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.optional.models.UnionFloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5760,7 +5640,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.optional.models.UnionFloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5809,7 +5689,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -5825,9 +5705,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5841,9 +5719,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -5868,7 +5744,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5915,7 +5791,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_default( # pylint: disable=inconsistent-return-statements + def put_default( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with default properties. @@ -5931,9 +5807,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5947,9 +5821,7 @@ def put_default( # pylint: disable=inconsistent-return-statements """ @overload - def put_default( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_default(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with default properties. :param body: Required. @@ -5974,7 +5846,7 @@ def put_default( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6046,7 +5918,7 @@ def get_all(self, **kwargs: Any) -> _models.RequiredAndOptionalProperty: :rtype: ~typetest.property.optional.models.RequiredAndOptionalProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6102,7 +5974,7 @@ def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalPropert :rtype: ~typetest.property.optional.models.RequiredAndOptionalProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6151,7 +6023,7 @@ def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalPropert return deserialized # type: ignore @overload - def put_all( # pylint: disable=inconsistent-return-statements + def put_all( self, body: _models.RequiredAndOptionalProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with all properties present. @@ -6167,9 +6039,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -6183,9 +6053,7 @@ def put_all( # pylint: disable=inconsistent-return-statements """ @overload - def put_all( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_all(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with all properties present. :param body: Required. @@ -6210,7 +6078,7 @@ def put_all( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6257,7 +6125,7 @@ def put_all( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @overload - def put_required_only( # pylint: disable=inconsistent-return-statements + def put_required_only( self, body: _models.RequiredAndOptionalProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put a body with only required properties. @@ -6273,9 +6141,7 @@ def put_required_only( # pylint: disable=inconsistent-return-statements """ @overload - def put_required_only( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_required_only(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with only required properties. :param body: Required. @@ -6289,9 +6155,7 @@ def put_required_only( # pylint: disable=inconsistent-return-statements """ @overload - def put_required_only( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put_required_only(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put a body with only required properties. :param body: Required. @@ -6316,7 +6180,7 @@ def put_required_only( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_configuration.py index 44f27fb29f6..b3b4a78de8d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_configuration.py @@ -13,7 +13,7 @@ from ._version import VERSION -class ValueTypesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ValueTypesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ValueTypesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_configuration.py index cab5cb53d96..0f89926ff7b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_configuration.py @@ -13,7 +13,7 @@ from .._version import VERSION -class ValueTypesClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ValueTypesClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ValueTypesClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py index 463d67aa405..0022311e09f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -91,7 +91,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -121,7 +121,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanProperty: :rtype: ~typetest.property.valuetypes.models.BooleanProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -170,7 +170,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.BooleanProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -186,9 +186,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -202,9 +200,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -217,9 +213,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BooleanProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.BooleanProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: BooleanProperty, JSON, IO[bytes] Required. @@ -228,7 +222,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -299,7 +293,7 @@ async def get(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.valuetypes.models.StringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -348,9 +342,7 @@ async def get(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -364,9 +356,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -380,9 +370,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -395,9 +383,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: StringProperty, JSON, IO[bytes] Required. @@ -406,7 +392,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -477,7 +463,7 @@ async def get(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.valuetypes.models.BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,9 +512,7 @@ async def get(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -542,9 +526,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -558,9 +540,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -573,9 +553,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: BytesProperty, JSON, IO[bytes] Required. @@ -584,7 +562,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -655,7 +633,7 @@ async def get(self, **kwargs: Any) -> _models.IntProperty: :rtype: ~typetest.property.valuetypes.models.IntProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -704,9 +682,7 @@ async def get(self, **kwargs: Any) -> _models.IntProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.IntProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.IntProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -720,9 +696,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -736,9 +710,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -751,9 +723,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IntProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IntProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IntProperty, JSON, IO[bytes] Required. @@ -762,7 +732,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -833,7 +803,7 @@ async def get(self, **kwargs: Any) -> _models.FloatProperty: :rtype: ~typetest.property.valuetypes.models.FloatProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -882,9 +852,7 @@ async def get(self, **kwargs: Any) -> _models.FloatProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.FloatProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.FloatProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -898,9 +866,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -914,9 +880,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -929,9 +893,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FloatProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.FloatProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: FloatProperty, JSON, IO[bytes] Required. @@ -940,7 +902,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1011,7 +973,7 @@ async def get(self, **kwargs: Any) -> _models.DecimalProperty: :rtype: ~typetest.property.valuetypes.models.DecimalProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1060,7 +1022,7 @@ async def get(self, **kwargs: Any) -> _models.DecimalProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DecimalProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1076,9 +1038,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1092,9 +1052,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1107,9 +1065,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DecimalProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DecimalProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DecimalProperty, JSON, IO[bytes] Required. @@ -1118,7 +1074,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1189,7 +1145,7 @@ async def get(self, **kwargs: Any) -> _models.Decimal128Property: :rtype: ~typetest.property.valuetypes.models.Decimal128Property :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1238,7 +1194,7 @@ async def get(self, **kwargs: Any) -> _models.Decimal128Property: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.Decimal128Property, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1254,9 +1210,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1270,9 +1224,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1285,9 +1237,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.Decimal128Property, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.Decimal128Property, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: Decimal128Property, JSON, IO[bytes] Required. @@ -1296,7 +1246,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1367,7 +1317,7 @@ async def get(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.valuetypes.models.DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1416,7 +1366,7 @@ async def get(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1432,9 +1382,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1448,9 +1396,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1463,9 +1409,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DatetimeProperty, JSON, IO[bytes] Required. @@ -1474,7 +1418,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1545,7 +1489,7 @@ async def get(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.valuetypes.models.DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1594,7 +1538,7 @@ async def get(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1610,9 +1554,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1626,9 +1568,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1641,9 +1581,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DurationProperty, JSON, IO[bytes] Required. @@ -1652,7 +1590,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1723,7 +1661,7 @@ async def get(self, **kwargs: Any) -> _models.EnumProperty: :rtype: ~typetest.property.valuetypes.models.EnumProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1772,9 +1710,7 @@ async def get(self, **kwargs: Any) -> _models.EnumProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.EnumProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.EnumProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1788,9 +1724,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1804,9 +1738,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1819,9 +1751,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.EnumProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.EnumProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: EnumProperty, JSON, IO[bytes] Required. @@ -1830,7 +1760,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1901,7 +1831,7 @@ async def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: :rtype: ~typetest.property.valuetypes.models.ExtensibleEnumProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1950,7 +1880,7 @@ async def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.ExtensibleEnumProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -1966,9 +1896,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1982,9 +1910,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1997,9 +1923,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ExtensibleEnumProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.ExtensibleEnumProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: ExtensibleEnumProperty, JSON, IO[bytes] @@ -2009,7 +1933,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2080,7 +2004,7 @@ async def get(self, **kwargs: Any) -> _models.ModelProperty: :rtype: ~typetest.property.valuetypes.models.ModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2129,9 +2053,7 @@ async def get(self, **kwargs: Any) -> _models.ModelProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.ModelProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.ModelProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2145,9 +2067,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2161,9 +2081,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2176,9 +2094,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.ModelProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.ModelProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: ModelProperty, JSON, IO[bytes] Required. @@ -2187,7 +2103,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2259,7 +2175,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2308,7 +2224,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.CollectionsStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2324,9 +2240,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2340,9 +2254,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2355,9 +2267,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsStringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.CollectionsStringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: CollectionsStringProperty, JSON, IO[bytes] @@ -2367,7 +2277,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2438,7 +2348,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsIntProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2487,7 +2397,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.CollectionsIntProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2503,9 +2413,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2519,9 +2427,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2534,9 +2440,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsIntProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.CollectionsIntProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: CollectionsIntProperty, JSON, IO[bytes] @@ -2546,7 +2450,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2618,7 +2522,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2667,7 +2571,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2683,9 +2587,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2699,9 +2601,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2714,9 +2614,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: CollectionsModelProperty, JSON, IO[bytes] @@ -2726,7 +2624,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2798,7 +2696,7 @@ async def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: :rtype: ~typetest.property.valuetypes.models.DictionaryStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2847,7 +2745,7 @@ async def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.DictionaryStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2863,9 +2761,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2879,9 +2775,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2894,9 +2788,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.DictionaryStringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.DictionaryStringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: DictionaryStringProperty, JSON, IO[bytes] @@ -2906,7 +2798,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2977,7 +2869,7 @@ async def get(self, **kwargs: Any) -> _models.NeverProperty: :rtype: ~typetest.property.valuetypes.models.NeverProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3026,9 +2918,7 @@ async def get(self, **kwargs: Any) -> _models.NeverProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: _models.NeverProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: _models.NeverProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3042,9 +2932,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3058,9 +2946,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3073,9 +2959,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.NeverProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.NeverProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: NeverProperty, JSON, IO[bytes] Required. @@ -3084,7 +2968,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3155,7 +3039,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownStringProperty: :rtype: ~typetest.property.valuetypes.models.UnknownStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3204,7 +3088,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownStringProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnknownStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3220,9 +3104,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3236,9 +3118,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3251,9 +3131,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnknownStringProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnknownStringProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnknownStringProperty, JSON, IO[bytes] @@ -3263,7 +3141,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3334,7 +3212,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownIntProperty: :rtype: ~typetest.property.valuetypes.models.UnknownIntProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3383,7 +3261,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownIntProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnknownIntProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3399,9 +3277,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3415,9 +3291,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3430,9 +3304,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnknownIntProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnknownIntProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnknownIntProperty, JSON, IO[bytes] Required. @@ -3441,7 +3313,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3512,7 +3384,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownDictProperty: :rtype: ~typetest.property.valuetypes.models.UnknownDictProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3561,7 +3433,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownDictProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnknownDictProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3577,9 +3449,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3593,9 +3463,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3608,9 +3476,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnknownDictProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnknownDictProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnknownDictProperty, JSON, IO[bytes] @@ -3620,7 +3486,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3691,7 +3557,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: :rtype: ~typetest.property.valuetypes.models.UnknownArrayProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3740,7 +3606,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnknownArrayProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3756,9 +3622,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3772,9 +3636,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3787,9 +3649,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnknownArrayProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnknownArrayProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnknownArrayProperty, JSON, IO[bytes] @@ -3799,7 +3659,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3870,7 +3730,7 @@ async def get(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.valuetypes.models.StringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3919,7 +3779,7 @@ async def get(self, **kwargs: Any) -> _models.StringLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3935,9 +3795,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3951,9 +3809,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3966,9 +3822,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: StringLiteralProperty, JSON, IO[bytes] @@ -3978,7 +3832,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4049,7 +3903,7 @@ async def get(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.valuetypes.models.IntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4098,7 +3952,7 @@ async def get(self, **kwargs: Any) -> _models.IntLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4114,9 +3968,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4130,9 +3982,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4145,9 +3995,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: IntLiteralProperty, JSON, IO[bytes] Required. @@ -4156,7 +4004,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4227,7 +4075,7 @@ async def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.valuetypes.models.FloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4276,7 +4124,7 @@ async def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4292,9 +4140,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4308,9 +4154,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4323,9 +4167,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: FloatLiteralProperty, JSON, IO[bytes] @@ -4335,7 +4177,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4406,7 +4248,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.valuetypes.models.BooleanLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4455,7 +4297,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4471,9 +4313,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4487,9 +4327,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4502,9 +4340,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: BooleanLiteralProperty, JSON, IO[bytes] @@ -4514,7 +4350,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4586,7 +4422,7 @@ async def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionStringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4635,7 +4471,7 @@ async def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4651,9 +4487,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4667,9 +4501,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4682,9 +4514,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnionStringLiteralProperty, JSON, IO[bytes] @@ -4695,7 +4525,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4766,7 +4596,7 @@ async def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionIntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4815,7 +4645,7 @@ async def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4831,9 +4661,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4847,9 +4675,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4862,9 +4688,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnionIntLiteralProperty, JSON, IO[bytes] @@ -4874,7 +4698,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4946,7 +4770,7 @@ async def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionFloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4995,7 +4819,7 @@ async def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5011,9 +4835,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5027,9 +4849,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5042,9 +4862,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnionFloatLiteralProperty, JSON, IO[bytes] @@ -5054,7 +4872,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5125,7 +4943,7 @@ async def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: :rtype: ~typetest.property.valuetypes.models.UnionEnumValueProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5174,7 +4992,7 @@ async def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: return deserialized # type: ignore @overload - async def put( # pylint: disable=inconsistent-return-statements + async def put( self, body: _models.UnionEnumValueProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5190,9 +5008,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5206,9 +5022,7 @@ async def put( # pylint: disable=inconsistent-return-statements """ @overload - async def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5221,9 +5035,7 @@ async def put( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def put( # pylint: disable=inconsistent-return-statements - self, body: Union[_models.UnionEnumValueProperty, JSON, IO[bytes]], **kwargs: Any - ) -> None: + async def put(self, body: Union[_models.UnionEnumValueProperty, JSON, IO[bytes]], **kwargs: Any) -> None: """Put operation. :param body: body. Is one of the following types: UnionEnumValueProperty, JSON, IO[bytes] @@ -5233,7 +5045,7 @@ async def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/models/_models.py index 779a3cdd25c..296e871fd89 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -16,7 +15,6 @@ from ._enums import ExtendedEnum if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py index b742db63f7d..c993c34c9f1 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -877,7 +877,7 @@ def get(self, **kwargs: Any) -> _models.BooleanProperty: :rtype: ~typetest.property.valuetypes.models.BooleanProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -926,9 +926,7 @@ def get(self, **kwargs: Any) -> _models.BooleanProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.BooleanProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.BooleanProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -942,9 +940,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -958,9 +954,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -984,7 +978,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1055,7 +1049,7 @@ def get(self, **kwargs: Any) -> _models.StringProperty: :rtype: ~typetest.property.valuetypes.models.StringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1104,9 +1098,7 @@ def get(self, **kwargs: Any) -> _models.StringProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.StringProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1120,9 +1112,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1136,9 +1126,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1162,7 +1150,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1233,7 +1221,7 @@ def get(self, **kwargs: Any) -> _models.BytesProperty: :rtype: ~typetest.property.valuetypes.models.BytesProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1282,9 +1270,7 @@ def get(self, **kwargs: Any) -> _models.BytesProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.BytesProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1298,9 +1284,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1314,9 +1298,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1340,7 +1322,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1411,7 +1393,7 @@ def get(self, **kwargs: Any) -> _models.IntProperty: :rtype: ~typetest.property.valuetypes.models.IntProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1460,9 +1442,7 @@ def get(self, **kwargs: Any) -> _models.IntProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.IntProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.IntProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1476,9 +1456,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1492,9 +1470,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1518,7 +1494,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1589,7 +1565,7 @@ def get(self, **kwargs: Any) -> _models.FloatProperty: :rtype: ~typetest.property.valuetypes.models.FloatProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1638,9 +1614,7 @@ def get(self, **kwargs: Any) -> _models.FloatProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.FloatProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.FloatProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1654,9 +1628,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1670,9 +1642,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1696,7 +1666,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1767,7 +1737,7 @@ def get(self, **kwargs: Any) -> _models.DecimalProperty: :rtype: ~typetest.property.valuetypes.models.DecimalProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1816,9 +1786,7 @@ def get(self, **kwargs: Any) -> _models.DecimalProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.DecimalProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.DecimalProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1832,9 +1800,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1848,9 +1814,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -1874,7 +1838,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1945,7 +1909,7 @@ def get(self, **kwargs: Any) -> _models.Decimal128Property: :rtype: ~typetest.property.valuetypes.models.Decimal128Property :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1994,9 +1958,7 @@ def get(self, **kwargs: Any) -> _models.Decimal128Property: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.Decimal128Property, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.Decimal128Property, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2010,9 +1972,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2026,9 +1986,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2052,7 +2010,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2123,7 +2081,7 @@ def get(self, **kwargs: Any) -> _models.DatetimeProperty: :rtype: ~typetest.property.valuetypes.models.DatetimeProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2172,9 +2130,7 @@ def get(self, **kwargs: Any) -> _models.DatetimeProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.DatetimeProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2188,9 +2144,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2204,9 +2158,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2230,7 +2182,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2301,7 +2253,7 @@ def get(self, **kwargs: Any) -> _models.DurationProperty: :rtype: ~typetest.property.valuetypes.models.DurationProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2350,9 +2302,7 @@ def get(self, **kwargs: Any) -> _models.DurationProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.DurationProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2366,9 +2316,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2382,9 +2330,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2408,7 +2354,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2479,7 +2425,7 @@ def get(self, **kwargs: Any) -> _models.EnumProperty: :rtype: ~typetest.property.valuetypes.models.EnumProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2528,9 +2474,7 @@ def get(self, **kwargs: Any) -> _models.EnumProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.EnumProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.EnumProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2544,9 +2488,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2560,9 +2502,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2586,7 +2526,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2657,7 +2597,7 @@ def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: :rtype: ~typetest.property.valuetypes.models.ExtensibleEnumProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2706,7 +2646,7 @@ def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.ExtensibleEnumProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -2722,9 +2662,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2738,9 +2676,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2765,7 +2701,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2836,7 +2772,7 @@ def get(self, **kwargs: Any) -> _models.ModelProperty: :rtype: ~typetest.property.valuetypes.models.ModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2885,9 +2821,7 @@ def get(self, **kwargs: Any) -> _models.ModelProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.ModelProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.ModelProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2901,9 +2835,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2917,9 +2849,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -2943,7 +2873,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3015,7 +2945,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3064,7 +2994,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.CollectionsStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3080,9 +3010,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3096,9 +3024,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3123,7 +3049,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3194,7 +3120,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsIntProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3243,7 +3169,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.CollectionsIntProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3259,9 +3185,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3275,9 +3199,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3302,7 +3224,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3374,7 +3296,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: :rtype: ~typetest.property.valuetypes.models.CollectionsModelProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3423,7 +3345,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.CollectionsModelProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3439,9 +3361,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3455,9 +3375,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3482,7 +3400,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3554,7 +3472,7 @@ def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: :rtype: ~typetest.property.valuetypes.models.DictionaryStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3603,7 +3521,7 @@ def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.DictionaryStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3619,9 +3537,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3635,9 +3551,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3662,7 +3576,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3733,7 +3647,7 @@ def get(self, **kwargs: Any) -> _models.NeverProperty: :rtype: ~typetest.property.valuetypes.models.NeverProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3782,9 +3696,7 @@ def get(self, **kwargs: Any) -> _models.NeverProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.NeverProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.NeverProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3798,9 +3710,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3814,9 +3724,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3840,7 +3748,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3911,7 +3819,7 @@ def get(self, **kwargs: Any) -> _models.UnknownStringProperty: :rtype: ~typetest.property.valuetypes.models.UnknownStringProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3960,7 +3868,7 @@ def get(self, **kwargs: Any) -> _models.UnknownStringProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.UnknownStringProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -3976,9 +3884,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -3992,9 +3898,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4019,7 +3923,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4090,7 +3994,7 @@ def get(self, **kwargs: Any) -> _models.UnknownIntProperty: :rtype: ~typetest.property.valuetypes.models.UnknownIntProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4139,9 +4043,7 @@ def get(self, **kwargs: Any) -> _models.UnknownIntProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.UnknownIntProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.UnknownIntProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4155,9 +4057,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4171,9 +4071,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4197,7 +4095,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4268,7 +4166,7 @@ def get(self, **kwargs: Any) -> _models.UnknownDictProperty: :rtype: ~typetest.property.valuetypes.models.UnknownDictProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4317,9 +4215,7 @@ def get(self, **kwargs: Any) -> _models.UnknownDictProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.UnknownDictProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.UnknownDictProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4333,9 +4229,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4349,9 +4243,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4376,7 +4268,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4447,7 +4339,7 @@ def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: :rtype: ~typetest.property.valuetypes.models.UnknownArrayProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4496,9 +4388,7 @@ def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.UnknownArrayProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.UnknownArrayProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4512,9 +4402,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4528,9 +4416,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4555,7 +4441,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4626,7 +4512,7 @@ def get(self, **kwargs: Any) -> _models.StringLiteralProperty: :rtype: ~typetest.property.valuetypes.models.StringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4675,7 +4561,7 @@ def get(self, **kwargs: Any) -> _models.StringLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.StringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -4691,9 +4577,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4707,9 +4591,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4734,7 +4616,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4805,7 +4687,7 @@ def get(self, **kwargs: Any) -> _models.IntLiteralProperty: :rtype: ~typetest.property.valuetypes.models.IntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4854,9 +4736,7 @@ def get(self, **kwargs: Any) -> _models.IntLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.IntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4870,9 +4750,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4886,9 +4764,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -4912,7 +4788,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4983,7 +4859,7 @@ def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: :rtype: ~typetest.property.valuetypes.models.FloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5032,9 +4908,7 @@ def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: _models.FloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5048,9 +4922,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5064,9 +4936,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5091,7 +4961,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5162,7 +5032,7 @@ def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: :rtype: ~typetest.property.valuetypes.models.BooleanLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5211,7 +5081,7 @@ def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.BooleanLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5227,9 +5097,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5243,9 +5111,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5270,7 +5136,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5342,7 +5208,7 @@ def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionStringLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5391,7 +5257,7 @@ def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.UnionStringLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5407,9 +5273,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5423,9 +5287,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5451,7 +5313,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5522,7 +5384,7 @@ def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionIntLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5571,7 +5433,7 @@ def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.UnionIntLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5587,9 +5449,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5603,9 +5463,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5630,7 +5488,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5702,7 +5560,7 @@ def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: :rtype: ~typetest.property.valuetypes.models.UnionFloatLiteralProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5751,7 +5609,7 @@ def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.UnionFloatLiteralProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5767,9 +5625,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5783,9 +5639,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5810,7 +5664,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5881,7 +5735,7 @@ def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: :rtype: ~typetest.property.valuetypes.models.UnionEnumValueProperty :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5930,7 +5784,7 @@ def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: return deserialized # type: ignore @overload - def put( # pylint: disable=inconsistent-return-statements + def put( self, body: _models.UnionEnumValueProperty, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Put operation. @@ -5946,9 +5800,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5962,9 +5814,7 @@ def put( # pylint: disable=inconsistent-return-statements """ @overload - def put( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Put operation. :param body: body. Required. @@ -5989,7 +5839,7 @@ def put( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py index c7e5286526c..dbe8eab706d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ import decimal import json import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -48,7 +48,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -77,7 +77,7 @@ async def get(self, **kwargs: Any) -> str: :rtype: str :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -125,7 +125,7 @@ async def get(self, **kwargs: Any) -> str: return deserialized # type: ignore - async def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put(self, body: str, **kwargs: Any) -> None: """put string value. :param body: _. Required. @@ -134,7 +134,7 @@ async def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -200,7 +200,7 @@ async def get(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -248,7 +248,7 @@ async def get(self, **kwargs: Any) -> bool: return deserialized # type: ignore - async def put(self, body: bool, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put(self, body: bool, **kwargs: Any) -> None: """put boolean value. :param body: _. Required. @@ -257,7 +257,7 @@ async def put(self, body: bool, **kwargs: Any) -> None: # pylint: disable=incon :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -323,7 +323,7 @@ async def get(self, **kwargs: Any) -> Any: :rtype: any :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -371,7 +371,7 @@ async def get(self, **kwargs: Any) -> Any: return deserialized # type: ignore - async def put(self, body: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + async def put(self, body: Any, **kwargs: Any) -> None: """put unknown value. :param body: _. Required. @@ -380,7 +380,7 @@ async def put(self, body: Any, **kwargs: Any) -> None: # pylint: disable=incons :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -446,7 +446,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: :rtype: ~decimal.Decimal :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -494,9 +494,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: return deserialized # type: ignore - async def request_body( # pylint: disable=inconsistent-return-statements - self, body: decimal.Decimal, **kwargs: Any - ) -> None: + async def request_body(self, body: decimal.Decimal, **kwargs: Any) -> None: """request_body. :param body: Required. @@ -505,7 +503,7 @@ async def request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -546,9 +544,7 @@ async def request_body( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def request_parameter( # pylint: disable=inconsistent-return-statements - self, *, value: decimal.Decimal, **kwargs: Any - ) -> None: + async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> None: """request_parameter. :keyword value: Required. @@ -557,7 +553,7 @@ async def request_parameter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -619,7 +615,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: :rtype: ~decimal.Decimal :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -667,9 +663,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: return deserialized # type: ignore - async def request_body( # pylint: disable=inconsistent-return-statements - self, body: decimal.Decimal, **kwargs: Any - ) -> None: + async def request_body(self, body: decimal.Decimal, **kwargs: Any) -> None: """request_body. :param body: Required. @@ -678,7 +672,7 @@ async def request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -719,9 +713,7 @@ async def request_body( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore - async def request_parameter( # pylint: disable=inconsistent-return-statements - self, *, value: decimal.Decimal, **kwargs: Any - ) -> None: + async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> None: """request_parameter. :keyword value: Required. @@ -730,7 +722,7 @@ async def request_parameter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -792,7 +784,7 @@ async def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: :rtype: list[~decimal.Decimal] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -840,9 +832,7 @@ async def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: return deserialized # type: ignore - async def verify( # pylint: disable=inconsistent-return-statements - self, body: decimal.Decimal, **kwargs: Any - ) -> None: + async def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: """verify. :param body: Required. @@ -851,7 +841,7 @@ async def verify( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -917,7 +907,7 @@ async def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: :rtype: list[~decimal.Decimal] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -965,9 +955,7 @@ async def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: return deserialized # type: ignore - async def verify( # pylint: disable=inconsistent-return-statements - self, body: decimal.Decimal, **kwargs: Any - ) -> None: + async def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: """verify. :param body: Required. @@ -976,7 +964,7 @@ async def verify( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/_operations.py index 1505bfc06cd..527cb8972fb 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ import decimal import json import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar +from typing import Any, Callable, Dict, List, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -31,7 +31,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -280,7 +280,7 @@ def get(self, **kwargs: Any) -> str: :rtype: str :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -337,7 +337,7 @@ def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -403,7 +403,7 @@ def get(self, **kwargs: Any) -> bool: :rtype: bool :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -460,7 +460,7 @@ def put(self, body: bool, **kwargs: Any) -> None: # pylint: disable=inconsisten :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +526,7 @@ def get(self, **kwargs: Any) -> Any: :rtype: any :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -583,7 +583,7 @@ def put(self, body: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -649,7 +649,7 @@ def response_body(self, **kwargs: Any) -> decimal.Decimal: :rtype: ~decimal.Decimal :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -708,7 +708,7 @@ def request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -760,7 +760,7 @@ def request_parameter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -822,7 +822,7 @@ def response_body(self, **kwargs: Any) -> decimal.Decimal: :rtype: ~decimal.Decimal :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -881,7 +881,7 @@ def request_body( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -933,7 +933,7 @@ def request_parameter( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -995,7 +995,7 @@ def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: :rtype: list[~decimal.Decimal] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1052,7 +1052,7 @@ def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1118,7 +1118,7 @@ def prepare_verify(self, **kwargs: Any) -> List[decimal.Decimal]: :rtype: list[~decimal.Decimal] :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1175,7 +1175,7 @@ def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: # pylint: disab :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_model_base.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_serialization.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/_operations.py index c20339c5010..b69bc8385a4 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -53,7 +53,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -84,7 +84,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse9: :rtype: ~typetest.union.models.GetResponse9 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -133,9 +133,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse9: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -149,7 +147,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: Literal["a", "b", "c"], content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -166,9 +164,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -181,7 +177,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: Literal["a", "b", "c"] = _Unset, **kwargs: Any ) -> None: """send. @@ -195,7 +191,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -271,7 +267,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse8: :rtype: ~typetest.union.models.GetResponse8 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -320,9 +316,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse8: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -336,7 +330,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: Union[Literal["b"], Literal["c"], str], content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -352,9 +346,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -367,7 +359,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, @@ -384,7 +376,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -460,7 +452,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse7: :rtype: ~typetest.union.models.GetResponse7 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -509,9 +501,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse7: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -525,7 +515,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: Union[str, _models.StringExtensibleNamedUnion], @@ -545,9 +535,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -560,7 +548,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, @@ -577,7 +565,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -653,7 +641,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse6: :rtype: ~typetest.union.models.GetResponse6 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -702,9 +690,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse6: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -718,9 +704,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, *, prop: Literal[1, 2, 3], content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, *, prop: Literal[1, 2, 3], content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Is one of the following types: Literal[1], Literal[2], Literal[3] Required. @@ -734,9 +718,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -749,7 +731,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: Literal[1, 2, 3] = _Unset, **kwargs: Any ) -> None: """send. @@ -762,7 +744,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -838,7 +820,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse5: :rtype: ~typetest.union.models.GetResponse5 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -887,9 +869,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse5: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -903,9 +883,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, *, prop: float, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, *, prop: float, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Is one of the following types: float, float, float Required. @@ -919,9 +897,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -934,9 +910,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements - self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: float = _Unset, **kwargs: Any - ) -> None: + async def send(self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: float = _Unset, **kwargs: Any) -> None: """send. :param body: Is either a JSON type or a IO[bytes] type. Required. @@ -947,7 +921,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1023,7 +997,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse4: :rtype: ~typetest.union.models.GetResponse4 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1072,9 +1046,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse4: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1088,7 +1060,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: Union[_models.Cat, _models.Dog], content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1104,9 +1076,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1119,7 +1089,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: Union[_models.Cat, _models.Dog] = _Unset, **kwargs: Any ) -> None: """send. @@ -1132,7 +1102,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1208,7 +1178,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse3: :rtype: ~typetest.union.models.GetResponse3 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1257,9 +1227,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse3: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1273,7 +1241,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: _models.EnumsOnlyCases, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1289,9 +1257,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1304,7 +1270,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: _models.EnumsOnlyCases = _Unset, **kwargs: Any ) -> None: """send. @@ -1317,7 +1283,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1393,7 +1359,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse2: :rtype: ~typetest.union.models.GetResponse2 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1442,9 +1408,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse2: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1458,7 +1422,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: _models.StringAndArrayCases, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1474,9 +1438,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1489,7 +1451,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: _models.StringAndArrayCases = _Unset, **kwargs: Any ) -> None: """send. @@ -1502,7 +1464,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1578,7 +1540,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse1: :rtype: ~typetest.union.models.GetResponse1 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1627,9 +1589,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse1: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1643,7 +1603,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: _models.MixedLiteralsCases, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1659,9 +1619,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1674,7 +1632,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: _models.MixedLiteralsCases = _Unset, **kwargs: Any ) -> None: """send. @@ -1687,7 +1645,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1763,7 +1721,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse: :rtype: ~typetest.union.models.GetResponse :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1812,9 +1770,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse: return deserialized # type: ignore @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1828,7 +1784,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, *, prop: _models.MixedTypesCases, content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1844,9 +1800,7 @@ async def send( # pylint: disable=inconsistent-return-statements """ @overload - async def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + async def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1859,7 +1813,7 @@ async def send( # pylint: disable=inconsistent-return-statements :raises ~corehttp.exceptions.HttpResponseError: """ - async def send( # pylint: disable=inconsistent-return-statements + async def send( self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: _models.MixedTypesCases = _Unset, **kwargs: Any ) -> None: """send. @@ -1872,7 +1826,7 @@ async def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/models/_models.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/models/_models.py index cbbd2b28af1..f1dedaf281e 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/_operations.py index eaad33393b7..4669ba9a157 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -32,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _Unset: Any = object() T = TypeVar("T") @@ -346,7 +346,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse9: :rtype: ~typetest.union.models.GetResponse9 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -395,9 +395,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse9: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -411,9 +409,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: Literal["a", "b", "c"], content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: Literal["a", "b", "c"], content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Is one of the following types: Literal["a"], Literal["b"], Literal["c"] @@ -428,9 +424,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -457,7 +451,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -533,7 +527,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse8: :rtype: ~typetest.union.models.GetResponse8 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -582,9 +576,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse8: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -598,7 +590,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements + def send( self, *, prop: Union[Literal["b"], Literal["c"], str], content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -614,9 +606,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -646,7 +636,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -722,7 +712,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse7: :rtype: ~typetest.union.models.GetResponse7 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -771,9 +761,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse7: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -787,7 +775,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements + def send( self, *, prop: Union[str, _models.StringExtensibleNamedUnion], @@ -807,9 +795,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -839,7 +825,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -915,7 +901,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse6: :rtype: ~typetest.union.models.GetResponse6 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -964,9 +950,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse6: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -980,9 +964,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: Literal[1, 2, 3], content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: Literal[1, 2, 3], content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Is one of the following types: Literal[1], Literal[2], Literal[3] Required. @@ -996,9 +978,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1024,7 +1004,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1100,7 +1080,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse5: :rtype: ~typetest.union.models.GetResponse5 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1149,9 +1129,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse5: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1165,9 +1143,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: float, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: float, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Is one of the following types: float, float, float Required. @@ -1181,9 +1157,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1209,7 +1183,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1285,7 +1259,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse4: :rtype: ~typetest.union.models.GetResponse4 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1334,9 +1308,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse4: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1350,7 +1322,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements + def send( self, *, prop: Union[_models.Cat, _models.Dog], content_type: str = "application/json", **kwargs: Any ) -> None: """send. @@ -1366,9 +1338,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1394,7 +1364,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1470,7 +1440,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse3: :rtype: ~typetest.union.models.GetResponse3 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1519,9 +1489,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse3: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1535,9 +1503,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: _models.EnumsOnlyCases, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: _models.EnumsOnlyCases, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Required. @@ -1551,9 +1517,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1579,7 +1543,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1655,7 +1619,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse2: :rtype: ~typetest.union.models.GetResponse2 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1704,9 +1668,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse2: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1720,9 +1682,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: _models.StringAndArrayCases, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: _models.StringAndArrayCases, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Required. @@ -1736,9 +1696,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1764,7 +1722,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1840,7 +1798,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse1: :rtype: ~typetest.union.models.GetResponse1 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1889,9 +1847,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse1: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1905,9 +1861,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: _models.MixedLiteralsCases, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: _models.MixedLiteralsCases, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Required. @@ -1921,9 +1875,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -1949,7 +1901,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2025,7 +1977,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse: :rtype: ~typetest.union.models.GetResponse :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2074,9 +2026,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse: return deserialized # type: ignore @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -2090,9 +2040,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, *, prop: _models.MixedTypesCases, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, *, prop: _models.MixedTypesCases, content_type: str = "application/json", **kwargs: Any) -> None: """send. :keyword prop: Required. @@ -2106,9 +2054,7 @@ def send( # pylint: disable=inconsistent-return-statements """ @overload - def send( # pylint: disable=inconsistent-return-statements - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> None: + def send(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """send. :param body: Required. @@ -2134,7 +2080,7 @@ def send( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_serialization.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_types.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_types.py index 5131df7267f..2b25da117a8 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_types.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_types.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_vendor.py index 66d8e621f33..7dc51e75fe7 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AddedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_vendor.py index 9f2c962f703..c7bdbf9278b 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import AddedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/_operations.py index 87ba7036cac..11ccb08857d 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -38,7 +37,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -122,7 +121,7 @@ async def v2_in_interface(self, body: Union[_models.ModelV2, JSON, IO[bytes]], * :rtype: ~versioning.added.models.ModelV2 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -254,7 +253,7 @@ async def v1( :rtype: ~versioning.added.models.ModelV1 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -371,7 +370,7 @@ async def v2(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwargs: Any) :rtype: ~versioning.added.models.ModelV2 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/models/_models.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/models/_models.py index a5b079f9cc5..1affadeb6cc 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import _types, models as _models diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/_operations.py index 76e74fe2376..8b912047d5d 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -34,7 +33,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -171,7 +170,7 @@ def v2_in_interface(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwarg :rtype: ~versioning.added.models.ModelV2 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -301,7 +300,7 @@ def v1(self, body: Union[_models.ModelV1, JSON, IO[bytes]], *, header_v2: str, * :rtype: ~versioning.added.models.ModelV1 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -416,7 +415,7 @@ def v2(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwargs: Any) -> _m :rtype: ~versioning.added.models.ModelV2 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_configuration.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_configuration.py index 4071d0c054f..21c229ddf4e 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class MadeOptionalClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MadeOptionalClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MadeOptionalClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_operations/_operations.py index 51915dc7991..8a0e3b9e8cb 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -138,7 +137,7 @@ def test( :rtype: ~versioning.madeoptional.models.TestModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_serialization.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_vendor.py index 0d69ae60336..c0c50184a45 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MadeOptionalClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_configuration.py index 65f9c0f6356..203433cd462 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class MadeOptionalClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class MadeOptionalClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MadeOptionalClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/_operations.py index 28492f1ac2b..58c0d026ac8 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -113,7 +112,7 @@ async def test( :rtype: ~versioning.madeoptional.models.TestModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_vendor.py index fc169455532..15040851615 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import MadeOptionalClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/models/_models.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/models/_models.py index 81be5e262c9..7fb494e9673 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_operations/_operations.py index b3e8294aaa9..d9eb6f3e8d2 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -112,7 +111,7 @@ def v2(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwargs: Any) -> _m :rtype: ~versioning.removed.models.ModelV2 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_serialization.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_types.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_types.py index 96f29c8ded0..91dc324b10e 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_types.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_types.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_vendor.py index bb952057acc..66c2f382a00 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RemovedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_operations/_operations.py index 197b748799a..4cee4064add 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -94,7 +93,7 @@ async def v2(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwargs: Any) :rtype: ~versioning.removed.models.ModelV2 :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_vendor.py index 5bfee95e92f..3b22302293e 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RemovedClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/models/_models.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/models/_models.py index 791526768b2..f91f48ad214 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import _types, models as _models diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_configuration.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_configuration.py index e3ce6912ea2..d36eee5c04c 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class RenamedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RenamedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RenamedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_serialization.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_types.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_types.py index 7d43dbfcb69..fa94fcd4e5b 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_types.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_types.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_vendor.py index 7a310131c22..b5085b8fcf8 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RenamedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_configuration.py index e17e8126d7d..b53eeb0f87b 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class RenamedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class RenamedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for RenamedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_vendor.py index a5a995d339f..27b91d09e05 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import RenamedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py index 52dd88a67d9..2f719ddeca5 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -36,7 +35,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -118,7 +117,7 @@ async def new_op_in_new_interface( :rtype: ~versioning.renamedfrom.models.NewModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -247,7 +246,7 @@ async def new_op( :rtype: ~versioning.renamedfrom.models.NewModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/models/_models.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/models/_models.py index ef2df84e987..627903e1768 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -13,7 +12,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import _types, models as _models diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py index a12b185931f..1300645d054 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -156,7 +155,7 @@ def new_op_in_new_interface( :rtype: ~versioning.renamedfrom.models.NewModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -285,7 +284,7 @@ def new_op( :rtype: ~versioning.renamedfrom.models.NewModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_configuration.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_configuration.py index 463a92216c3..567f723b239 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class ReturnTypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ReturnTypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ReturnTypeChangedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/_operations.py index 774653c3a17..aff015cf4a3 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +65,7 @@ def test(self, body: str, **kwargs: Any) -> str: :rtype: str :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_serialization.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_vendor.py index f984828d3a1..921bedc1b2a 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ReturnTypeChangedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_configuration.py index 74e421d7105..8dd55853deb 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class ReturnTypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ReturnTypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ReturnTypeChangedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/_operations.py index ff77485dcfd..b04e33f2992 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -8,7 +7,7 @@ # -------------------------------------------------------------------------- import json import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Optional, TypeVar from corehttp.exceptions import ( ClientAuthenticationError, @@ -31,7 +30,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +46,7 @@ async def test(self, body: str, **kwargs: Any) -> str: :rtype: str :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_vendor.py index 7cb7c1e1ffd..e6662b31207 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import ReturnTypeChangedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_configuration.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_configuration.py index d073379b4f7..f84ed6b14ef 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_configuration.py @@ -14,7 +14,7 @@ from ._version import VERSION -class TypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TypeChangedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_model_base.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_model_base.py index 73e4204301c..b8d9d3807af 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_model_base.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_model_base.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators): return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/_operations.py index dcfa709f49a..ba91e25acb5 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -130,7 +129,7 @@ def test(self, body: Union[_models.TestModel, JSON, IO[bytes]], *, param: str, * :rtype: ~versioning.typechangedfrom.models.TestModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_serialization.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_serialization.py index 3ef87d7b1ce..256a27332a7 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_serialization.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Unbranded Corporation. All rights reserved. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_vendor.py index 703acf3267a..2c9ee098c51 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import TypeChangedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import PipelineClient from ._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_configuration.py index beba7214f2a..47a9dced2a8 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_configuration.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_configuration.py @@ -14,7 +14,7 @@ from .._version import VERSION -class TypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class TypeChangedFromClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for TypeChangedFromClient. Note that all parameters used to create this instance are saved as instance diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/_operations.py index e0e81faf091..f3c53ed03b3 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. @@ -9,7 +8,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from corehttp.exceptions import ( ClientAuthenticationError, @@ -33,7 +32,7 @@ if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -108,7 +107,7 @@ async def test( :rtype: ~versioning.typechangedfrom.models.TestModel :raises ~corehttp.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_vendor.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_vendor.py index d240402934e..b211a6c5177 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_vendor.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_vendor.py @@ -11,7 +11,6 @@ from ._configuration import TypeChangedFromClientConfiguration if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from corehttp.runtime import AsyncPipelineClient from .._serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/models/_models.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/models/_models.py index fa1ef374daf..489b6d550d8 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/models/_models.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Unbranded Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. diff --git a/packages/typespec-python/test/unbranded/tox.ini b/packages/typespec-python/test/unbranded/tox.ini index 6db81171630..3d90523a180 100644 --- a/packages/typespec-python/test/unbranded/tox.ini +++ b/packages/typespec-python/test/unbranded/tox.ini @@ -11,6 +11,27 @@ commands= pytest [testenv:ci] +deps= + -r requirements.txt +commands = + # pytest + pytest mock_api_tests ../generic_mock_api_tests {posargs} + + # pylint + pip install azure-pylint-guidelines-checker==0.4.1 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + python ../../../eng/scripts/ci/run_pylint.py -t azure -s "generated" {posargs} + + # mypy + python ../../../eng/scripts/ci/run_mypy.py -t azure -s "generated" {posargs} + + # pyright + python ../../../eng/scripts/ci/run_pyright.py -t azure -s "generated" {posargs} + + # apiview + pip install ../../../../../azure-sdk-tools/packages/python-packages/apiview-stub-generator --extra-index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + python ../../../../eng/scripts/run_apiview.py -p typespec-python -t azure -s "generated" {posargs} + +[testenv:test] commands = pytest mock_api_tests ../generic_mock_api_tests {posargs}