chiark / gitweb /
documentation/python: revisit None in function return type annotations.
Until now it was ignored in pybind return annotations as it seemed to be
superfluous. OTOH, while the pybind function is fully annotated, it's
often not clear which function comes from pybind and which from pure
python code, meaning it's not clear if the return type is None or the
return type annotation is just missing.
Additionally, the pure python annotations were showing None as NoneType,
which is too verbose. According to PEP484 type(None) and None are
equivalent, so patching the output to show None instead of NoneType,
making it also consistent with pybind.