QCHackers/tqec

Use `typeshed` stubs

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
The code base is currently using mypy to type-check itself automatically on CI, but a lot of packages have been excluded from this type-checking pass because they were lacking type stubs.

These packages are excluded in pyproject.toml:

# See https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml
[[tool.mypy.overrides]]
module = [
    "stim",
    "pysat",
    "pysat.solvers",
    "collada",
    "collada.source",
    "networkx",
    "stimcirq",
    # Added due to missing stubs for last version (1.13.1)
    "sympy",
]
ignore_missing_imports = true

It turns out that at least one package (networkx) has type stubs in the official python stubs repository: https://github.com/python/typeshed.

Describe the solution you'd like
Remove as many package from the list of packages excluded from type checking as possible and fix mypy issues arising in the process.