Skip to content

Commit 43d1630

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d6967a5 commit 43d1630

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

JciHitachi/aws_connection.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,13 @@ def __init__(self, print_response: bool):
7676
self._print_response = print_response
7777

7878
@abstractmethod
79-
def _generate_headers(self):
80-
...
79+
def _generate_headers(self): ...
8180

8281
@abstractmethod
83-
def _handle_response(self, response: httpx.Response):
84-
...
82+
def _handle_response(self, response: httpx.Response): ...
8583

8684
@abstractmethod
87-
def _send(self):
88-
...
85+
def _send(self): ...
8986

9087
def get_data(self):
9188
raise NotImplementedError
@@ -597,9 +594,9 @@ def _on_publish(self, topic: str, payload: bytes, dup, qos, retain, **kwargs):
597594
)
598595
self._mqtt_events.device_status_event[thing_name].set()
599596
elif split_topic[2] == "registration" and split_topic[3] == "response":
600-
self._mqtt_events.device_support[
601-
thing_name
602-
] = JciHitachiAWSStatusSupport(payload)
597+
self._mqtt_events.device_support[thing_name] = (
598+
JciHitachiAWSStatusSupport(payload)
599+
)
603600
self._mqtt_events.device_support_event[thing_name].set()
604601
elif split_topic[2] == "control" and split_topic[3] == "response":
605602
self._mqtt_events.device_control[thing_name] = payload

tests/test_aws_connection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,9 @@ def mock_post_func(
491491
"Accept": "application/json",
492492
}
493493
if test_class.__name__ not in self.no_need_access_token:
494-
h[
495-
"accesstoken"
496-
] = f"Bearer {fixture_aws_tokens.access_token}"
494+
h["accesstoken"] = (
495+
f"Bearer {fixture_aws_tokens.access_token}"
496+
)
497497
assert (
498498
endpoint
499499
== f"https://{AWS_IOT_ENDPOINT}/{c.__class__.__name__}"

0 commit comments

Comments
 (0)