Skip to content
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
@@ -0,0 +1,6 @@
Changed
-------

- The ``resource_server`` attribute of the clients for Auth, Compute, Flows,
Groups, Search, Timers, and Transfer is now annotated as ``str``, rather than
the inherited type of ``str | None``. (:pr:`NUMBER`)
4 changes: 4 additions & 0 deletions src/globus_sdk/services/auth/client/base_login_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ class AuthLoginClient(client.BaseClient):
error_class = AuthAPIError
scopes = AuthScopes

# annotate but do not assign 'resource_server'
# because we know that the classproperty of this name will evaluate to a string
resource_server: str

def __init__(
self,
client_id: uuid.UUID | str | None = None,
Expand Down
4 changes: 4 additions & 0 deletions src/globus_sdk/services/auth/client/service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ class AuthClient(client.BaseClient):
AuthScopes.email,
]

# annotate but do not assign 'resource_server'
# because we know that the classproperty of this name will evaluate to a string
resource_server: str

def __init__(
self,
environment: str | None = None,
Expand Down
4 changes: 4 additions & 0 deletions src/globus_sdk/services/compute/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class ComputeClientV2(client.BaseClient):
scopes = ComputeScopes
default_scope_requirements = [ComputeScopes.all]

# annotate but do not assign 'resource_server'
# because we know that the classproperty of this name will evaluate to a string
resource_server: str

def get_version(self, service: str | MissingType = MISSING) -> GlobusHTTPResponse:
"""Get the current version of the API and other services.

Expand Down
4 changes: 4 additions & 0 deletions src/globus_sdk/services/flows/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ class FlowsClient(client.BaseClient):
scopes = FlowsScopes
default_scope_requirements = [FlowsScopes.all]

# annotate but do not assign 'resource_server'
# because we know that the classproperty of this name will evaluate to a string
resource_server: str

def create_flow(
self,
title: str,
Expand Down
4 changes: 4 additions & 0 deletions src/globus_sdk/services/groups/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ class GroupsClient(client.BaseClient):
service_name = "groups"
scopes = GroupsScopes

# annotate but do not assign 'resource_server'
# because we know that the classproperty of this name will evaluate to a string
resource_server: str

@property
def default_scope_requirements(self) -> list[Scope]:
return [GroupsScopes.view_my_groups_and_memberships]
Expand Down
4 changes: 4 additions & 0 deletions src/globus_sdk/services/search/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ class SearchClient(client.BaseClient):
scopes = SearchScopes
default_scope_requirements = [SearchScopes.search]

# annotate but do not assign 'resource_server'
# because we know that the classproperty of this name will evaluate to a string
resource_server: str

#
# Index Management
#
Expand Down
4 changes: 4 additions & 0 deletions src/globus_sdk/services/timers/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class TimersClient(client.BaseClient):
scopes = TimersScopes
default_scope_requirements = [TimersScopes.timer]

# annotate but do not assign 'resource_server'
# because we know that the classproperty of this name will evaluate to a string
resource_server: str

def add_app_transfer_data_access_scope(
self, collection_ids: uuid.UUID | str | t.Iterable[uuid.UUID | str]
) -> TimersClient:
Expand Down
4 changes: 4 additions & 0 deletions src/globus_sdk/services/transfer/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ class TransferClient(client.BaseClient):
scopes = TransferScopes
default_scope_requirements = [TransferScopes.all]

# annotate but do not assign 'resource_server'
# because we know that the classproperty of this name will evaluate to a string
resource_server: str

def _register_standard_retry_checks(self, retry_config: RetryConfig) -> None:
"""Override the default retry checks."""
retry_config.checks.register_many_checks(TRANSFER_DEFAULT_RETRY_CHECKS)
Expand Down
Loading