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 1, 2024
1 parent 13fb5b1 commit e6b361b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
15 changes: 6 additions & 9 deletions JciHitachi/aws_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,13 @@ def __init__(self, print_response: bool):
self._print_response = print_response

@abstractmethod
def _generate_headers(self):
...
def _generate_headers(self): ...

@abstractmethod
def _handle_response(self, response: httpx.Response):
...
def _handle_response(self, response: httpx.Response): ...

@abstractmethod
def _send(self):
...
def _send(self): ...

def get_data(self):
raise NotImplementedError
Expand Down Expand Up @@ -597,9 +594,9 @@ def _on_publish(self, topic: str, payload: bytes, dup, qos, retain, **kwargs):
)
self._mqtt_events.device_status_event[thing_name].set()
elif split_topic[2] == "registration" and split_topic[3] == "response":
self._mqtt_events.device_support[
thing_name
] = JciHitachiAWSStatusSupport(payload)
self._mqtt_events.device_support[thing_name] = (
JciHitachiAWSStatusSupport(payload)
)
self._mqtt_events.device_support_event[thing_name].set()
elif split_topic[2] == "control" and split_topic[3] == "response":
self._mqtt_events.device_control[thing_name] = payload
Expand Down
6 changes: 3 additions & 3 deletions tests/test_aws_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,9 @@ def mock_post_func(
"Accept": "application/json",
}
if test_class.__name__ not in self.no_need_access_token:
h[
"accesstoken"
] = f"Bearer {fixture_aws_tokens.access_token}"
h["accesstoken"] = (
f"Bearer {fixture_aws_tokens.access_token}"
)
assert (
endpoint
== f"https://{AWS_IOT_ENDPOINT}/{c.__class__.__name__}"
Expand Down

0 comments on commit e6b361b

Please sign in to comment.