Skip to content
Open
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 @@ -3,7 +3,7 @@

import asyncio
from dataclasses import dataclass, field
from typing import Any, Callable, Awaitable, Sequence
from typing import Any, Sequence

from fastapi import FastAPI, Request, Response
from fastapi.responses import JSONResponse
Expand Down
2 changes: 1 addition & 1 deletion packages/python/server/tests/storage/test_store_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_accepts_ctx_list_4arg_lambda():

async def test_old_1arg_on_get_still_works():
store = CustomObjectStore(on_get=lambda key: f"val:{key}")
result = ctx_obj = None
result = None
result = await store.get_string("k")
assert result == "val:k"

Expand Down
6 changes: 2 additions & 4 deletions packages/python/spaces/starfish_spaces/members.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
from __future__ import annotations

import json
from typing import TYPE_CHECKING, Any, Callable, Optional, TypedDict
from typing import TYPE_CHECKING, Any, Optional, TypedDict

from starfish_protocol.encoding import decode_link_fragment, encode_link_fragment
from starfish_sharing.cap_mint import MintOpts

from starfish_spaces.account_seal import seal_to_self, unseal_from_self
from starfish_spaces.account_seal import seal_to_self
from starfish_spaces.client import (
add_space_keyring_recipient,
ensure_space_keyring_recipient,
Expand Down Expand Up @@ -57,7 +57,6 @@
from starfish_spaces.token_types import JoinRequest, SpaceInviteLinkToken

if TYPE_CHECKING:
from starfish_spaces.config import SealedBlob
from starfish_spaces.session import Session


Expand Down Expand Up @@ -339,7 +338,6 @@ async def recover_space_access(
link_access: dict[str, Any] = {}
for space_id, sealed_blob in pub_access.items():
try:
from starfish_spaces.config import SealedBlob as SealedBlobType
sealed = sealed_blob if isinstance(sealed_blob, dict) else dict(sealed_blob)
from starfish_spaces.account_seal import unseal_from_self as _unseal
raw = _unseal(session, sealed)
Expand Down
1 change: 0 additions & 1 deletion packages/python/spaces/starfish_spaces/node_keyring.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from starfish_identities import compute_owner_trusted_adders

from starfish_spaces.client import (
DeviceKeys,
add_keyring_recipient_core,
build_encryptor,
open_encryptor,
Expand Down
1 change: 0 additions & 1 deletion packages/python/spaces/starfish_spaces/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from __future__ import annotations

import math
import time
from dataclasses import dataclass, field
from typing import Any, Optional
Expand Down
2 changes: 1 addition & 1 deletion packages/python/spaces/starfish_spaces/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import annotations

import json
from typing import Any, Optional, TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from starfish_sharing import make_registry_role_enricher

Expand Down
1 change: 0 additions & 1 deletion packages/python/spaces/starfish_spaces/request_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from __future__ import annotations

from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric.ed25519 import (
Ed25519PrivateKey,
Ed25519PublicKey,
Expand Down
2 changes: 1 addition & 1 deletion packages/python/spaces/starfish_spaces/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from __future__ import annotations

from dataclasses import dataclass, field
from dataclasses import dataclass
from typing import Any, Callable, Coroutine, Optional, TYPE_CHECKING

from starfish_identities import bootstrap_root_identity, mint_device_cap, compute_owner_trusted_adders
Expand Down
5 changes: 1 addition & 4 deletions packages/python/spaces/starfish_spaces/space_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,18 @@

from __future__ import annotations

import json
from dataclasses import dataclass, field
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Optional

from starfish_spaces.client import (
build_encryptor,
make_space_client,
open_encryptor,
)
from starfish_spaces.space_access_error import SpaceAccessError
from starfish_spaces.space_access_store import (
get_node_access_entry,
get_node_keyring_access_entry,
get_node_stream_access_entry,
get_space_access_entry,
link_access_from_store,
member_caps_from_store,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ async def hydrate_space_access_store(
# Step 2 — server wins
if server_entries:
for uid, entry in server_entries.items():
cache_key = f"{_active_key}:{space_id}:{uid}" if uid != _active_key else _key_for(space_id)
# Server entries are space-level member entries for each userId.
# Store under the main space key for the active user.
if uid == _active_key:
Expand Down
Loading