Add Python type hints
This patch adds Python type hints to all the modules except
`codegen.py`, `gen.py`, and `tsdl182gen.py`, as it is likely that those
will change significantly in the future.
Mypy 0.782 reports no errors with this patch.
The few errors that were found during the type hint introduction process
are fixed as part of this patch.
`typing.py` is a new module which contains public and private type
aliases, mostly derivatives of `int` to add semantics (index, count,
version number, and the rest). The ones that are public are available
from the `barectf` package itself (`__init__.py`). A `barectf` API user
doesn't need to use them without static type checking needs. If she
wants to, then she must use `barectf` types explicitly, for example:
import barectf
clk_type = barectf.ClockType('my_clock',
frequency=barectf.Count(100000))
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.023931 seconds and 4 git commands to generate.