Skip to content

Commit 3362df8

Browse files
authored
Bump typeshed_client pin (#20)
1 parent e876de4 commit 3362df8

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.github/scripts/typeshed_third_party.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
def add_docstrings(typeshed_dir: Path, docstring_adder_dir: Path) -> None:
1010
"""Add docstrings to third-party typeshed stubs."""
1111

12-
for path in (typeshed_dir / "stubs").iterdir():
12+
packages = list((typeshed_dir / "stubs").iterdir())
13+
for i, path in enumerate((typeshed_dir / "stubs").iterdir(), start=1):
14+
print(f"\nCodemodding package [{i}/{len(packages)}]\n")
1315
with tempfile.TemporaryDirectory() as td:
1416
venv_dir = f"{td}-venv"
1517
subprocess.run(["uv", "venv", "--python", "3.13", venv_dir], check=True)

add_docstrings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -918,13 +918,13 @@ def _main() -> None:
918918
codemodded_stubs += 1
919919

920920
if codemodded_stubs == 0:
921-
m = "\n--- WARNING: Didn't find any stubs to codemod for the passed packages ---"
921+
m = "\n--- ERROR: Didn't find any stubs to codemod for the passed packages ---"
922922
print(colored(m, "red"))
923+
sys.exit(1)
923924
else:
924925
m = "\n--- Successfully completed the codemod ---"
925926
print(colored(m, "green"))
926-
927-
sys.exit(0)
927+
sys.exit(0)
928928

929929

930930
if __name__ == "__main__":

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies = [
1515
"rich-argparse>=1.7.0",
1616
"termcolor>=3.1.0",
1717
"tomli>=2.2.1",
18-
"typeshed-client @ git+https://github.com/JelleZijlstra/typeshed_client@b79099fe36db977abbb1f3d6466a7657ae3edcfd",
18+
"typeshed-client @ git+https://github.com/JelleZijlstra/typeshed_client@9d4b258bbad66421ee2d9ea8cf02768ffb782a1a",
1919
# So that we can add docs for `typing_extensions` APIs:
2020
"typing_extensions",
2121
# for dynamically installing typeshed packages

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)