Josverl / micropython-stubs

Stubs of most MicroPython ports, boards and versions to make writing code that much simpler.
https://micropython-stubs.readthedocs.io
MIT License
133 stars 21 forks source link

research: is it useful to test with more typecheckers and linters #743

Closed Josverl closed 6 months ago

Josverl commented 6 months ago

Based on the list on https://github.com/typeddjango/awesome-python-typing?tab=readme-ov-file#static-type-checkers

Which static typecheckers make sense to invest time on ?

  1. basedmypy - Based static typing with baseline functionality.

    🤔possibly interesting by replaces mypy - which is not desired

  2. mypy - Optional static typing (PEP 484).

    ✅Part of test suite

  3. pyanalyze - Extensible static analyzer and type checker.

    🚫requires being able to import the .py files , which does not work for MicroPython Code

  4. pycharm - IDE for Professional Developers.

    🐢 Does work in manual testing - but cannot be tested in isolation

  5. pylyzer - A fast static code analyzer & language server for Python, written in Rust.

    🚫 Currently does not support running against a set of files

  6. pyre - Performant type-checker.

    🤔no Windows option - could mainly test in CI

  7. pyright - Fast type checker meant for large Python source bases. It can run in a “watch” mode and performs fast incremental updates when files are modified.

    ✅Part of test suite

  8. pytype - Tool to check and infer types - without requiring type annotations.

    🎲No direct windows option - but possibly can be built 'ERROR: Could not build wheels for pytype - error: Microsoft Visual C++ 14.0 or greater is required.'. Not a simple issue to fix though : https://github.com/google/pytype/issues/1154