From fa4d68085182a50742d6064847b64ecd3950d5f0 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 19 Sep 2025 15:21:33 -0700 Subject: [PATCH] ruff: Fix PYI059 `Generic[]` should always be the last base class. Signed-off-by: Anders Kaseorg --- zerver/lib/notes.py | 2 +- zerver/lib/queue.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/notes.py b/zerver/lib/notes.py index 702459c3bd..77e82795b0 100644 --- a/zerver/lib/notes.py +++ b/zerver/lib/notes.py @@ -9,7 +9,7 @@ _KeyT = TypeVar("_KeyT") _DataT = TypeVar("_DataT") -class BaseNotes(Generic[_KeyT, _DataT], ABC): +class BaseNotes(ABC, Generic[_KeyT, _DataT]): """This class defines a generic type-safe mechanism for associating additional data with an object (without modifying the original object via subclassing or monkey-patching). diff --git a/zerver/lib/queue.py b/zerver/lib/queue.py index 1551a1a4bd..0ae0acbfd7 100644 --- a/zerver/lib/queue.py +++ b/zerver/lib/queue.py @@ -32,7 +32,7 @@ Consumer: TypeAlias = Callable[[ChannelT, Basic.Deliver, pika.BasicProperties, b # RabbitMQ/Pika's queuing system; its purpose is to just provide an # interface for external files to put things into queues and take them # out from bots without having to import pika code all over our codebase. -class QueueClient(Generic[ChannelT], ABC): +class QueueClient(ABC, Generic[ChannelT]): def __init__( self, # Disable RabbitMQ heartbeats by default because BlockingConnection can't process them