Skip to content

Commit a0423fc

Browse files
Fix typing
1 parent 0b0e347 commit a0423fc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

shared/python/authfactory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Factory for creating authentication tokens or objects for Azure API Management samples.
33
"""
44

5-
from typing import Any, Optional
5+
from typing import Any
66
from users import User
77
import jwt
88
import time

shared/python/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import inspect
1818
from pathlib import Path
1919

20-
from typing import Optional, Tuple
20+
from typing import Any, Optional, Tuple
2121
from apimtypes import APIM_SKU, HTTP_VERB, INFRASTRUCTURE
2222

2323

@@ -153,7 +153,7 @@ def get(self, key: str, label: str = '', secure: bool = False) -> str | None:
153153

154154
return None
155155

156-
def getJson(self, key: str, label: str = '', secure: bool = False) -> any:
156+
def getJson(self, key: str, label: str = '', secure: bool = False) -> Any:
157157
"""
158158
Retrieve a deployment output property by key and return it as a JSON object.
159159
This method is independent from get() and retrieves the raw deployment output value.
@@ -164,7 +164,7 @@ def getJson(self, key: str, label: str = '', secure: bool = False) -> any:
164164
secure (bool, optional): If True, masks the value in logs.
165165
166166
Returns:
167-
any: The value as a JSON object (dict, list, etc.), or the original value if not JSON, or None if not found.
167+
Any: The value as a JSON object (dict, list, etc.), or the original value if not JSON, or None if not found.
168168
"""
169169

170170
try:
@@ -855,7 +855,7 @@ def cleanup_deployment(deployment: str, indexes: int | list[int] | None = None)
855855
rg_name = get_rg_name(deployment, idx)
856856
_cleanup_resources(deployment, rg_name)
857857

858-
def extract_json(text: str) -> any:
858+
def extract_json(text: str) -> Any:
859859
"""
860860
Extract the first valid JSON object or array from a string and return it as a Python object.
861861

0 commit comments

Comments
 (0)