[portage] Start of stubs by Tatsh · Pull Request #15391 · python/typeshed

This is a port of portage-stubs. It is a very minimal set of stubs just enough for my livecheck project to use. The Portage API is fairly unstable, massive, and not entirely what you can call 'public'. However, the parts I have been using have not changed much in the last few years.

Once merged I will deprecate and archive portage-stubs here and on PyPI.

The upstream Portage project is not likely to be fully typed anytime soon. The authors are also not interested in the necessary workarounds such as having a lot of if TYPE_CHECKING: blocks to workaround the dynamic typing in the API.