Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Auto-format: ruff format
  • Loading branch information
github-actions[bot] committed Jan 24, 2026
commit 7096b76d947e075d4b76f26bccc32951f30f79b2
4 changes: 3 additions & 1 deletion scripts/update_lib/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ def resolve_hard_dep_parent(name: str, cpython_prefix: str = "cpython") -> str |
lib_dir = pathlib.Path(cpython_prefix) / "Lib"
parent_file = lib_dir / f"{parent}.py"
parent_dir = lib_dir / parent
if parent_file.exists() or (parent_dir.exists() and (parent_dir / "__init__.py").exists()):
if parent_file.exists() or (
parent_dir.exists() and (parent_dir / "__init__.py").exists()
):
return parent

return None
Expand Down
5 changes: 4 additions & 1 deletion scripts/update_lib/show_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def get_all_modules(cpython_prefix: str = "cpython") -> list[str]:

# Skip private modules that are hard_deps of other modules
# e.g., _pydatetime is a hard_dep of datetime, so skip it
if name.startswith("_") and resolve_hard_dep_parent(name, cpython_prefix) is not None:
if (
name.startswith("_")
and resolve_hard_dep_parent(name, cpython_prefix) is not None
):
continue

modules.add(name)
Expand Down