Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion .github/scripts/typeshed_third_party.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
def add_docstrings(typeshed_dir: Path, docstring_adder_dir: Path) -> None:
"""Add docstrings to third-party typeshed stubs."""

for path in (typeshed_dir / "stubs").iterdir():
packages = list((typeshed_dir / "stubs").iterdir())
for i, path in enumerate((typeshed_dir / "stubs").iterdir(), start=1):
print(f"\nCodemodding package [{i}/{len(packages)}]\n")
with tempfile.TemporaryDirectory() as td:
venv_dir = f"{td}-venv"
subprocess.run(["uv", "venv", "--python", "3.13", venv_dir], check=True)
Expand Down
6 changes: 3 additions & 3 deletions add_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,13 +918,13 @@ def _main() -> None:
codemodded_stubs += 1

if codemodded_stubs == 0:
m = "\n--- WARNING: Didn't find any stubs to codemod for the passed packages ---"
m = "\n--- ERROR: Didn't find any stubs to codemod for the passed packages ---"
print(colored(m, "red"))
sys.exit(1)
else:
m = "\n--- Successfully completed the codemod ---"
print(colored(m, "green"))

sys.exit(0)
sys.exit(0)


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies = [
"rich-argparse>=1.7.0",
"termcolor>=3.1.0",
"tomli>=2.2.1",
"typeshed-client @ git+https://github.com/JelleZijlstra/typeshed_client@b79099fe36db977abbb1f3d6466a7657ae3edcfd",
"typeshed-client @ git+https://github.com/JelleZijlstra/typeshed_client@9d4b258bbad66421ee2d9ea8cf02768ffb782a1a",
# So that we can add docs for `typing_extensions` APIs:
"typing_extensions",
# for dynamically installing typeshed packages
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading