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 15950f118234a9049ce8de348d3c63a9cf9fb480
12 changes: 3 additions & 9 deletions scripts/update_lib/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,7 @@ def resolve_test_to_lib(test_name: str) -> str | None:


@functools.cache
def get_lib_paths(
name: str, cpython_prefix: str
) -> tuple[pathlib.Path, ...]:
def get_lib_paths(name: str, cpython_prefix: str) -> tuple[pathlib.Path, ...]:
"""Get all library paths for a module.

Args:
Expand Down Expand Up @@ -616,9 +614,7 @@ def get_all_hard_deps(name: str, cpython_prefix: str) -> list[str]:


@functools.cache
def get_test_paths(
name: str, cpython_prefix: str
) -> tuple[pathlib.Path, ...]:
def get_test_paths(name: str, cpython_prefix: str) -> tuple[pathlib.Path, ...]:
"""Get all test paths for a module.

Args:
Expand Down Expand Up @@ -812,9 +808,7 @@ def _dircmp_is_same(dcmp) -> bool:


@functools.cache
def is_up_to_date(
name: str, cpython_prefix: str, lib_prefix: str
) -> bool:
def is_up_to_date(name: str, cpython_prefix: str, lib_prefix: str) -> bool:
"""Check if a module is up-to-date by comparing files.

Args:
Expand Down
11 changes: 3 additions & 8 deletions scripts/update_lib/show_todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ def compute_todo_list(
# Get hard_deps and check their status
hard_deps = get_all_hard_deps(name, cpython_prefix)
hard_deps_status = {
hd: is_up_to_date(hd, cpython_prefix, lib_prefix)
for hd in hard_deps
hd: is_up_to_date(hd, cpython_prefix, lib_prefix) for hd in hard_deps
}

module_data[name] = {
Expand Down Expand Up @@ -339,9 +338,7 @@ def count_test_todos(test_name: str, lib_prefix: str) -> int:
return total


def is_test_tracked(
test_name: str, cpython_prefix: str, lib_prefix: str
) -> bool:
def is_test_tracked(test_name: str, cpython_prefix: str, lib_prefix: str) -> bool:
"""Check if a test exists in our local Lib/test."""
cpython_dir = pathlib.Path(cpython_prefix) / "Lib" / "test" / test_name
cpython_file = pathlib.Path(cpython_prefix) / "Lib" / "test" / f"{test_name}.py"
Expand All @@ -357,9 +354,7 @@ def is_test_tracked(
return local_path.exists()


def is_test_up_to_date(
test_name: str, cpython_prefix: str, lib_prefix: str
) -> bool:
def is_test_up_to_date(test_name: str, cpython_prefix: str, lib_prefix: str) -> bool:
"""Check if a test is up-to-date by comparing files.

Ignores lines containing 'TODO: RUSTPYTHON' in local files.
Expand Down