smart_open icon indicating copy to clipboard operation
smart_open copied to clipboard

Support for type annotations

Open gpkc opened this issue 2 years ago • 3 comments

Is support for type annotations in the roadmap for this package? I think it would really benefit from it.

gpkc avatar Jun 01 '23 19:06 gpkc

I played around with it a bit earlier: https://github.com/RaRe-Technologies/smart_open/pull/545

I'm not sure if it's really worth it for the entire package. Adding it for just the public-facing functions may be helpful. What do you think?

mpenkov avatar Jun 01 '23 21:06 mpenkov

@mpenkov that can be useful yes, at least for IDE autocompletion and basic mypy verification

Do you think that PR is still up-to-date or it should be started again from scratch due to changes in the codebase?

gpkc avatar Jun 02 '23 09:06 gpkc

I'd do it from scratch because that PR did type annotations for everything, even internal stuff, which is overkill.

Are you up to it?

mpenkov avatar Jun 02 '23 10:06 mpenkov