Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 4, 2024
1 parent 7b7cf43 commit 9635a1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion branca/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_dict(
[
(name, child.to_dict(depth=depth - 1))
for name, child in self._children.items()
]
],
)
return out

Expand Down
16 changes: 8 additions & 8 deletions branca/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import struct
import typing
import zlib
from typing import Any, Callable, List, Sequence, Tuple, Union, Optional
from typing import Any, Callable, List, Optional, Sequence, Tuple, Union

from jinja2 import Environment, PackageLoader

Expand Down Expand Up @@ -200,7 +200,11 @@ def color_brewer(color_code: str, n: int = 6) -> List[str]:
return color_scheme


def image_to_url(image: Any, colormap: Union["ColorMap", Callable, None] = None, origin: str = "upper") -> str:
def image_to_url(
image: Any,
colormap: Union["ColorMap", Callable, None] = None,
origin: str = "upper",
) -> str:
"""Infers the type of an image argument and transforms it into a URL.
Parameters
Expand Down Expand Up @@ -353,14 +357,10 @@ def _camelify(out: str) -> str:
[
(
"_" + x.lower()
if i < len(out) - 1
and x.isupper()
and out[i + 1].islower()
if i < len(out) - 1 and x.isupper() and out[i + 1].islower()
else (
x.lower() + "_"
if i < len(out) - 1
and x.islower()
and out[i + 1].isupper()
if i < len(out) - 1 and x.islower() and out[i + 1].isupper()
else x.lower()
)
)
Expand Down

0 comments on commit 9635a1d

Please sign in to comment.