Skip to content

Commit f967432

Browse files
authored
Remove support for pytype (#176)
Also improve the generated package descriptions: * List type checkers using a markdown list. * Link the type checkers in that list. * Instead remove the mention of specific type checkers from the introduction. (This removes mentions of pyre and PyCharm, but I assume that at some point we will add pyrefly to the supported type checkers anyway.) * Use "type checkers" instead of "type-checking tools".
1 parent b615a02 commit f967432

File tree

3 files changed

+8
-26
lines changed

3 files changed

+8
-26
lines changed

stub_uploader/build_wheel.py

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
Basic script to generate a wheel for a third-party distribution in typeshed.
33
44
This generates a PEP 561 types stub package using METADATA.toml file for a given
5-
distribution in typeshed stubs. Such package
6-
can be used by type-checking tools like
7-
[mypy](https://github.com/python/mypy/),
8-
[pyright](https://github.com/microsoft/pyright),
9-
[pytype](https://github.com/google/pytype/),
10-
PyCharm, etc. to check code that uses
11-
the corresponding runtime Python package.
5+
distribution in typeshed stubs. Such package can be used by type checkers
6+
to check code that uses the corresponding runtime Python package.
127
138
The generated wheel includes all type stubs (*.pyi files) and the METADATA.toml
149
itself, no other files can be included.
@@ -102,14 +97,9 @@
10297
DESCRIPTION_INTRO_TEMPLATE = """
10398
## Typing stubs for {distribution}
10499
105-
This is a [PEP 561](https://peps.python.org/pep-0561/)
106-
type stub package for the {formatted_distribution} package.
107-
It can be used by type-checking tools like
108-
[mypy](https://github.com/python/mypy/),
109-
[pyright](https://github.com/microsoft/pyright),
110-
[pytype](https://github.com/google/pytype/),
111-
[Pyre](https://pyre-check.org/),
112-
PyCharm, etc. to check code that uses `{distribution}`. This version of
100+
This is a [PEP 561](https://peps.python.org/pep-0561/) type stub package for
101+
the {formatted_distribution} package. It can be used by type checkers
102+
to check code that uses `{distribution}`. This version of
113103
`{stub_distribution}` aims to provide accurate annotations for
114104
`{distribution}{typeshed_version_spec}`.
115105
""".strip()
@@ -122,10 +112,9 @@
122112
[`stubs/{distribution}`](https://github.com/python/typeshed/tree/main/stubs/{distribution})
123113
directory.
124114
125-
This package was tested with
126-
mypy {ts_data.mypy_version},
127-
pyright {ts_data.pyright_version},
128-
and pytype {ts_data.pytype_version}.
115+
This package was tested with the following type checkers:
116+
* [mypy](https://github.com/python/mypy/) {ts_data.mypy_version}
117+
* [pyright](https://github.com/microsoft/pyright) {ts_data.pyright_version}
129118
It was generated from typeshed commit
130119
[`{commit}`](https://github.com/python/typeshed/commit/{commit}).
131120
""".strip()

stub_uploader/ts_data.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class TypeshedData:
2424
typeshed_path: Path
2525
mypy_version: Version
2626
pyright_version: Version
27-
pytype_version: Version
2827
oldest_supported_python: str
2928

3029
def read_current_commit(self) -> str:
@@ -48,7 +47,6 @@ def read_typeshed_data(typeshed_path: Path) -> TypeshedData:
4847
typeshed_path=typeshed_path,
4948
mypy_version=Version(requirements["mypy"]),
5049
pyright_version=Version(requirements["pyright"]),
51-
pytype_version=Version(requirements["pytype"]),
5250
oldest_supported_python=typeshed_table["oldest_supported_python"],
5351
)
5452

tests/test_unit.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,12 @@ def _build_requirements(
226226
*,
227227
mypy: str | None = "1.11.1",
228228
pyright: str | None = "1.1.381",
229-
pytype: (
230-
str | None
231-
) = '2024.9.13; platform_system != "Windows" and python_version < "3.13"',
232229
) -> str:
233230
req = _REQUIREMENTS_TXT
234231
if mypy is not None:
235232
req += f"\nmypy=={mypy}"
236233
if pyright is not None:
237234
req += f"\npyright=={pyright}"
238-
if pytype is not None:
239-
req += f"\npytype=={pytype}"
240235
return req
241236

242237

0 commit comments

Comments
 (0)