Skip to content

Conversation

@MarcoGorelli
Copy link

closes #16

The stubs in typeshed do work, but there are advantages to having then inlined, as detailed in the official typing guides https://typing.python.org/en/latest/guides/libraries.html#how-to-provide-type-annotations

We recommend using the inline type annotations approach, since it has the following benefits:

  • Typically requires the least effort to add and maintain
  • Users don’t have to download additional packages
  • Always remains consistent with the implementation
  • Allows library authors to type check their own code
  • Allows language servers to show users relevant details about the implementation, such as docstrings and default parameter values

@MarcoGorelli MarcoGorelli marked this pull request as ready for review June 23, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mypy support

1 participant