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
Running mypy --python-version 3.9 fabrictestbed_extensions/fablib/ reports hundreds of errors: "Found 488 errors in 12 files (checked 15 source files)", according to mypy 1.11.2, ran against commit 700964e.
Improving this situation should address issues like #295. We will need address the errors my reports, and run mypy on CI to prevent regressions.
Two things to note while adding static type checking:
According to mypy docs (specifically using mypy with an existing codebase), adding mypy checks should be a gradual process, rather than one-shot.
We have been mostly using Python 3.8 style type annotations. PEP 585 – Type Hinting Generics In Standard Collections has proposed some improvements, which are available since Python 3.9. So we'd be using list[str], dict[str, str] etc. rather than List[str], Dict[str,str], etc., which avoids the need for importing the typing module. See mypy type hints cheat sheet for some examples.
The text was updated successfully, but these errors were encountered:
Running
mypy --python-version 3.9 fabrictestbed_extensions/fablib/
reports hundreds of errors: "Found 488 errors in 12 files (checked 15 source files)", according to mypy 1.11.2, ran against commit 700964e.Improving this situation should address issues like #295. We will need address the errors my reports, and run mypy on CI to prevent regressions.
Two things to note while adding static type checking:
According to mypy docs (specifically using mypy with an existing codebase), adding mypy checks should be a gradual process, rather than one-shot.
We have been mostly using Python 3.8 style type annotations. PEP 585 – Type Hinting Generics In Standard Collections has proposed some improvements, which are available since Python 3.9. So we'd be using
list[str]
,dict[str, str]
etc. rather thanList[str]
,Dict[str,str]
, etc., which avoids the need for importing thetyping
module. See mypy type hints cheat sheet for some examples.The text was updated successfully, but these errors were encountered: