Skip to content
Open
Show file tree
Hide file tree
Changes from 7 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 @@ -45,7 +45,7 @@
from ._audience_error_handling_policy import AudienceErrorHandlingPolicy


class AzureAppConfigurationClient:
class AzureAppConfigurationClient: # pylint: disable=docstring-keyword-should-match-keyword-only
"""Represents a client that calls restful API of Azure App Configuration service.

:param str base_url: Base url of the service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
from .._audience_error_handling_policy import AudienceErrorHandlingPolicy


class AzureAppConfigurationClient:
class AzureAppConfigurationClient: # pylint: disable=docstring-keyword-should-match-keyword-only
"""Represents a client that calls restful API of Azure App Configuration service.

:param str base_url: Base url of the service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# license information.
# --------------------------------------------------------------------------

from azure.appconfiguration._audience import get_audience
from azure.appconfiguration._audience import get_audience # pylint: disable=no-cross-package-private-import

# Expected scope constants
_EXPECTED_PUBLIC_CLOUD_AUDIENCE = "https://appconfig.azure.com/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from testcase import AppConfigTestCase
from consts import APPCONFIGURATION_ENDPOINT_STRING
from devtools_testutils import EnvironmentVariableLoader, recorded_by_proxy
from azure.appconfiguration._audience_error_handling_policy import (
from azure.appconfiguration._audience_error_handling_policy import ( # pylint: disable=no-cross-package-private-import

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the correct way to fix this. I've already created an issue to have tests/samples ignore some of these warning. #48308

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the correct approach? Matthew Metcalf (@mrm9084)

AudienceErrorHandlingPolicy,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from consts import APPCONFIGURATION_ENDPOINT_STRING
from devtools_testutils import EnvironmentVariableLoader
from devtools_testutils.aio import recorded_by_proxy_async
from azure.appconfiguration._audience_error_handling_policy import (
from azure.appconfiguration._audience_error_handling_policy import ( # pylint: disable=no-cross-package-private-import
AudienceErrorHandlingPolicy,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# -------------------------------------------------------------------------
import pytest
from azure.core.exceptions import ClientAuthenticationError
from azure.appconfiguration._audience_error_handling_policy import (
from azure.appconfiguration._audience_error_handling_policy import ( # pylint: disable=no-cross-package-private-import
AudienceErrorHandlingPolicy,
AAD_AUDIENCE_ERROR_CODE,
NO_AUDIENCE_ERROR_MESSAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,9 @@ def send(self, request: PipelineRequest, **kwargs) -> PipelineResponse:
def new_method(request):
request.http_request.headers["Authorization"] = str(uuid4())

from azure.appconfiguration._azure_appconfiguration_requests import AppConfigRequestsCredentialsPolicy
from azure.appconfiguration._azure_appconfiguration_requests import ( # pylint: disable=no-cross-package-private-import
AppConfigRequestsCredentialsPolicy,
)

# Store the method to restore later
temp = AppConfigRequestsCredentialsPolicy._signed_request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,9 @@ async def send(self, request: PipelineRequest, **kwargs) -> PipelineResponse:
def new_method(request):
request.http_request.headers["Authorization"] = str(uuid4())

from azure.appconfiguration._azure_appconfiguration_requests import AppConfigRequestsCredentialsPolicy
from azure.appconfiguration._azure_appconfiguration_requests import ( # pylint: disable=no-cross-package-private-import
AppConfigRequestsCredentialsPolicy,
)

# Store the method to restore later
temp = AppConfigRequestsCredentialsPolicy._signed_request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
SecretReferenceConfigurationSetting,
FILTER_PERCENTAGE,
)
from azure.appconfiguration._generated.models import (
from azure.appconfiguration._generated.models import ( # pylint: disable=no-cross-package-private-import
KeyValue,
KeyValueFilter,
Snapshot as GeneratedSnapshot,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
from azure.core.credentials import AzureKeyCredential
from azure.core.pipeline.transport import HttpRequest
from azure.core.pipeline import PipelineRequest
from azure.appconfiguration._azure_appconfiguration_requests import (
from azure.appconfiguration._azure_appconfiguration_requests import ( # pylint: disable=no-cross-package-private-import
AppConfigRequestsCredentialsPolicy,
)
from azure.appconfiguration._utils import parse_connection_string
from azure.appconfiguration._utils import parse_connection_string # pylint: disable=no-cross-package-private-import


def test_parse_connection_string_returns_http_endpoint():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import pytest
from azure.core.pipeline.transport import HttpRequest
from azure.core.pipeline import PipelineRequest
from azure.appconfiguration._query_param_policy import QueryParamPolicy
from azure.appconfiguration._query_param_policy import ( # pylint: disable=no-cross-package-private-import
QueryParamPolicy,
)

TEST_URL = "https://example.com"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

from azure.core.pipeline.transport import HttpRequest, HttpResponse
from azure.core.pipeline import PipelineRequest, PipelineResponse
from azure.appconfiguration._sync_token import SyncToken, SyncTokenPolicy
from azure.appconfiguration._sync_token import ( # pylint: disable=no-cross-package-private-import
SyncToken,
SyncTokenPolicy,
)


def test_parse_sync_token():
Expand Down
Loading