Skip to content

Commit

Permalink
mypy: Use NoReturn instead of Never for Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Mar 21, 2024
1 parent 7bcfdfc commit c985dd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yapw/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from collections import namedtuple
from concurrent.futures import ThreadPoolExecutor
from functools import partial
from typing import TYPE_CHECKING, Any, Generic, Never, TypeVar
from typing import TYPE_CHECKING, Any, Generic, NoReturn, TypeVar

import pika
from pika.adapters.asyncio_connection import AsyncioConnection
Expand Down Expand Up @@ -630,7 +630,7 @@ def consume(self, on_message_callback: ConsumerCallback, decorator: Decorator, q
"""
self.channel.add_on_cancel_callback(self.channel_cancel_callback)

submit: partial[Future[Never]] = partial(self.connection.ioloop.run_in_executor, self.executor)
submit: partial[Future[NoReturn]] = partial(self.connection.ioloop.run_in_executor, self.executor)
cb = partial(_on_message, args=(submit, decorator, self.decode, on_message_callback, self.state))

self.consumer_tag = self.channel.basic_consume(queue_name, cb, callback=self.channel_consumeok_callback)
Expand Down

0 comments on commit c985dd1

Please sign in to comment.