atproto icon indicating copy to clipboard operation
atproto copied to clipboard

py.typed files missing?

Open steve-mavens opened this issue 1 year ago • 3 comments

Everything has type annotations, but there's no py.typed files in the top-level packages to tell mypy that it should use them: https://peps.python.org/pep-0561/#packaging-type-information

Is this intentional, or just an oversight? I think the py.typed mechanism is there because some people use annotations internally, but their annotations perhaps aren't accurate enough for their library's users to rely on. So they don't want to "publish" them, even though they're right there in the shipped code. Omitting the py.typed file means that the annotations aren't usable.

steve-mavens avatar Nov 27 '24 19:11 steve-mavens

Hi, yes types are not ready to be public. There is a bunch of what we need to fix and enable more strict checks. That for now is disabled. In the future type checking must be a part of CI on every PR

MarshalX avatar Nov 27 '24 19:11 MarshalX

Thanks for explaining the current status. It might be that the types for the parts I use are good enough, and then if mypy fixes https://github.com/python/mypy/issues/8545 I'll be sorted :-)

steve-mavens avatar Nov 27 '24 19:11 steve-mavens

Hm. Probably public api is good enough. Until you are not using something complicated like direct call of get_or_create()

MarshalX avatar Nov 28 '24 01:11 MarshalX