Skip to content

Add py.typed file for type checking #888

@draftcode

Description

@draftcode

Is your feature request related to a problem? Please describe.

Python type checkers expect that type-annotated packages to have py.typed file. Without this, type checkers do not do type checking for that package. E2B Python SDK doesn't have this file, and because of this, type checkers do not type-check code around e2b related APIs. Developers using the SDK won't receive warnings about type mismatches, which can lead to runtime errors.

See https://blog.whtsky.me/tech/2021/dont-forget-py.typed-for-your-typed-python-package/ or https://typing.python.org/en/latest/spec/distributing.html#packaging-type-information for the official instruction on distributing type-annotated libraries.

Describe the solution you'd like

Add an empty file at following path:

  • packages/python-sdk/e2b/py.typed
  • packages/python-sdk/e2b_connect/py.typed

Considering that the Python SDK is using Poetry, adding these two files to the repository would be enough to enable type-checkers check user code against E2B SDK.

Describe alternatives you've considered

This is more about E2B Python SDK not conforming to the Python library distribution standard. Need to be fixed on the distribution side.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions