Why
I love types, and want everything in python typed as strongly as possible within reason. This creates more readable code and makes refactoring easier and safer. If i debug my code that depend on ably code, i find myself stepping into untyped ably code, this makes it harder to read.
The following import triggers an mypy error
game\utils\event_publisher.py
from ably import AblyRest
Running mypy .
game\utils\event_publisher.py:6: error: Skipping analyzing "ably": module is installed, but missing library stubs or py.typed marker [import]
game\utils\event_publisher.py:6: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
In addition i see the very prominent Channel.publish is not typed.
My suggestions are
- Make your library PEP-561 compatible
- Type all public exposed code
- Add mypy or other type checking to your CI/CD pipelines
- If possible type the whole repo
Read more here
┆Issue is synchronized with this Jira Task by Unito
Why
I love types, and want everything in python typed as strongly as possible within reason. This creates more readable code and makes refactoring easier and safer. If i debug my code that depend on ably code, i find myself stepping into untyped ably code, this makes it harder to read.
The following import triggers an mypy error
game\utils\event_publisher.py
Running
mypy .In addition i see the very prominent
Channel.publishis not typed.My suggestions are
Read more here
┆Issue is synchronized with this Jira Task by Unito