Remove alabaster special-casing in `load_extra_theme()`

This commit is contained in:
Adam Turner 2023-12-29 23:35:26 +00:00
parent 19b2950511
commit 0b64b21670

View File

@ -178,15 +178,7 @@ class HTMLThemeFactory:
def load_extra_theme(self, name: str) -> None:
"""Try to load a theme with the specified name."""
if name == 'alabaster':
self.load_alabaster_theme()
else:
self.load_external_theme(name)
def load_alabaster_theme(self) -> None:
"""Load alabaster theme."""
import alabaster
self.themes['alabaster'] = path.join(alabaster.get_path(), 'alabaster')
self.load_external_theme(name)
def load_external_theme(self, name: str) -> None:
"""Try to load a theme using entry_points.