From 8cc0e8e5c56a4fff97d853404edda41fcc68b1d1 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 6 Dec 2023 22:57:14 -0800 Subject: [PATCH] ci(pre-commit-config.yaml): adding mypy linting as a pre-commit hook --- .pre-commit-config.yaml | 11 ++++++++++- litellm/_logging.py | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8bda916bc..5e74b6596 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,4 +5,13 @@ repos: - id: flake8 exclude: ^litellm/tests/|^litellm/proxy/|^litellm/integrations/ additional_dependencies: [flake8-print] - files: litellm/.*\.py \ No newline at end of file + files: litellm/.*\.py +- repo: local + hooks: + - id: mypy + name: mypy + entry: python3 -m mypy --ignore-missing-imports + language: system + types: [python] + files: ^litellm/ + exclude: ^litellm/tests/ \ No newline at end of file diff --git a/litellm/_logging.py b/litellm/_logging.py index fd21d22e3..ab776b9b6 100644 --- a/litellm/_logging.py +++ b/litellm/_logging.py @@ -2,4 +2,4 @@ set_verbose = False def print_verbose(print_statement): if set_verbose: - print(print_statement) \ No newline at end of file + print(print_statement) # noqa \ No newline at end of file