Skip to content

Commit d91a17b

Browse files
authored
Typing for appconfiguration (#11427)
* updates * typo
1 parent 24747c2 commit d91a17b

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@
3737
)
3838
from ._sync_token import SyncTokenPolicy
3939
from ._user_agent import USER_AGENT
40+
try:
41+
from typing import TYPE_CHECKING
42+
except ImportError:
43+
TYPE_CHECKING = False
4044

45+
if TYPE_CHECKING:
46+
# pylint:disable=unused-import,ungrouped-imports
47+
from typing import Any, Optional
4148

4249
class AzureAppConfigurationClient:
4350
"""Represents an client that calls restful API of Azure App Configuration service.
@@ -54,7 +61,7 @@ class AzureAppConfigurationClient:
5461
# pylint:disable=protected-access
5562

5663
def __init__(self, base_url, credential, **kwargs):
57-
# type: (str, any, dict) -> None
64+
# type: (str, Any, dict) -> None
5865
try:
5966
if not base_url.lower().startswith('http'):
6067
base_url = "https://" + base_url
@@ -89,7 +96,7 @@ def from_connection_string(
8996
connection_string,
9097
**kwargs
9198
):
92-
# type: (string, dict) -> AzureAppConfigurationClient
99+
# type: (str, dict) -> AzureAppConfigurationClient
93100
"""Create AzureAppConfigurationClient from a Connection String.
94101
95102
:param connection_string: Connection String

sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/aio/_azure_configuration_client_async.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
from .._models import ConfigurationSetting
3939
from .._sync_token import SyncTokenPolicy
4040
from .._user_agent import USER_AGENT
41+
try:
42+
from typing import TYPE_CHECKING
43+
except ImportError:
44+
TYPE_CHECKING = False
45+
46+
if TYPE_CHECKING:
47+
# pylint:disable=unused-import,ungrouped-imports
48+
from typing import Any, Optional
4149

4250

4351
class AzureAppConfigurationClient:
@@ -57,7 +65,7 @@ class AzureAppConfigurationClient:
5765
# pylint:disable=protected-access
5866

5967
def __init__(self, base_url, credential, **kwargs):
60-
# type: (str, any, dict) -> None
68+
# type: (str, Any, dict) -> None
6169
try:
6270
if not base_url.lower().startswith('http'):
6371
base_url = "https://" + base_url
@@ -93,7 +101,7 @@ def from_connection_string(
93101
connection_string,
94102
**kwargs
95103
):
96-
# type: (string, dict) -> AzureAppConfigurationClient
104+
# type: (str, dict) -> AzureAppConfigurationClient
97105
"""Create AzureAppConfigurationClient from a Connection String.
98106
99107
:param connection_string: Connection String

sdk/appconfiguration/azure-appconfiguration/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
author_email='[email protected]',
7474
url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/appconfiguration/azure-appconfiguration',
7575
classifiers=[
76-
'Development Status :: 4 - Beta',
76+
'Development Status :: 5 - Production/Stable',
7777
'Programming Language :: Python',
7878
'Programming Language :: Python :: 2',
7979
'Programming Language :: Python :: 2.7',

0 commit comments

Comments
 (0)