diff options
author | 2025-01-12 17:50:01 -0500 | |
---|---|---|
committer | 2025-01-12 17:50:01 -0500 | |
commit | bb808ee66f191f3a9bb3fa92d2cb69396ab65256 (patch) | |
tree | fe9f9e34ab9305840c941f4a6b2862b43733b002 | |
parent | work-in-progress: when upload a text file attachment, ask for permission to a... (diff) |
Migrate to py3.12 generic syntax (removes TypeVar).
-rw-r--r-- | bot/exts/filtering/_filter_lists/filter_list.py | 5 |
1 files changed, 1 insertions, 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. |