diff options
author | Ben Sturmfels <ben@sturm.com.au> | 2021-03-05 23:12:19 +1100 |
---|---|---|
committer | Ben Sturmfels <ben@sturm.com.au> | 2021-03-05 23:12:19 +1100 |
commit | dec47c7102cf0aa3a4debf002928db8e460c0d71 (patch) | |
tree | 47631fc15c7af172aa699506adf3d76d3a71976c /mediagoblin/db/base.py | |
parent | 5f3a782fef4855e10b7259624a14d8afb0f7be93 (diff) | |
download | mediagoblin-dec47c7102cf0aa3a4debf002928db8e460c0d71.tar.lz mediagoblin-dec47c7102cf0aa3a4debf002928db8e460c0d71.tar.xz mediagoblin-dec47c7102cf0aa3a4debf002928db8e460c0d71.zip |
Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.
Diffstat (limited to 'mediagoblin/db/base.py')
-rw-r--r-- | mediagoblin/db/base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/db/base.py b/mediagoblin/db/base.py index c59b0ebf..d2595ce2 100644 --- a/mediagoblin/db/base.py +++ b/mediagoblin/db/base.py @@ -25,7 +25,7 @@ if not DISABLE_GLOBALS: from sqlalchemy.orm import scoped_session, sessionmaker Session = scoped_session(sessionmaker()) -class FakeCursor(object): +class FakeCursor: def __init__ (self, cursor, mapper, filter=None): self.cursor = cursor @@ -50,7 +50,7 @@ class FakeCursor(object): r = self.cursor.slice(*args, **kwargs) return list(six.moves.filter(self.filter, six.moves.map(self.mapper, r))) -class GMGTableBase(object): +class GMGTableBase: # Deletion types HARD_DELETE = "hard-deletion" SOFT_DELETE = "soft-deletion" @@ -194,7 +194,7 @@ class GMGTableBase(object): Base = declarative_base(cls=GMGTableBase) -class DictReadAttrProxy(object): +class DictReadAttrProxy: """ Maps read accesses to obj['key'] to obj.key and hides all the rest of the obj |