Skip to content

Commit df5b711

Browse files
committed
Run ruff format
1 parent d861e5b commit df5b711

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/integrations/home_assistant/discovery.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
ScheduledChargingMode,
1010
)
1111

12-
import mqtt_topics
1312
from integrations.home_assistant.availability import (
1413
HaCustomAvailabilityConfig,
1514
HaCustomAvailabilityEntry,
1615
)
1716
from integrations.home_assistant.base import HomeAssistantDiscoveryBase
1817
from integrations.home_assistant.utils import decode_as_utf8, snake_case
18+
import mqtt_topics
1919
from publisher.mqtt_publisher import MqttPublisher
2020
from vehicle import RefreshMode, VehicleState
2121

@@ -1075,5 +1075,3 @@ def __publish_heated_seat_switch(self, seat: str, topic: str) -> None:
10751075

10761076
def __unpublish_heated_seat_switch(self, seat: str) -> None:
10771077
self.__unpublish_ha_discovery_message("switch", f"Heated Seat {seat}")
1078-
1079-

src/integrations/home_assistant/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1+
from __future__ import annotations
2+
13
import logging
24

35
import inflection
46

57
LOG = logging.getLogger(__name__)
68

9+
710
def snake_case(s: str) -> str:
811
return inflection.underscore(s.lower()).replace(" ", "_")
912

1013

1114
def decode_as_utf8(
12-
byte_string: str | None | bytes | bytearray, default: str = ""
15+
byte_string: str | None | bytes | bytearray, default: str = ""
1316
) -> str:
1417
if byte_string is None:
1518
return default

0 commit comments

Comments
 (0)