Home / Function/ list_outdated() — fastapi Function Reference

list_outdated() — fastapi Function Reference

Architecture documentation for the list_outdated() function in translate.py from the fastapi codebase.

Function python FastAPI Responses calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  eb35a9a2_2f96_3d51_2678_3143960195b2["list_outdated()"]
  6dda5e35_b655_8af3_cd89_8c1584a092c4["translate.py"]
  eb35a9a2_2f96_3d51_2678_3143960195b2 -->|defined in| 6dda5e35_b655_8af3_cd89_8c1584a092c4
  9ce4d449_89b1_9335_4e37_57480b7dc100["update_outdated()"]
  9ce4d449_89b1_9335_4e37_57480b7dc100 -->|calls| eb35a9a2_2f96_3d51_2678_3143960195b2
  bc2c2b41_a3df_bfc0_e27e_63cb9f8d8f0a["iter_en_paths_to_translate()"]
  eb35a9a2_2f96_3d51_2678_3143960195b2 -->|calls| bc2c2b41_a3df_bfc0_e27e_63cb9f8d8f0a
  08ab58ed_fb84_c0ad_0e2e_b521607ca3c9["generate_lang_path()"]
  eb35a9a2_2f96_3d51_2678_3143960195b2 -->|calls| 08ab58ed_fb84_c0ad_0e2e_b521607ca3c9
  style eb35a9a2_2f96_3d51_2678_3143960195b2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/translate.py lines 327–346

def list_outdated(language: str) -> list[Path]:
    dir_path = Path(__file__).absolute().parent.parent
    repo = git.Repo(dir_path)

    outdated_paths: list[Path] = []
    en_lang_paths = list(iter_en_paths_to_translate())
    for path in en_lang_paths:
        lang_path = generate_lang_path(lang=language, path=path)
        if not lang_path.exists():
            continue
        en_commit_datetime = list(repo.iter_commits(paths=path, max_count=1))[
            0
        ].committed_datetime
        lang_commit_datetime = list(repo.iter_commits(paths=lang_path, max_count=1))[
            0
        ].committed_datetime
        if lang_commit_datetime < en_commit_datetime:
            outdated_paths.append(path)
    print(outdated_paths)
    return outdated_paths

Domain

Subdomains

Called By

Frequently Asked Questions

What does list_outdated() do?
list_outdated() is a function in the fastapi codebase, defined in scripts/translate.py.
Where is list_outdated() defined?
list_outdated() is defined in scripts/translate.py at line 327.
What does list_outdated() call?
list_outdated() calls 2 function(s): generate_lang_path, iter_en_paths_to_translate.
What calls list_outdated()?
list_outdated() is called by 1 function(s): update_outdated.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free