Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/computeschedule/azure-mgmt-computeschedule/_meta.json
Original file line number Diff line number Diff line change
@@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Loading