Skip to content

Commit 2bfb2c5

Browse files
committed
formatting
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
1 parent fedeab6 commit 2bfb2c5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

rabbitmq_amqp_python_client/entities.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ class MessageProperties:
171171
reply_to_group_id: Id for sending replies to a specific group.
172172
"""
173173

174-
message_id: Optional[Any] = None
174+
message_id: Optional[Union[int, str, bytes]] = None
175175
user_id: Optional[bytes] = None
176176
to: Optional[str] = None
177177
subject: Optional[str] = None
178178
reply_to: Optional[str] = None
179-
correlation_id: Optional[Any] = None
179+
correlation_id: Optional[Union[int, str, bytes]] = None
180180
content_type: Optional[str] = None
181181
content_encoding: Optional[str] = None
182182
absolute_expiry_time: Optional[datetime] = None
@@ -307,10 +307,9 @@ def _filter_message_properties(
307307
filter_prop: Dict[symbol, Any] = {}
308308

309309
for key, value in message_properties.__dict__.items():
310-
if key is not None:
311-
if message_properties.__dict__[key] is not None:
312-
# replace _ with - for the key
313-
filter_prop[symbol(key.replace("_", "-"))] = value
310+
if value is not None:
311+
# replace _ with - for the key
312+
filter_prop[symbol(key.replace("_", "-"))] = value
314313

315314
if len(filter_prop) > 0:
316315
self._filter_set[symbol(AMQP_PROPERTIES_FILTER)] = Described(

0 commit comments

Comments
 (0)