mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
style: format daily activity key types
This commit is contained in:
parent
0b7c2a5eb8
commit
ada1bef014
2 changed files with 5 additions and 4 deletions
|
|
@ -625,9 +625,9 @@ async def get_user_api_key_filter(
|
|||
api_key: str | None,
|
||||
) -> list[str]:
|
||||
"""Return the key digests that should scope a user activity query."""
|
||||
active_keys: Final[Sequence[_UserApiKeyRecord]] = await VerificationTokenRepository(
|
||||
prisma_client
|
||||
).find_by_user_id(user_id)
|
||||
active_keys: Final[Sequence[_UserApiKeyRecord]] = await VerificationTokenRepository(prisma_client).find_by_user_id(
|
||||
user_id
|
||||
)
|
||||
deleted_keys: Final = await _get_deleted_keys_for_user(prisma_client, user_id)
|
||||
user_api_keys: Final = list(
|
||||
dict.fromkeys(
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ from litellm.proxy.management_endpoints.common_daily_activity import (
|
|||
daily_activity_repository,
|
||||
daily_activity_scope,
|
||||
get_api_key_metadata,
|
||||
get_user_api_key_filter,
|
||||
get_daily_activity,
|
||||
get_user_api_key_filter,
|
||||
parse_canonical_date,
|
||||
parse_canonical_date_range,
|
||||
raise_public,
|
||||
|
|
@ -2544,6 +2544,7 @@ async def test_get_daily_activity_rejects_non_canonical_dates_before_querying(st
|
|||
mock_table.count.assert_not_awaited()
|
||||
mock_table.find_many.assert_not_awaited()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_user_api_key_filter_scopes_to_active_and_deleted_user_keys():
|
||||
mock_prisma = MagicMock()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue