You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for filing the issue! We don't need poetry to repro. Our pyproject.toml has a section [tool.mypy]. strict = true and other settings can be tweaked.
Even just running mypy with strict manually spits out a lot of things to fix
python -m mypy .\pyrit\common\ --strict
pyrit\common\utils.py:8: error: Missing type parameters for generic type "dict" [type-arg]
pyrit\common\utils.py:25: error: Missing type parameters for generic type "list" [type-arg]
pyrit\common\text_helper.py:7: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
pyrit\common\text_helper.py:11: error: Function is missing a return type annotation [no-untyped-def]
pyrit\common\text_helper.py:11: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
pyrit\common\singleton.py:13: error: Missing type parameters for generic type "dict" [type-arg]
pyrit\common\singleton.py:15: error: Function is missing a type annotation [no-untyped-def]
pyrit\common\csv_helper.py:8: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
pyrit\common\csv_helper.py:13: error: Function is missing a return type annotation [no-untyped-def]
pyrit\common\csv_helper.py:13: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
pyrit\common\json_helper.py:8: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
pyrit\common\json_helper.py:9: error: Returning Any from function declared to return "list[dict[str, str]]" [no-any-return]
pyrit\common\json_helper.py:12: error: Function is missing a return type annotation [no-untyped-def]
pyrit\common\json_helper.py:12: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
pyrit\common\net_utility.py:10: error: Function is missing a return type annotation [no-untyped-def]
pyrit\common\net_utility.py:56: error: Returning Any from function declared to return "Response" [no-any-return]
...
Whoever picks this up should look into at least common and models, but ideally turn strict on for all of pyrit via the toml file.
Describe the bug
In my poetry project I had to set these settings:
If I don't ignore pyrit then I get these errors:
Steps/Code to Reproduce
poetry add pyrit
from pyrit.memory.memory_interface import MemoryInterface
poetry run mypy --strict project
.Expected Results
Expect no mypy issues related to pyrit types
Actual Results
error: Skipping analyzing "pyrit.memory": module is installed, but missing library stubs or py.typed marker [import-untyped]
Screenshots
Versions
The text was updated successfully, but these errors were encountered: