ensure_non_translated() — fastapi Function Reference
Architecture documentation for the ensure_non_translated() function in docs.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 65497fb3_0bb2_0320_6cb0_f2f8b6334934["ensure_non_translated()"] 089911a1_02c3_0f6b_d62d_71c980ade67e["docs.py"] 65497fb3_0bb2_0320_6cb0_f2f8b6334934 -->|defined in| 089911a1_02c3_0f6b_d62d_71c980ade67e 7057f227_6b9c_6d7e_0958_8e852a5a06e4["get_lang_paths()"] 65497fb3_0bb2_0320_6cb0_f2f8b6334934 -->|calls| 7057f227_6b9c_6d7e_0958_8e852a5a06e4 style 65497fb3_0bb2_0320_6cb0_f2f8b6334934 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/docs.py lines 377–400
def ensure_non_translated() -> None:
"""
Ensure there are no files in the non translatable pages.
"""
print("Ensuring no non translated pages")
lang_paths = get_lang_paths()
error_paths = []
for lang in lang_paths:
if lang.name == "en":
continue
for non_translatable in non_translated_sections:
non_translatable_path = lang / "docs" / non_translatable
if non_translatable_path.exists():
error_paths.append(non_translatable_path)
if error_paths:
print("Non-translated pages found, removing them:")
for error_path in error_paths:
print(error_path)
if error_path.is_file():
error_path.unlink()
else:
shutil.rmtree(error_path)
raise typer.Exit(1)
print("No non-translated pages found ✅")
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does ensure_non_translated() do?
ensure_non_translated() is a function in the fastapi codebase, defined in scripts/docs.py.
Where is ensure_non_translated() defined?
ensure_non_translated() is defined in scripts/docs.py at line 377.
What does ensure_non_translated() call?
ensure_non_translated() calls 1 function(s): get_lang_paths.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free