pathlib-abc icon indicating copy to clipboard operation
pathlib-abc copied to clipboard

Add type hints

Open barneygale opened this issue 1 year ago • 3 comments

Per https://github.com/justindujardin/pathy/issues/105#issuecomment-1885429940

barneygale avatar Jan 13 '24 14:01 barneygale

To annotate PathBase.stat() we'll need to address #3

barneygale avatar Jan 27 '24 22:01 barneygale

Hi @barneygale,

I finally found some time to start moving universal_pathlib to PathBase. To make some of the type checks pass, I wrote type stubs for parts of pathlib_abc. If you're interested I could make a PR here, and upstream them.

The problem is of course, that the type information has to be kept up-to-date separately.

see: https://github.com/fsspec/universal_pathlib/pull/270/files#diff-47f26e6dbeda71d5163654c5951783766ee5e48e58d98abc09468cd28aed9539

Cheers, Andreas

ap-- avatar Sep 03 '24 13:09 ap--

Hey @ap--, I think I missed your message, d'oh! Type hints would be much appreciated. There's a CPython issue here if you'd like to open a PR: https://github.com/python/cpython/issues/130798

barneygale avatar Mar 22 '25 21:03 barneygale