Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

Make ourselves mypy compatible #1237

Closed
Closed

Description

@JoanFM

For DocArray to be recognized by mypy in other downstream projects we have to fill the py.typed file or register at typeshed. Reference: https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-library-stubs-or-py-typed-marker

Activity

  1. converted this from a draft issue on Mar 14, 2023
  2. anna-charlotte commented on Mar 17, 2023

    @anna-charlotte
    Contributor

    I think we are already mypy compatible, as far as I understand, the py.typed file just needs to exist, without content.
    Pydantic and FastApi also just have this empty py.typed file.

    Also, I tested this in a separate project, and mypy worked as expected:

    • for docarray, the import works and incorrect type in line 11 is detected
    • for PIL already the import fails, because it does not have type hints

    image

  3. moved this from Release Committed to Done in DocArray backlogon Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions