From: Gleb Kisenkov Date: Tue, 27 Dec 2022 00:49:54 +0000 (+0100) Subject: Removed `@staticmethod` from `SessionEvents._lifecycle_event` X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ae5cb80f46681f362b083ce6e446da60f17ecf3;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Removed `@staticmethod` from `SessionEvents._lifecycle_event` --- diff --git a/lib/sqlalchemy/orm/events.py b/lib/sqlalchemy/orm/events.py index 86f0aaafab..41b6bd65a1 100644 --- a/lib/sqlalchemy/orm/events.py +++ b/lib/sqlalchemy/orm/events.py @@ -1515,8 +1515,7 @@ class SessionEvents(event.Events[Session]): _dispatch_target = Session - @staticmethod - def _lifecycle_event( + def _lifecycle_event( # type: ignore [misc] fn: Callable[[SessionEvents, Session, Any], None] ) -> Callable[[SessionEvents, Session, Any], None]: _sessionevents_lifecycle_event_names.add(fn.__name__)