Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Nov 19, 2023
1 parent 4035881 commit b3b426f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions mknodes/theme/materialtheme/palette.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,3 @@ def build_toggle(palettes: list[Palette]) -> xml.Form:
scheme="slate",
)
root = build_toggle([default_palette, dark_palette])
xml_string = xml.pformat(root)
print(xml_string)
14 changes: 0 additions & 14 deletions mknodes/utils/xmlhelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,5 @@ def get_source_button(icon: str = "material/code-json") -> A:
return elem


def pformat(str_or_elem: str | Et.Element, space: str = " ", level: int = 0) -> str:
"""Prettyprint given XML.
Arguments:
str_or_elem: XML to prettyprint
space: Amount of spaces to use for indentation
level: Initial indentation level
"""
if isinstance(str_or_elem, str):
str_or_elem = Et.fromstring(str_or_elem)
Et.indent(str_or_elem, space=space, level=level)
return Et.tostring(str_or_elem, encoding="unicode", method="html")


if __name__ == "__main__":
a = Div("test")

0 comments on commit b3b426f

Please sign in to comment.