Skip to content

Commit

Permalink
chore: Use types-pika to avoid a typing error
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jan 18, 2022
1 parent aa32949 commit bd1e1d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
],
"types": [
"mypy",
"pika-stubs",
"types-orjson",
"types-pika",
],
"docs": [
"furo",
Expand Down
5 changes: 3 additions & 2 deletions yapw/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Client(clients.Threaded, clients.Durable, clients.Blocking, clients.Base):
from typing import Any, Callable, List, Optional, Set, Tuple

import pika
from pika.exchange_type import ExchangeType

from yapw.decorators import default_decode, halt
from yapw.ossignal import install_signal_handlers, signal_names
Expand Down Expand Up @@ -145,7 +146,7 @@ def __init__(
super().__init__(**kwargs)

parameters = pika.URLParameters(url)
parameters.blocked_connection_timeout = blocked_connection_timeout # type: ignore # python/mypy#3186
parameters.blocked_connection_timeout = blocked_connection_timeout

#: The connection.
self.connection = pika.BlockingConnection(parameters) # type: pika.BlockingConnection
Expand Down Expand Up @@ -179,7 +180,7 @@ def __init__(
self,
*,
exchange: str = "",
exchange_type: str = "direct",
exchange_type: ExchangeType = ExchangeType.direct,
encode: Encode = default_encode,
content_type: str = "application/json",
routing_key_template: str = "{exchange}_{routing_key}",
Expand Down

0 comments on commit bd1e1d8

Please sign in to comment.