From 5add6687cc4895b027dd6efe1d07e1b7835f5d6e Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 3 Aug 2024 11:48:33 -0700 Subject: [PATCH] fix(types/utils.py): fix linting errors --- .pre-commit-config.yaml | 12 ++++++------ litellm/types/utils.py | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d429bc6b8..a33473b72 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: local hooks: - # - id: mypy - # name: mypy - # entry: python3 -m mypy --ignore-missing-imports - # language: system - # types: [python] - # files: ^litellm/ + - id: mypy + name: mypy + entry: python3 -m mypy --ignore-missing-imports + language: system + types: [python] + files: ^litellm/ - id: isort name: isort entry: isort diff --git a/litellm/types/utils.py b/litellm/types/utils.py index e9247a71f..be77821ad 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -976,9 +976,7 @@ class ImageResponse(OpenAIImageResponse): else: created = int(time.time()) - _data = {"data": data, "created": created} - - super().__init__(**_data) + super().__init__(created=created, data=data) self.usage = {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0} def __contains__(self, key):