C0rn3j / sc-controller

User-mode driver and GTK3 based GUI for Steam Controller
GNU General Public License v2.0
24 stars 2 forks source link

Fully typed Python code #48

Open C0rn3j opened 3 weeks ago

C0rn3j commented 3 weeks ago

This is a pipe dream for now, the code base is quite large, only a small part of it has been typed so far.

There are various bugs which are easily revealed by adding function types, and then having Ruff/Pyright take a look at the errors.
Since the original codebase is Python 2, the code was not written with types in mind.

It would be nice to have some test that ensured that everything is typed - maybe Ruff/Pyright have a rule we could use for this?
At least a soft-error/warning one that would inform about the amounts of issues in the various files.

This would also possibly include having types in the libraries we depend on, some of which are tiny.
That will most likely require us to send them a PR.