diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json b/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json index b2c662c901a2..4c390b05a6a3 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json +++ b/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json @@ -1,6 +1,6 @@ { - "commit": "4883fa5dbf6f2c9093fac8ce334547e9dfac68fa", + "commit": "6728221baeb434b39023ca36419b0f9910ad0341", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/computeschedule/ComputeSchedule.Management", - "@azure-tools/typespec-python": "0.33.0" + "@azure-tools/typespec-python": "0.36.0" } \ No newline at end of file diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/__init__.py index 8cec50265ad7..a2f118736556 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/__init__.py @@ -21,6 +21,6 @@ __all__ = [ "ComputeScheduleMgmtClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py index a050f7c069da..accde9efba1b 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py @@ -20,11 +20,10 @@ from .operations import Operations, ScheduledActionsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeScheduleMgmtClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeScheduleMgmtClient: """Microsoft.ComputeSchedule Resource Provider management API. :ivar operations: Operations operations diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py index 271cb819f5a3..5df44daa41aa 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_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 ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeScheduleMgmtClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py index 12ad7f29c71e..9d401b0cf012 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_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/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py index 01a226bd7f14..480e941d758f 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. @@ -227,7 +226,7 @@ class _FixedOffset(datetime.tzinfo): # type: ignore :param datetime.timedelta offset: offset in timedelta format """ - def __init__(self, offset): + def __init__(self, offset) -> None: self.__offset = offset def utcoffset(self, dt): @@ -599,7 +598,7 @@ class Serializer(object): # pylint: disable=too-many-public-methods "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -1453,7 +1452,7 @@ class Deserializer(object): valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/__init__.py index 94312ca9b1aa..48ec06a3af2b 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/__init__.py @@ -18,6 +18,6 @@ __all__ = [ "ComputeScheduleMgmtClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py index 4594ec5d1690..b30469a17e26 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py @@ -20,11 +20,10 @@ from .operations import Operations, ScheduledActionsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeScheduleMgmtClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeScheduleMgmtClient: """Microsoft.ComputeSchedule Resource Provider management API. :ivar operations: Operations operations diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_configuration.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_configuration.py index c661c7bcc36f..ba402415feb7 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_configuration.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/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 ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeScheduleMgmtClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/__init__.py index 39cb4fb555d4..e2ea6b1501af 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/__init__.py @@ -17,5 +17,5 @@ "Operations", "ScheduledActionsOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py index 11ed53ea0da1..217c5508fa47 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/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, 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 @@ -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 @@ -84,7 +84,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -254,7 +254,7 @@ async def virtual_machines_submit_deallocate( :rtype: ~azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse :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 virtual_machines_submit_hibernate( :rtype: ~azure.mgmt.computeschedule.models.HibernateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -538,7 +538,7 @@ async def virtual_machines_submit_start( :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse :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 +682,7 @@ async def virtual_machines_execute_deallocate( :rtype: ~azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse :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 @@ async def virtual_machines_execute_hibernate( :rtype: ~azure.mgmt.computeschedule.models.HibernateResourceOperationResponse :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,7 +966,7 @@ async def virtual_machines_execute_start( :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse :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 @@ async def virtual_machines_get_operation_status( :rtype: ~azure.mgmt.computeschedule.models.GetOperationStatusResponse :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 @@ async def virtual_machines_cancel_operations( :rtype: ~azure.mgmt.computeschedule.models.CancelOperationsResponse :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 @@ async def virtual_machines_get_operation_errors( :rtype: ~azure.mgmt.computeschedule.models.GetOperationErrorsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py index 6858308956a7..42c67a6b3c85 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py @@ -83,5 +83,5 @@ "Origin", "ResourceOperationType", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py index cbc2b702c556..640fc13a4422 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/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_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -25,14 +24,14 @@ class CancelOperationsRequest(_model_base.Model): :ivar operation_ids: The list of operation ids to cancel operations on. Required. :vartype operation_ids: list[str] - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ operation_ids: List[str] = rest_field(name="operationIds") """The list of operation ids to cancel operations on. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -40,10 +39,10 @@ def __init__( *, operation_ids: List[str], correlationid: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -69,10 +68,10 @@ def __init__( self, *, results: List["_models.ResourceOperation"], - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -113,10 +112,10 @@ def __init__( type: str, location: str, results: Optional[List["_models.ResourceOperation"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -190,10 +189,10 @@ def __init__( self, *, error: Optional["_models.ErrorDetail"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -212,7 +211,7 @@ class ExecuteDeallocateRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -221,7 +220,7 @@ class ExecuteDeallocateRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -230,10 +229,10 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -252,7 +251,7 @@ class ExecuteHibernateRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -261,7 +260,7 @@ class ExecuteHibernateRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -270,10 +269,10 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -292,7 +291,7 @@ class ExecuteStartRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -301,7 +300,7 @@ class ExecuteStartRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -310,10 +309,10 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -348,10 +347,10 @@ def __init__( *, optimization_preference: Optional[Union[str, "_models.OptimizationPreference"]] = None, retry_policy: Optional["_models.RetryPolicy"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -378,10 +377,10 @@ def __init__( self, *, operation_ids: List[str], - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -407,10 +406,10 @@ def __init__( self, *, results: List["_models.OperationErrorsResult"], - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -427,14 +426,14 @@ class GetOperationStatusRequest(_model_base.Model): :ivar operation_ids: The list of operation ids to get the status of. Required. :vartype operation_ids: list[str] - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ operation_ids: List[str] = rest_field(name="operationIds") """The list of operation ids to get the status of. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -442,10 +441,10 @@ def __init__( *, operation_ids: List[str], correlationid: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -471,10 +470,10 @@ def __init__( self, *, results: List["_models.ResourceOperation"], - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -515,10 +514,10 @@ def __init__( type: str, location: str, results: Optional[List["_models.ResourceOperation"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -572,10 +571,10 @@ def __init__( self, *, action_type: Optional[Union[str, "_models.ActionType"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -649,10 +648,10 @@ def __init__( error_details: datetime.datetime, time_stamp: datetime.datetime, crp_operation_id: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -708,10 +707,10 @@ def __init__( operation_errors: Optional[List["_models.OperationErrorDetails"]] = None, request_error_code: Optional[str] = None, request_error_details: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -751,10 +750,10 @@ def __init__( error_code: Optional[str] = None, error_details: Optional[str] = None, operation: Optional["_models.ResourceOperationDetails"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -839,10 +838,10 @@ def __init__( resource_operation_error: Optional["_models.ResourceOperationError"] = None, completed_at: Optional[datetime.datetime] = None, retry_policy: Optional["_models.RetryPolicy"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -873,10 +872,10 @@ def __init__( *, error_code: str, error_details: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -903,10 +902,10 @@ def __init__( self, *, ids: List[str], - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -936,10 +935,10 @@ def __init__( *, retry_count: Optional[int] = None, retry_window_in_minutes: Optional[int] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -978,10 +977,10 @@ def __init__( dead_line: datetime.datetime, time_zone: str, deadline_type: Union[str, "_models.DeadlineType"], - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -1022,10 +1021,10 @@ def __init__( type: str, location: str, results: Optional[List["_models.ResourceOperation"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -1046,7 +1045,7 @@ class SubmitDeallocateRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -1057,7 +1056,7 @@ class SubmitDeallocateRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -1067,10 +1066,10 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -1091,7 +1090,7 @@ class SubmitHibernateRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -1102,7 +1101,7 @@ class SubmitHibernateRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -1112,10 +1111,10 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] @@ -1136,7 +1135,7 @@ class SubmitStartRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -1147,7 +1146,7 @@ class SubmitStartRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -1157,10 +1156,10 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/__init__.py index 39cb4fb555d4..e2ea6b1501af 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/__init__.py @@ -17,5 +17,5 @@ "Operations", "ScheduledActionsOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py index bd6da5b14722..65a7b5bd4340 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/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, 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 +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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -364,7 +364,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: cls: ClsType[List[_models.Operation]] = 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 +534,7 @@ def virtual_machines_submit_deallocate( :rtype: ~azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse :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 +678,7 @@ def virtual_machines_submit_hibernate( :rtype: ~azure.mgmt.computeschedule.models.HibernateResourceOperationResponse :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 virtual_machines_submit_start( :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse :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 +962,7 @@ def virtual_machines_execute_deallocate( :rtype: ~azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse :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 virtual_machines_execute_hibernate( :rtype: ~azure.mgmt.computeschedule.models.HibernateResourceOperationResponse :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 +1246,7 @@ def virtual_machines_execute_start( :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse :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 +1390,7 @@ def virtual_machines_get_operation_status( :rtype: ~azure.mgmt.computeschedule.models.GetOperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1534,7 +1534,7 @@ def virtual_machines_cancel_operations( :rtype: ~azure.mgmt.computeschedule.models.CancelOperationsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1682,7 +1682,7 @@ def virtual_machines_get_operation_errors( :rtype: ~azure.mgmt.computeschedule.models.GetOperationErrorsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_async_test.py b/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_async_test.py index cc7bbcb621ab..56159aa9035c 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_async_test.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_async_test.py @@ -25,4 +25,3 @@ async def test_operations_list(self, resource_group): response = self.client.operations.list() result = [r async for r in response] assert result - diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_test.py b/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_test.py index 535047551112..b4f9009c66bc 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_test.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_test.py @@ -24,4 +24,3 @@ def test_operations_list(self, resource_group): response = self.client.operations.list() result = [r for r in response] assert result - diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml b/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml index 68e2a76acd98..b5bc2fde8b21 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml +++ b/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/computeschedule/ComputeSchedule.Management -commit: 4883fa5dbf6f2c9093fac8ce334547e9dfac68fa +commit: 6728221baeb434b39023ca36419b0f9910ad0341 repo: Azure/azure-rest-api-specs additionalDirectories: