From 9635a1df4dda7534a7b59b92bea1f12fc0e791e8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 19:10:17 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- branca/element.py | 2 +- branca/utilities.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/branca/element.py b/branca/element.py index cda7e96..a1e005a 100644 --- a/branca/element.py +++ b/branca/element.py @@ -184,7 +184,7 @@ def to_dict( [ (name, child.to_dict(depth=depth - 1)) for name, child in self._children.items() - ] + ], ) return out diff --git a/branca/utilities.py b/branca/utilities.py index 2d9afaa..14a1d46 100644 --- a/branca/utilities.py +++ b/branca/utilities.py @@ -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 @@ -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 @@ -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() ) )