sygnal
sygnal copied to clipboard
Improve static type checking
Running mypy --strict sygnal/ tests/ setup.py
returns "634 errors in 27 files". We should start chipping away at that little by little. :)
For an introduction to mypy, see https://mypy.readthedocs.io/
I can take a look at this, at least partially, to slowly reduce the amount of type errors
The current status: mypy --strict sygnal/ tests/
Found 281 errors in 22 files (checked 29 source files)
234 x error: Call to untyped function "(.*)" in typed context [no-untyped-call]
I would guess that a lot of those untyped calls are to twisted functions that lack annotations.
You can add in your own stubs for twisted to suppress these, but in doing so you commit to reannotating everything we use in twisted that is already annotated upstream. I went down that path with sydent, and while it's doable I wouldn't recommend it!