Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
ruff: Fix FURB180 Use of `metaclass=abc.ABCMeta`.
Anders Kaseorg80d3e60df8e2
diff --git a/zerver/lib/notes.py b/zerver/lib/notes.pyindex 92a7f953c2f..702459c3bd1 100644--- a/zerver/lib/notes.py+++ b/zerver/lib/notes.py@@ -1,5 +1,5 @@import weakref-from abc import ABCMeta, abstractmethod+from abc import ABC, abstractmethodfrom collections.abc import MutableMappingfrom typing import Any, ClassVar, Generic, TypeVar@@ -9,7 +9,7 @@ _KeyT = TypeVar("_KeyT")_DataT = TypeVar("_DataT")-class BaseNotes(Generic[_KeyT, _DataT], metaclass=ABCMeta):+class BaseNotes(Generic[_KeyT, _DataT], ABC):"""This class defines a generic type-safe mechanism for associatingadditional data with an object (without modifying the originalobject via subclassing or monkey-patching).diff --git a/zerver/lib/outgoing_webhook.py b/zerver/lib/outgoing_webhook.pyindex 0de4d5f089b..0976a3d83a5 100644--- a/zerver/lib/outgoing_webhook.py+++ b/zerver/lib/outgoing_webhook.py@@ -25,7 +25,7 @@ from zerver.models.clients import get_clientfrom zerver.models.users import get_user_profile_by_id-class OutgoingWebhookServiceInterface(metaclass=abc.ABCMeta):+class OutgoingWebhookServiceInterface(abc.ABC):def __init__(self, token: str, user_profile: UserProfile, service_name: str) -> None:self.token: str = tokenself.user_profile: UserProfile = user_profilediff --git a/zerver/lib/queue.py b/zerver/lib/queue.pyindex 5f8063783cd..5aed1b5793c 100644--- a/zerver/lib/queue.py+++ b/zerver/lib/queue.py@@ -3,7 +3,7 @@ import randomimport sslimport threadingimport time-from abc import ABCMeta, abstractmethod+from abc import ABC, abstractmethodfrom collections import defaultdictfrom collections.abc import Callable, Mappingfrom typing import Any, Generic, TypeAlias, TypeVar@@ -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], metaclass=ABCMeta):+class QueueClient(Generic[ChannelT], ABC):def __init__(self,# Disable RabbitMQ heartbeats by default because BlockingConnection can't process them