From 279373c04326955c4f0702fe0f7e6f48834e2f63 Mon Sep 17 00:00:00 2001 From: Trayan Azarov Date: Thu, 25 Jan 2024 20:54:38 +0200 Subject: [PATCH] [CHORE]: Moved mypy config from .ini to pyproject.toml (#1663) ## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - minor reducing the number of config files to maintain ## Test plan *How are these changes tested?* - [x] Tested with pre-commit hooks (works also for ignoring grpc proto dir) ## Documentation Changes N/A --- .pre-commit-config.yaml | 2 +- mypy.ini | 2 -- pyproject.toml | 7 +++++++ 3 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 mypy.ini diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c520e34919d..7b1d50ec940 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,5 +32,5 @@ repos: rev: "v1.2.0" hooks: - id: mypy - args: [--strict, --ignore-missing-imports, --follow-imports=silent, --disable-error-code=type-abstract, --config-file=./mypy.ini] + args: [--strict, --ignore-missing-imports, --follow-imports=silent, --disable-error-code=type-abstract, --config-file=./pyproject.toml] additional_dependencies: ["types-requests", "pydantic", "overrides", "hypothesis", "pytest", "pypika", "numpy", "types-protobuf", "kubernetes"] diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index bcbf5f20f72..00000000000 --- a/mypy.ini +++ /dev/null @@ -1,2 +0,0 @@ -[mypy-chromadb.proto.*] -ignore_errors = True diff --git a/pyproject.toml b/pyproject.toml index 026267c089c..01aa0d8663b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,13 @@ target-version = ['py38', 'py39', 'py310', 'py311'] [tool.pytest.ini_options] pythonpath = ["."] +[tool.mypy] +ignore_errors = false + +[[tool.mypy.overrides]] +module = ["chromadb.proto.*"] +ignore_errors = true + [project.scripts] chroma = "chromadb.cli.cli:app"