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