Closed brussee closed 1 year ago
Hi. Yes I will take a look at this for the next point update (probably around Christmas). It's not something that I've used before so I may have to try mypy too!
https://peps.python.org/pep-0561/#packaging-type-information
This PEP does not support distributing typing information as part of module-only distributions or single-file modules within namespace packages.
:[
I guess that's another reason for me to be lazy and always make projects with top level packages, not single modules.
Would you be interested in a PR exploring this possibility? I would think it might just be a matter of moving bitstring.py
to bitstring/__init__.py
and then whatever according project and CI adjustments are needed to track that. That should keep the same import behavior for users.
@altendky Hi, sorry I missed the end of your message - thanks for the offer but I should be able to make the changes myself. I see my before Christmas estimate was a bit optimistic!
It's always before some Christmas... :clock5: :earth_asia:
Done in PR #256 - I'll try to do a maintenance release soon 🤞
bitstring 4.0.2 now released. Mypy working for me at least!
Would you mind adding a
py.typed
file? https://peps.python.org/pep-0561/ Because I noticed bitstring makes use of type hinting 👍 but mypy complains: "missing library stubs or py.typed marker".Thanks for this helpful and user friendly library!