diff --git a/addon_service/abstract/authorized_account/models.py b/addon_service/abstract/authorized_account/models.py index 9e075fbc..4fc9a1bf 100644 --- a/addon_service/abstract/authorized_account/models.py +++ b/addon_service/abstract/authorized_account/models.py @@ -39,7 +39,7 @@ def active(self): class AuthorizedAccount(AddonsServiceBaseModel): - """Model for descirbing a user's account on an ExternalService. + """Model for describing a user's account on an ExternalService. This model collects all of the information required to actually perform remote operations against the service and to aggregate accounts under a known user. @@ -226,7 +226,7 @@ def initiate_oauth2_flow(self, authorized_scopes=None): raise ValueError("Cannot initiate OAuth2 flow for non-OAuth2 credentials") self.oauth2_token_metadata = OAuth2TokenMetadata.objects.create( authorized_scopes=( - authorized_scopes or self.external_service.supported_scopes + authorized_scopes or self.external_service.supported_scopes ), state_nonce=oauth2_utils.generate_state_nonce(), ) diff --git a/addon_service/authorized_storage_account/models.py b/addon_service/authorized_storage_account/models.py index 7ae72017..e13e02ec 100644 --- a/addon_service/authorized_storage_account/models.py +++ b/addon_service/authorized_storage_account/models.py @@ -2,12 +2,12 @@ from addon_service.abstract.authorized_account.models import AuthorizedAccount from addon_service.addon_imp.instantiation import get_storage_addon_instance -from addon_service.external_storage_service import ExternalStorageService +from addon_service.external_storage_service.models import ExternalStorageService from addon_toolkit.interfaces.storage import StorageConfig class AuthorizedStorageAccount(AuthorizedAccount): - """Model for descirbing a user's account on an ExternalStorageService. + """Model for describing a user's account on an ExternalService. This model collects all of the information required to actually perform remote operations against the service and to aggregate accounts under a known user. diff --git a/addon_service/common/network.py b/addon_service/common/network.py index 9f409410..456ddac4 100644 --- a/addon_service/common/network.py +++ b/addon_service/common/network.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import contextlib import dataclasses import logging @@ -24,7 +26,6 @@ if typing.TYPE_CHECKING: from addon_service import models as db - from addon_service.models import AuthorizedStorageAccount __all__ = ("GravyvaletHttpRequestor",)