MCPcopy
hub / github.com/sphinx-doc/sphinx / create

Method create

sphinx/theming.py:251–265  ·  view source on GitHub ↗

Create an instance of theme.

(self, name: str)

Source from the content-addressed store, hash-verified

249 return themes
250
251 def create(self, name: str) -> Theme:
252 """Create an instance of theme."""
253 if name in self._entry_point_themes:
254 # Load a deferred theme from an entry point
255 entry_point_loader = self._entry_point_themes[name]
256 entry_point_loader()
257 if name not in self._themes:
258 raise ThemeError(__('no theme named %r found (missing theme.toml?)') % name)
259
260 themes, theme_dirs, tmp_dirs = _load_theme_with_ancestors(
261 name,
262 self._themes,
263 self._entry_point_themes,
264 )
265 return Theme(name, configs=themes, paths=theme_dirs, tmp_dirs=tmp_dirs)
266
267
268def _is_archived_theme(filename: Path, /) -> bool:

Callers 2

initMethod · 0.95
init_templatesMethod · 0.95

Calls 3

ThemeErrorClass · 0.90
ThemeClass · 0.70

Tested by

no test coverage detected