Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions stub_uploader/build_wheel.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Basic script to generate a wheel for a third-party distribution in typeshed.

This generates a PEP 561 types stub package using METADATA.toml file for a given
This generates a stub package using METADATA.toml file for a given
distribution in typeshed stubs. Such package can be used by type checkers
to check code that uses the corresponding runtime Python package.

Expand Down Expand Up @@ -39,7 +39,7 @@
SUFFIX = "-stubs"

PARTIAL_STUBS_DESCRIPTION = """
This stub package is marked as [partial](https://peps.python.org/pep-0561/#partial-stub-packages).
This stub package is marked as [partial](https://typing.python.org/en/latest/spec/distributing.html#partial-stub-packages).
If you find that annotations are missing, feel free to contribute and help complete them.
""".lstrip()

Expand Down Expand Up @@ -97,8 +97,8 @@
DESCRIPTION_INTRO_TEMPLATE = """
## Typing stubs for {distribution}

This is a [PEP 561](https://peps.python.org/pep-0561/) type stub package for
the {formatted_distribution} package. It can be used by type checkers
This is a [type stub package](https://typing.python.org/en/latest/tutorials/external_libraries.html)
for the {formatted_distribution} package. It can be used by type checkers
to check code that uses `{distribution}`. This version of
`{stub_distribution}` aims to provide accurate annotations for
`{distribution}{typeshed_version_spec}`.
Comment on lines +100 to 104
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think users of type packages (who the description is targeted at) should be bothered with the spec, which is (or rather should be) only relevant for type checker authors. That said, if you think anything is missing from the tutorial (or if we should maybe add or replace the tutorial with a guide?), we could always extend it. I was also debating whether we should link the spec from the tutorial, but that also seemed to target the wrong audience.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I'm happy to leave it as is

Expand Down Expand Up @@ -240,7 +240,7 @@ def find_stub_files(top: str) -> list[str]:
def copy_stubs(base_dir: Path, dst: Path) -> None:
"""Copy stubs for given distribution to the build directory.

For packages change name by appending "-stubs" suffix (PEP 561),
For packages change name by appending "-stubs" suffix (per the typing spec),
also convert modules to trivial packages with a single __init__.pyi.
"""
for entry in base_dir.iterdir():
Expand Down