Skip to content

Commit

Permalink
docs: Adds comments re LiteralString
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned committed Sep 5, 2024
1 parent 027c82c commit 9ce798c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions altair/utils/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
ThemeType = Plugin[Dict[str, Any]]


# HACK: See for `LiteralString` requirement in `name`
# https://github.com/vega/altair/pull/3526#discussion_r1743350127
class ThemeRegistry(PluginRegistry[ThemeType, Dict[str, Any]]):
def enable(
self, name: LiteralString | AltairThemes | VegaThemes | None = None, **options
Expand Down
2 changes: 2 additions & 0 deletions altair/vegalite/v5/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def __repr__(self) -> str:
themes.enable("default")


# HACK: See for `LiteralString` requirement in `name`
# https://github.com/vega/altair/pull/3526#discussion_r1743350127
def register_theme(
name: LiteralString, *, enable: bool
) -> Callable[[Callable[P, R]], Callable[P, R]]:
Expand Down

0 comments on commit 9ce798c

Please sign in to comment.