From 295e45808cd310bbe6357e7a636ca85a845bd52a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 21:08:59 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/gen_doc_stubs.py | 1 + psmq/message.py | 1 + psmq/queue.py | 4 ++-- psmq/utils.py | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/gen_doc_stubs.py b/docs/gen_doc_stubs.py index 2e7b244..b1d90a0 100644 --- a/docs/gen_doc_stubs.py +++ b/docs/gen_doc_stubs.py @@ -1,4 +1,5 @@ """Generate documentation stubs.""" + from pathlib import Path from typing import Set diff --git a/psmq/message.py b/psmq/message.py index 7deb404..b2a755e 100644 --- a/psmq/message.py +++ b/psmq/message.py @@ -1,4 +1,5 @@ """Messages for PSMQ.""" + from dataclasses import dataclass, field from datetime import datetime, timedelta from typing import Any, Optional diff --git a/psmq/queue.py b/psmq/queue.py index 525a3e0..c066ce3 100644 --- a/psmq/queue.py +++ b/psmq/queue.py @@ -125,7 +125,7 @@ def serialize(self, message: Any) -> bytes: """ try: return self.serializer(message) - except Exception as e: # NOQA: BLE001 + except Exception as e: # TODO: This might be a place to provide a hook or configuration for error handling raise UnserializableMessage(message, self.serializer.__name__) from e @@ -144,7 +144,7 @@ def deserialize(self, message: bytes) -> Any: """ try: return self.deserializer(message) - except Exception as e: # NOQA: BLE001 + except Exception as e: # TODO: This might be a place to provide a hook or configuration for error handling raise UndeserializableMessage(message, self.deserializer.__name__) from e diff --git a/psmq/utils.py b/psmq/utils.py index b469151..acb8c51 100644 --- a/psmq/utils.py +++ b/psmq/utils.py @@ -1,4 +1,5 @@ """Utility functions for the psmq package.""" + from itertools import islice from typing import Any, Iterable, Tuple