Staging instance, all changes can be removed at any time

Skip to content

typing: type annotate swh.graph.pid

Upping the ante from swh-core!79 (closed) / swh-model!56 (closed), this diff is a proof of concept of what it takes to annotate an actual module, making types visible for all functions / methods. I'm using as guinea pig swh-graph, as it is largely independent from the rest and only requires swh-{core,model} which are already (minimally) typed.

To avoid duplication of typing information, I'm removing here types from docstring and moving them to proper type annotations. I'm not exactly sure yet what Sphinx rendering (with Napoleon style) will do with type annotations...

Test Plan

tox


Migrated from D2019 (view on Phabricator)

Merge request reports

Loading