summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/event
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-11-21 20:36:35 +0100
committerFederico Caselli <cfederico87@gmail.com>2021-11-22 15:03:17 +0000
commit0b95f0055be252b13e99b0a944466f60b5e367ff (patch)
tree6ae4135fd408c4e69582c4f6fa458b007553aeab /lib/sqlalchemy/event
parente04baa2953fb5d0d29f5dca01ea6882bf1fa1cd4 (diff)
downloadsqlalchemy-0b95f0055be252b13e99b0a944466f60b5e367ff.tar.gz
Remove object in class definition
References: #4600 Change-Id: I2a62ddfe00bc562720f0eae700a497495d7a987a
Diffstat (limited to 'lib/sqlalchemy/event')
-rw-r--r--lib/sqlalchemy/event/attr.py2
-rw-r--r--lib/sqlalchemy/event/base.py8
-rw-r--r--lib/sqlalchemy/event/registry.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqlalchemy/event/attr.py b/lib/sqlalchemy/event/attr.py
index a0c299221..77eb0472c 100644
--- a/lib/sqlalchemy/event/attr.py
+++ b/lib/sqlalchemy/event/attr.py
@@ -51,7 +51,7 @@ class RefCollection(util.MemoizedSlots):
return weakref.ref(self, registry._collection_gced)
-class _empty_collection(object):
+class _empty_collection:
def append(self, element):
pass
diff --git a/lib/sqlalchemy/event/base.py b/lib/sqlalchemy/event/base.py
index f8cbfbd7f..b084207b4 100644
--- a/lib/sqlalchemy/event/base.py
+++ b/lib/sqlalchemy/event/base.py
@@ -38,7 +38,7 @@ def _is_event_name(name):
) or name.startswith("_sa_event")
-class _UnpickleDispatch(object):
+class _UnpickleDispatch:
"""Serializable callable that re-generates an instance of
:class:`_Dispatch` given a particular :class:`.Events` subclass.
@@ -54,7 +54,7 @@ class _UnpickleDispatch(object):
raise AttributeError("No class with a 'dispatch' member present.")
-class _Dispatch(object):
+class _Dispatch:
"""Mirror the event listening definitions of an Events class with
listener collections.
@@ -275,7 +275,7 @@ class Events(util.with_metaclass(_EventMeta, object)):
cls.dispatch._clear()
-class _JoinedDispatcher(object):
+class _JoinedDispatcher:
"""Represent a connection between two _Dispatch objects."""
__slots__ = "local", "parent", "_instance_cls"
@@ -302,7 +302,7 @@ class _JoinedDispatcher(object):
return self.parent._events
-class dispatcher(object):
+class dispatcher:
"""Descriptor used by target classes to
deliver the _Dispatch class at the class level
and produce new _Dispatch instances for target
diff --git a/lib/sqlalchemy/event/registry.py b/lib/sqlalchemy/event/registry.py
index ca85f3368..d81f27cd4 100644
--- a/lib/sqlalchemy/event/registry.py
+++ b/lib/sqlalchemy/event/registry.py
@@ -148,7 +148,7 @@ def _clear(owner, elements):
del _key_to_collection[key]
-class _EventKey(object):
+class _EventKey:
"""Represent :func:`.listen` arguments."""
__slots__ = (