There is parser in progress for parsing PYI ast: https://github.com/alexpantyukhin/PythonParser From tests it seems that now it's possible to parse some simple modules without 'IF's.