resolve remaining type errors on dev branch #2323
Labels
Status: Stale 🍞
Been open for a while with no activity
Type: Code Quality 💯
Minor tweaks or style changes
Type: Improvement 📈
Minor improvements not introducing a new feature or requiring a major refactor
Describe the bug
While there are many type annotations in the codebase, when running a static type checker on the code, many issues are raised (see mypy output below). Some of these may merely be incorrect annotations (still worth fixing since one of the reasons to add static type annotations is for code clarity), however some may be legitimate bugs.
PR #2321 adds static type checking in CI and resolves the first few of the below errors. Once these existing errors are addressed, we can have CI builds fail if mypy errors are found (via removing the
|| echo "Type errors found, continuing build..."
in the mypy call added in #2321) and add running mypy to the pre-commit hook.Related to: #1456
To Reproduce
Steps to reproduce the behavior:
pip install mypy
mypy --python-version 3.6 --ignore-missing-imports syft
Expected behavior
No type issues are found
Actual behavior
Many type issues flagged by mypy:
The text was updated successfully, but these errors were encountered: