Skip to content

Typing for appconfiguration #11427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2020
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@
)
from ._sync_token import SyncTokenPolicy
from ._user_agent import USER_AGENT
try:
from typing import TYPE_CHECKING
except ImportError:
TYPE_CHECKING = False

if TYPE_CHECKING:
# pylint:disable=unused-import,ungrouped-imports
from typing import Any, Optional

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

def __init__(self, base_url, credential, **kwargs):
# type: (str, any, dict) -> None
# type: (str, Any, dict) -> None
try:
if not base_url.lower().startswith('http'):
base_url = "https://" + base_url
Expand Down Expand Up @@ -89,7 +96,7 @@ def from_connection_string(
connection_string,
**kwargs
):
# type: (string, dict) -> AzureAppConfigurationClient
# type: (str, dict) -> AzureAppConfigurationClient
"""Create AzureAppConfigurationClient from a Connection String.

:param connection_string: Connection String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
from .._models import ConfigurationSetting
from .._sync_token import SyncTokenPolicy
from .._user_agent import USER_AGENT
try:
from typing import TYPE_CHECKING
except ImportError:
TYPE_CHECKING = False

if TYPE_CHECKING:
# pylint:disable=unused-import,ungrouped-imports
from typing import Any, Optional


class AzureAppConfigurationClient:
Expand All @@ -57,7 +65,7 @@ class AzureAppConfigurationClient:
# pylint:disable=protected-access

def __init__(self, base_url, credential, **kwargs):
# type: (str, any, dict) -> None
# type: (str, Any, dict) -> None
try:
if not base_url.lower().startswith('http'):
base_url = "https://" + base_url
Expand Down Expand Up @@ -93,7 +101,7 @@ def from_connection_string(
connection_string,
**kwargs
):
# type: (string, dict) -> AzureAppConfigurationClient
# type: (str, dict) -> AzureAppConfigurationClient
"""Create AzureAppConfigurationClient from a Connection String.

:param connection_string: Connection String
Expand Down
2 changes: 1 addition & 1 deletion sdk/appconfiguration/azure-appconfiguration/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
author_email='[email protected]',
url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/appconfiguration/azure-appconfiguration',
classifiers=[
'Development Status :: 4 - Beta',
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
Expand Down