1- # pylint: disable=too-many-lines,too-many-statements
1+ # pylint: disable=too-many-lines
22# coding=utf-8
33# --------------------------------------------------------------------------
44# Copyright (c) Microsoft Corporation. All rights reserved.
99from io import IOBase
1010import json
1111import sys
12- from typing import (
13- Any ,
14- AsyncIterable ,
15- AsyncIterator ,
16- Callable ,
17- Dict ,
18- IO ,
19- List ,
20- Optional ,
21- Type ,
22- TypeVar ,
23- Union ,
24- cast ,
25- overload ,
26- )
12+ from typing import Any , AsyncIterable , AsyncIterator , Callable , Dict , IO , List , Optional , TypeVar , Union , cast , overload
2713import urllib .parse
2814
2915from azure .core .async_paging import AsyncItemPaged , AsyncList
6753if sys .version_info >= (3 , 9 ):
6854 from collections .abc import MutableMapping
6955else :
70- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
56+ from typing import MutableMapping # type: ignore
7157T = TypeVar ("T" )
7258ClsType = Optional [Callable [[PipelineResponse [HttpRequest , AsyncHttpResponse ], T , Dict [str , Any ]], Any ]]
7359JSON = MutableMapping [str , Any ] # pylint: disable=unsubscriptable-object
@@ -103,7 +89,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]:
10389
10490 cls : ClsType [List [_models .Operation ]] = kwargs .pop ("cls" , None )
10591
106- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
92+ error_map : MutableMapping = {
10793 401 : ClientAuthenticationError ,
10894 404 : ResourceNotFoundError ,
10995 409 : ResourceExistsError ,
@@ -204,7 +190,7 @@ async def get(self, resource_group_name: str, account_name: str, **kwargs: Any)
204190 :rtype: ~azure.mgmt.trustedsigning.models.CodeSigningAccount
205191 :raises ~azure.core.exceptions.HttpResponseError:
206192 """
207- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
193+ error_map : MutableMapping = {
208194 401 : ClientAuthenticationError ,
209195 404 : ResourceNotFoundError ,
210196 409 : ResourceExistsError ,
@@ -264,7 +250,7 @@ async def _create_initial(
264250 resource : Union [_models .CodeSigningAccount , JSON , IO [bytes ]],
265251 ** kwargs : Any
266252 ) -> AsyncIterator [bytes ]:
267- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
253+ error_map : MutableMapping = {
268254 401 : ClientAuthenticationError ,
269255 404 : ResourceNotFoundError ,
270256 409 : ResourceExistsError ,
@@ -497,7 +483,7 @@ async def _update_initial(
497483 properties : Union [_models .CodeSigningAccountPatch , JSON , IO [bytes ]],
498484 ** kwargs : Any
499485 ) -> AsyncIterator [bytes ]:
500- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
486+ error_map : MutableMapping = {
501487 401 : ClientAuthenticationError ,
502488 404 : ResourceNotFoundError ,
503489 409 : ResourceExistsError ,
@@ -726,7 +712,7 @@ def get_long_running_output(pipeline_response):
726712 )
727713
728714 async def _delete_initial (self , resource_group_name : str , account_name : str , ** kwargs : Any ) -> AsyncIterator [bytes ]:
729- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
715+ error_map : MutableMapping = {
730716 401 : ClientAuthenticationError ,
731717 404 : ResourceNotFoundError ,
732718 409 : ResourceExistsError ,
@@ -856,7 +842,7 @@ def list_by_resource_group(
856842
857843 cls : ClsType [List [_models .CodeSigningAccount ]] = kwargs .pop ("cls" , None )
858844
859- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
845+ error_map : MutableMapping = {
860846 401 : ClientAuthenticationError ,
861847 404 : ResourceNotFoundError ,
862848 409 : ResourceExistsError ,
@@ -942,7 +928,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.CodeSign
942928
943929 cls : ClsType [List [_models .CodeSigningAccount ]] = kwargs .pop ("cls" , None )
944930
945- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
931+ error_map : MutableMapping = {
946932 401 : ClientAuthenticationError ,
947933 404 : ResourceNotFoundError ,
948934 409 : ResourceExistsError ,
@@ -1078,7 +1064,7 @@ async def check_name_availability(
10781064 :rtype: ~azure.mgmt.trustedsigning.models.CheckNameAvailabilityResult
10791065 :raises ~azure.core.exceptions.HttpResponseError:
10801066 """
1081- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
1067+ error_map : MutableMapping = {
10821068 401 : ClientAuthenticationError ,
10831069 404 : ResourceNotFoundError ,
10841070 409 : ResourceExistsError ,
@@ -1174,7 +1160,7 @@ async def get(
11741160 :rtype: ~azure.mgmt.trustedsigning.models.CertificateProfile
11751161 :raises ~azure.core.exceptions.HttpResponseError:
11761162 """
1177- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
1163+ error_map : MutableMapping = {
11781164 401 : ClientAuthenticationError ,
11791165 404 : ResourceNotFoundError ,
11801166 409 : ResourceExistsError ,
@@ -1236,7 +1222,7 @@ async def _create_initial(
12361222 resource : Union [_models .CertificateProfile , JSON , IO [bytes ]],
12371223 ** kwargs : Any
12381224 ) -> AsyncIterator [bytes ]:
1239- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
1225+ error_map : MutableMapping = {
12401226 401 : ClientAuthenticationError ,
12411227 404 : ResourceNotFoundError ,
12421228 409 : ResourceExistsError ,
@@ -1479,7 +1465,7 @@ def get_long_running_output(pipeline_response):
14791465 async def _delete_initial (
14801466 self , resource_group_name : str , account_name : str , profile_name : str , ** kwargs : Any
14811467 ) -> AsyncIterator [bytes ]:
1482- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
1468+ error_map : MutableMapping = {
14831469 401 : ClientAuthenticationError ,
14841470 404 : ResourceNotFoundError ,
14851471 409 : ResourceExistsError ,
@@ -1617,7 +1603,7 @@ def list_by_code_signing_account(
16171603
16181604 cls : ClsType [List [_models .CertificateProfile ]] = kwargs .pop ("cls" , None )
16191605
1620- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
1606+ error_map : MutableMapping = {
16211607 401 : ClientAuthenticationError ,
16221608 404 : ResourceNotFoundError ,
16231609 409 : ResourceExistsError ,
@@ -1691,7 +1677,7 @@ async def get_next(next_link=None):
16911677 return AsyncItemPaged (get_next , extract_data )
16921678
16931679 @overload
1694- async def revoke_certificate ( # pylint: disable=inconsistent-return-statements
1680+ async def revoke_certificate (
16951681 self ,
16961682 resource_group_name : str ,
16971683 account_name : str ,
@@ -1721,7 +1707,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
17211707 """
17221708
17231709 @overload
1724- async def revoke_certificate ( # pylint: disable=inconsistent-return-statements
1710+ async def revoke_certificate (
17251711 self ,
17261712 resource_group_name : str ,
17271713 account_name : str ,
@@ -1751,7 +1737,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
17511737 """
17521738
17531739 @overload
1754- async def revoke_certificate ( # pylint: disable=inconsistent-return-statements
1740+ async def revoke_certificate (
17551741 self ,
17561742 resource_group_name : str ,
17571743 account_name : str ,
@@ -1781,7 +1767,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
17811767 """
17821768
17831769 @distributed_trace_async
1784- async def revoke_certificate ( # pylint: disable=inconsistent-return-statements
1770+ async def revoke_certificate (
17851771 self ,
17861772 resource_group_name : str ,
17871773 account_name : str ,
@@ -1805,7 +1791,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
18051791 :rtype: None
18061792 :raises ~azure.core.exceptions.HttpResponseError:
18071793 """
1808- error_map : MutableMapping [ int , Type [ HttpResponseError ]] = { # pylint: disable=unsubscriptable-object
1794+ error_map : MutableMapping = {
18091795 401 : ClientAuthenticationError ,
18101796 404 : ResourceNotFoundError ,
18111797 409 : ResourceExistsError ,
0 commit comments