From bb808ee66f191f3a9bb3fa92d2cb69396ab65256 Mon Sep 17 00:00:00 2001 From: Steele Farnsworth Date: Sun, 12 Jan 2025 17:50:01 -0500 Subject: Migrate to py3.12 generic syntax (removes TypeVar). --- bot/exts/filtering/_filter_lists/filter_list.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bot/exts/filtering/_filter_lists/filter_list.py b/bot/exts/filtering/_filter_lists/filter_list.py index 2cc54e8fb..48d05c97a 100644 --- a/bot/exts/filtering/_filter_lists/filter_list.py +++ b/bot/exts/filtering/_filter_lists/filter_list.py @@ -157,10 +157,7 @@ class AtomicList: return hash(id(self)) -T = typing.TypeVar("T", bound=Filter) - - -class FilterList(dict[ListType, AtomicList], typing.Generic[T], FieldRequiring): +class FilterList[T: Filter](dict[ListType, AtomicList], FieldRequiring): """Dispatches events to lists of _filters, and aggregates the responses into a single list of actions to take.""" # Each subclass must define a name matching the filter_list name we're expecting to receive from the database. -- cgit v1.2.3