uktrade / to-file-like-obj

Python utility function to convert an iterable of bytes or str to a readable file-like object
MIT License
8 stars 0 forks source link

PEP 561: mypy / pyright support #2

Open robbieculkin opened 2 weeks ago

robbieculkin commented 2 weeks ago

Hi, thanks for providing this utility.

Would you consider adding PEP 561 compatibility, enabling mypy & pyright typechecking support for importing code?

michalc commented 2 weeks ago

Probably yes!

Ah and out of curiosity really, do you have any particular use cases/projects you have in mind for to-file-like-obj?

robbieculkin commented 1 week ago

Glad to hear, thanks! I'm using it in conjunction with another uktrade repo, stream-zip, to stream files to s3.

michalc commented 1 week ago

Ah thanks for the usage info - good to know another project of ours is useful/these are useful together.

I realise you might be wanting a timeline of when I type hints might be added. Unfortunately I can’t really promise anything - but would be open to PRs.