From e83184f0e8208129d50a888171c1a1b3782bb843 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 17:56:51 -0400 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/asottile/reorder-python-imports: v3.12.0 → v3.14.0](https://github.com/asottile/reorder-python-imports/compare/v3.12.0...v3.14.0) - [github.com/psf/black: 23.12.1 → 24.10.0](https://github.com/psf/black/compare/23.12.1...24.10.0) - [github.com/asottile/blacken-docs: 1.16.0 → 1.19.0](https://github.com/asottile/blacken-docs/compare/1.16.0...1.19.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 8 ++++---- app/main.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf8ce9d..5d04aba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,23 +2,23 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-ast - id: end-of-file-fixer - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/asottile/reorder-python-imports - rev: v3.12.0 + rev: v3.14.0 hooks: - id: reorder-python-imports args: [--py310-plus] - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/asottile/blacken-docs - rev: 1.16.0 + rev: 1.19.0 hooks: - id: blacken-docs diff --git a/app/main.py b/app/main.py index 652caed..0225698 100755 --- a/app/main.py +++ b/app/main.py @@ -291,9 +291,9 @@ async def _calculate_per_user_costs( created_at_gte=created_at_gte, ) threads_cache: dict[int, threads.Thread] = {} - per_user_per_model_input_tokens: dict[ - int, dict[gpt.OpenAIModel, int] - ] = defaultdict(lambda: defaultdict(int)) + per_user_per_model_input_tokens: dict[int, dict[gpt.OpenAIModel, int]] = ( + defaultdict(lambda: defaultdict(int)) + ) for message in messages: if message["role"] != "user": continue