-
-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
Description
Describe the bug
Upgrading to the latest v.8.1.1 causes mypy issues to be reported throughout the client code that imports and uses deepdiff. It seems those can't be suppressed globally, via config and need to be ignored one by one.
The minimalist main.py + mypy.ini setup below is based on the parse_path usage example from its docstring.
To Reproduce
❯ cat main.py
from deepdiff import parse_path
parse_path("root[1][2]['age']")
❯ cat mypy.ini
[mypy]
strict = True
[mypy-deepdiff.*]
ignore_missing_imports = True
❯ pip install deepdiff==8.0.1
...
Successfully installed deepdiff-8.0.1 orderly-set-5.2.2
❯ mypy main.py
Success: no issues found in 1 source file
❯ pip install deepdiff==8.1.1
...
Successfully installed deepdiff-8.1.1 orderly-set-5.2.3
❯ mypy main.py
main.py:1: error: Module "deepdiff" does not explicitly export attribute "parse_path" [attr-defined]
main.py:2: error: Call to untyped function "parse_path" in typed context [no-untyped-call]
Found 2 errors in 1 file (checked 1 source file)
Expected behavior
No new mypy errors are introduced
OS, DeepDiff version and Python version (please complete the following information):
- OS: macOS v.14.6; Ubuntu 24.04
- Python Version: 3.11.7
- DeepDiff Version: 8.1.1
Additional context
Seems to be caused by the presence of the py.typed marker ( #507 ) while the deepdiff codebase itself is not fully typed yet.
cranti, johnthagen and janslovacek
Metadata
Metadata
Assignees
Labels
No labels