Skip to content

Commit

Permalink
update mypy, solve error
Browse files Browse the repository at this point in the history
  • Loading branch information
divyegala committed Nov 28, 2023
1 parent e2e1fc3 commit b8a4c50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
types_or: [python, cython]
additional_dependencies: ["flake8-force"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.971'
rev: 'v1.3.0'
hooks:
- id: mypy
additional_dependencies: [types-cachetools]
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ ignore_missing_imports = true
# If we don't specify this, then mypy will check excluded files if
# they are imported by a checked file.
follow_imports = "skip"
exclude = [
"pylibraft/pylibraft/test",
]

[tool.codespell]
# note: pre-commit passes explicit lists of files here, which this skip file list doesn't override -
Expand Down
10 changes: 3 additions & 7 deletions python/pylibraft/pylibraft/neighbors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@
# limitations under the License.
#

from pylibraft.neighbors import (
brute_force,
cagra,
cagra_hnswlib,
ivf_flat,
ivf_pq,
)
from pylibraft.neighbors import brute_force # type: ignore
from pylibraft.neighbors import cagra_hnswlib # type: ignore
from pylibraft.neighbors import cagra, ivf_flat, ivf_pq

from .refine import refine

Expand Down

0 comments on commit b8a4c50

Please sign in to comment.