fix: resolve type checking warnings for CI
- Add type casts for Starlette app state access - Add assertions for cipher, card, board, stack after initialization - Add None checks for XML element text attributes - Handle __package__ being None in tracing setup - Fix TokenBrokerService initialization to use storage credentials Resolves 42 type warnings from ty-check, enabling CI linting to pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -418,11 +418,12 @@ async def revoke_nextcloud_access(
|
||||
storage = RefreshTokenStorage.from_env()
|
||||
await storage.initialize()
|
||||
|
||||
encryption_key = os.getenv("TOKEN_ENCRYPTION_KEY")
|
||||
if not encryption_key:
|
||||
# Get OAuth client credentials from storage
|
||||
client_creds = await storage.get_oauth_client()
|
||||
if not client_creds:
|
||||
return RevocationResult(
|
||||
success=False,
|
||||
message="Token encryption key not configured.",
|
||||
message="OAuth client credentials not found in storage.",
|
||||
)
|
||||
|
||||
broker = TokenBrokerService(
|
||||
@@ -432,7 +433,8 @@ async def revoke_nextcloud_access(
|
||||
f"{os.getenv('NEXTCLOUD_HOST')}/.well-known/openid-configuration",
|
||||
),
|
||||
nextcloud_host=os.getenv("NEXTCLOUD_HOST"), # type: ignore
|
||||
encryption_key=encryption_key,
|
||||
client_id=client_creds["client_id"],
|
||||
client_secret=client_creds["client_secret"],
|
||||
)
|
||||
|
||||
# Revoke access
|
||||
|
||||
Reference in New Issue
Block a user