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
{{ message }}
Repository navigation
MAINT MyPy Fails to Find PyRIT Type definitions #720
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.
Hi Roman Lutz (@romanlutz), I'd like to work on this issue!
I'll start by adding type annotations to the
common and models modules. Could you please
assign it to me? Thanks!
Activity
[-]MyPy Fails to Find PyRit Type definitions[/-][+]BUG MyPy Fails to Find PyRit Type definitions[/+][-]BUG MyPy Fails to Find PyRit Type definitions[/-][+]BUG MyPy Fails to Find PyRIT Type definitions[/+]romanlutz commentedon Feb 20, 2025
Thank you for filing the issue! We don't need poetry to repro. Our
pyproject.tomlhas a section[tool.mypy].strict = trueand other settings can be tweaked.Even just running mypy with strict manually spits out a lot of things to fix
Whoever picks this up should look into at least
commonandmodels, but ideally turnstricton for all of pyrit via the toml file.[-]BUG MyPy Fails to Find PyRIT Type definitions[/-][+]MAINT MyPy Fails to Find PyRIT Type definitions[/+]tejas0077 commentedon Mar 18, 2026
Hi Roman Lutz (@romanlutz), I'd like to work on this issue!
I'll start by adding type annotations to the
common and models modules. Could you please
assign it to me? Thanks!
maint: fix untyped decorator mypy error in net_utility.py