turbo-themes 0.43.4
“Universal design tokens and themes for Python applications”
imports Path from pathlibimports pathlib
SHA-256972d0d33df429bd325007fd4cb67875a26c99c5501746b1479108ebb44687997
MaleculeH₂(DbF₂)
Evidence
247:22… ValueError(f"Theme '{theme_id}' not found")
248 return json.dumps(
249 {
250 theme_id: {
251 "id": theme.id,
252 "label": the …
279:3… json_data = self.export_theme_json(theme_id)
280 with open(filepath, "w", encoding="utf-8") as f:
281 f.write(json_data)
282
283
284# Module-level holder so reset can swap the manager without a ``global``
285# statement; in …
1"""Token mapping configuration loader.
2
3Loads the centralized token-to-CSS-variable mappings from config/token-mappings.json.
4This ensures Python uses the same mappings as TypeScript and other platforms.
5"""
6
7from __future__ import annotations
8
9import json
10from dataclasses import dataclass
11from pathlib import Path
12from typing import Any, Callable, Dict, List, Optional, Tuple
13
14from .models import Tokens
15
16
⋯5 lines
⋯5 lines
60 current / ".." / ".." / ".." / ".." / "config" / "token-mappings.json",
61 current / ".." / ".." / ".." / "config" / "token-mappings.json",
62 Path.cwd() / "config" / "token-mappings.json",
63 ]
64
⋯4 lines
119:3… """
120 config_path = _find_config_path()
121 with open(config_path, encoding="utf-8") as f:
122 data = json.load(f)
123
124 core_mappings = tuple(
⋯5 lines
No evidence locations were recorded for this file. Raw result