Skip to content

Commit fbee330

Browse files
committed
refactor: combine statements
1 parent cf904fe commit fbee330

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/structurizr/view/color.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def as_hex(self) -> str:
2828
if self._rgba.alpha is not None:
2929
values.append(pydantic.color.float_to_255(self._rgba.alpha))
3030

31-
as_hex = "".join(f"{v:02x}" for v in values)
32-
return "#" + as_hex
31+
return f"#{''.join(f'{v:02x}' for v in values)}"
3332

3433
def __str__(self) -> str:
3534
"""Return a hex string representation of the color."""

0 commit comments

Comments
 (0)