Skip to content
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

[AutoPR azure-mgmt-subscription] Linting and Completeness fixes S360 #3249

Draft
wants to merge 1 commit into
base: release/v3
Choose a base branch
from
Draft
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 @@ -11,7 +11,6 @@

import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError

from .. import models

Expand Down Expand Up @@ -57,7 +56,8 @@ def list_locations(
:return: An iterator like instance of Location
:rtype:
~azure.mgmt.subscription.models.LocationPaged[~azure.mgmt.subscription.models.Location]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseBodyException<azure.mgmt.subscription.models.ErrorResponseBodyException>`
"""
def prepare_request(next_link=None):
if not next_link:
Expand Down Expand Up @@ -96,9 +96,7 @@ def internal_paging(next_link=None):
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseBodyException(self._deserialize, response)

return response

Expand All @@ -125,7 +123,8 @@ def get(
:return: Subscription or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.subscription.models.Subscription or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseBodyException<azure.mgmt.subscription.models.ErrorResponseBodyException>`
"""
# Construct URL
url = self.get.metadata['url']
Expand Down Expand Up @@ -153,9 +152,7 @@ def get(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseBodyException(self._deserialize, response)

deserialized = None
if response.status_code == 200:
Expand All @@ -180,7 +177,8 @@ def list(
:return: An iterator like instance of Subscription
:rtype:
~azure.mgmt.subscription.models.SubscriptionPaged[~azure.mgmt.subscription.models.Subscription]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseBodyException<azure.mgmt.subscription.models.ErrorResponseBodyException>`
"""
def prepare_request(next_link=None):
if not next_link:
Expand Down Expand Up @@ -215,9 +213,7 @@ def internal_paging(next_link=None):
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseBodyException(self._deserialize, response)

return response

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

import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError

from .. import models

Expand Down Expand Up @@ -51,7 +50,8 @@ def list(
:return: An iterator like instance of TenantIdDescription
:rtype:
~azure.mgmt.subscription.models.TenantIdDescriptionPaged[~azure.mgmt.subscription.models.TenantIdDescription]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseBodyException<azure.mgmt.subscription.models.ErrorResponseBodyException>`
"""
def prepare_request(next_link=None):
if not next_link:
Expand Down Expand Up @@ -86,9 +86,7 @@ def internal_paging(next_link=None):
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseBodyException(self._deserialize, response)

return response

Expand Down