Re: [Rpm-maint] [rpm-software-management/rpm] Add type hints to the Python interface (#1615)

2021-04-09 Thread Florian Festi
While I like the overall idea of adding type hints to the binding I am not a big fan of the content of python/rpm/_rpm.pyi. This basically duplicates the API implementation in the C based API and is very easy to get out of sync. Having this generated automatically during build time from the C

Re: [Rpm-maint] [rpm-software-management/rpm] Add type hints to the Python interface (#1615)

2021-04-01 Thread Jerry James
Great. Here is my thinking on the mypy errors noted above. For the `hdr.__getattr__` case, I think those declarations should be replaced with a comment noting that an `rpmTag` or `AnyStr` value can be passed as an argument, and the corresponding `int` or `AnyStr` value will be the result. I

Re: [Rpm-maint] [rpm-software-management/rpm] Add type hints to the Python interface (#1615)

2021-04-01 Thread ニール・ゴンパ
We only support Python 3.6 and up, so I don't think this would be a problem for us. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] Add type hints to the Python interface (#1615)

2021-04-01 Thread Jerry James
I am working on a project that consumes the rpm python interface (https://pagure.io/depict for the curious). I would like to typecheck my project, so I have created some stubs for that purpose. Are you interested in having the rpm stubs? Note that, with this commit applied, mypy has several