- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 24 for read_pet (0.06 seconds)
-
scripts/tests/test_translation_fixer/test_code_includes/test_number_mismatch.py
cli, ["fix-pages", "docs/lang/docs/doc.md"], ) assert result.exit_code == 1 fixed_content = (root_dir / "docs" / "lang" / "docs" / "doc.md").read_text("utf-8") expected_content = Path(f"{data_path}/translated_doc_number_gt.md").read_text( "utf-8" ) assert fixed_content == expected_content # Translated doc remains unchanged assert "Error processing docs/lang/docs/doc.md" in result.outputCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jan 10 22:43:44 GMT 2026 - 1.9K bytes - Click Count (0) -
docs_src/generate_clients/tutorial004_py310.py
import json from pathlib import Path file_path = Path("./openapi.json") openapi_content = json.loads(file_path.read_text()) for path_data in openapi_content["paths"].values(): for operation in path_data.values(): tag = operation["tags"][0] operation_id = operation["operationId"] to_remove = f"{tag}-" new_operation_id = operation_id[len(to_remove) :] operation["operationId"] = new_operation_id
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 493 bytes - Click Count (0) -
scripts/tests/test_translation_fixer/test_complex_doc/test_compex_doc.py
["fix-pages", "docs/lang/docs/doc.md"], ) assert result.exit_code == 0, result.output fixed_content = (root_dir / "docs" / "lang" / "docs" / "doc.md").read_text("utf-8") expected_content = (data_path / "translated_doc_expected.md").read_text("utf-8") assert fixed_content == expected_content assert "Fixing multiline code blocks in" in result.output
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jan 10 22:43:44 GMT 2026 - 902 bytes - Click Count (0) -
scripts/mkdocs_hooks.py
@lru_cache def get_missing_translation_content(docs_dir: str) -> str: docs_dir_path = Path(docs_dir) missing_translation_path = docs_dir_path.parent.parent / "missing-translation.md" return missing_translation_path.read_text(encoding="utf-8") @lru_cache def get_translation_banner_content(docs_dir: str) -> str: docs_dir_path = Path(docs_dir) translation_banner_path = docs_dir_path / "translation-banner.md"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 6.6K bytes - Click Count (0) -
scripts/translation_fixer.py
print(f"Skipping English document: {path}") return True en_doc_path = Path("docs") / "en" / Path(*path.parts[2:]) doc_lines = path.read_text(encoding="utf-8").splitlines() en_doc_lines = en_doc_path.read_text(encoding="utf-8").splitlines() doc_lines = check_translation( doc_lines=doc_lines, en_doc_lines=en_doc_lines, lang_code=lang_code,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jan 10 21:48:08 GMT 2026 - 3.2K bytes - Click Count (0) -
scripts/translate.py
) general_prompt_path = Path(__file__).absolute().parent / "general-llm-prompt.md" general_prompt = general_prompt_path.read_text(encoding="utf-8") app = typer.Typer() @lru_cache def get_langs() -> dict[str, str]: return yaml.safe_load(Path("docs/language_names.yml").read_text(encoding="utf-8")) def generate_lang_path(*, lang: str, path: Path) -> Path: en_docs_path = Path("docs/en/docs")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:37:41 GMT 2026 - 15.8K bytes - Click Count (0) -
scripts/docs.py
("'t", "t"), # don't -> dont ("**", ""), # **FastAPI**s -> FastAPIs ], ) def get_en_config() -> dict[str, Any]: return mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8")) def get_lang_paths() -> list[Path]: return sorted(docs_path.iterdir()) def lang_callback(lang: str | None) -> str | None: if lang is None: return NoneCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 17:46:10 GMT 2026 - 25.4K bytes - Click Count (0) -
docs_src/authentication_error_status_code/tutorial001_an_py310.py
status_code=status.HTTP_403_FORBIDDEN, detail="Not authenticated" ) CredentialsDep = Annotated[HTTPAuthorizationCredentials, Depends(HTTPBearer403())] @app.get("/me") def read_me(credentials: CredentialsDep):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 618 bytes - Click Count (0) -
scripts/topic_repos.py
# Local development # repos_path = Path("../docs/en/data/topic_repos.yml") repos_path = Path("./docs/en/data/topic_repos.yml") repos_old_content = repos_path.read_text(encoding="utf-8") new_repos_content = yaml.dump(data, sort_keys=False, width=200, allow_unicode=True) if repos_old_content == new_repos_content: logging.info("The data hasn't changed. Finishing.") returnCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Dec 16 12:34:01 GMT 2025 - 2.7K bytes - Click Count (0) -
scripts/contributors.py
"url": author.url, } return users def update_content(*, content_path: Path, new_content: Any) -> bool: old_content = content_path.read_text(encoding="utf-8") new_content = yaml.dump(new_content, sort_keys=False, width=200, allow_unicode=True) if old_content == new_content: logging.info(f"The content hasn't changed for {content_path}")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Dec 16 12:34:01 GMT 2025 - 8.6K bytes - Click Count (0)