/
niceSOFT
/
python3-hatchling
Обзор
Документация
Войти
/
niceSOFT
/
python3-hatchling
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/hatch/config/utils.py
20 строк
491 B
Dimitri Papadopoulos Orfanos
Upgrade Ruff to 0.13.2 (#1890)
28 сен 2025, 21:20
Не верифицирован
28 сен 2025, 21:20
aff6f39
Код
Авторство
О чём код?
from __future__ import annotations from typing import TYPE_CHECKING import tomlkit if TYPE_CHECKING: from tomlkit.items import InlineTable from tomlkit.toml_document import TOMLDocument from hatch.utils.fs import Path def save_toml_document(document: TOMLDocument, path: Path): path.ensure_parent_dir_exists() path.write_atomic(tomlkit.dumps(document), "w", encoding="utf-8") def create_toml_document(config: dict) -> InlineTable: return tomlkit.item(config)