summaryrefslogtreecommitdiff
path: root/mailman/database
diff options
context:
space:
mode:
authorBarry Warsaw2009-01-04 19:41:05 -0500
committerBarry Warsaw2009-01-04 19:41:05 -0500
commitf6d998b93b0dd8978eadc9abc4c3964e3fe66bf7 (patch)
treefc64f36b862ae61965e8d23fd00e56dcac1a5ee3 /mailman/database
parent706c3853103f53955068cc429c0bd6d1f8fb6dd0 (diff)
downloadmailman-f6d998b93b0dd8978eadc9abc4c3964e3fe66bf7.tar.gz
mailman-f6d998b93b0dd8978eadc9abc4c3964e3fe66bf7.tar.zst
mailman-f6d998b93b0dd8978eadc9abc4c3964e3fe66bf7.zip
Picking some (py)lint.
Diffstat (limited to 'mailman/database')
-rw-r--r--mailman/database/member.py7
-rw-r--r--mailman/database/message.py6
-rw-r--r--mailman/database/model.py2
-rw-r--r--mailman/database/pending.py9
-rw-r--r--mailman/database/requests.py1
-rw-r--r--mailman/database/roster.py1
-rw-r--r--mailman/database/types.py2
-rw-r--r--mailman/database/user.py6
-rw-r--r--mailman/database/usermanager.py5
-rw-r--r--mailman/database/version.py6
10 files changed, 37 insertions, 8 deletions
diff --git a/mailman/database/member.py b/mailman/database/member.py
index a8deb3171..66d215e4d 100644
--- a/mailman/database/member.py
+++ b/mailman/database/member.py
@@ -15,16 +15,19 @@
# You should have received a copy of the GNU General Public License along with
# GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
+__metaclass__ = type
+__all__ = [
+ 'Member',
+ ]
+
from storm.locals import *
from zope.interface import implements
-from mailman.Utils import split_listname
from mailman.config import config
from mailman.constants import SystemDefaultPreferences
from mailman.database.model import Model
from mailman.database.types import Enum
from mailman.interfaces.member import IMember
-from mailman.interfaces.preferences import IPreferences
diff --git a/mailman/database/message.py b/mailman/database/message.py
index f74de3c55..c7ec6bcf6 100644
--- a/mailman/database/message.py
+++ b/mailman/database/message.py
@@ -15,6 +15,11 @@
# You should have received a copy of the GNU General Public License along with
# GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
+__metaclass__ = type
+__all__ = [
+ 'Message',
+ ]
+
from storm.locals import *
from zope.interface import implements
@@ -36,6 +41,7 @@ class Message(Model):
# This is a Messge-ID field representation, not a database row id.
def __init__(self, message_id, message_id_hash, path):
+ super(Message, self).__init__()
self.message_id = message_id
self.message_id_hash = message_id_hash
self.path = path
diff --git a/mailman/database/model.py b/mailman/database/model.py
index 598f537e8..9a83002bd 100644
--- a/mailman/database/model.py
+++ b/mailman/database/model.py
@@ -49,6 +49,6 @@ class ModelMeta(PropertyPublisherMeta):
-class Model(object):
+class Model:
"""Like Storm's `Storm` subclass, but with a bit extra."""
__metaclass__ = ModelMeta
diff --git a/mailman/database/pending.py b/mailman/database/pending.py
index 9b7094b8b..07e594253 100644
--- a/mailman/database/pending.py
+++ b/mailman/database/pending.py
@@ -17,6 +17,12 @@
"""Implementations of the IPendable and IPending interfaces."""
+__metaclass__ = type
+__all__ = [
+ 'Pended',
+ 'Pendings',
+ ]
+
import sys
import time
import random
@@ -56,6 +62,7 @@ class Pended(Model):
implements(IPended)
def __init__(self, token, expiration_date):
+ super(Pended, self).__init__()
self.token = token
self.expiration_date = expiration_date
@@ -71,7 +78,7 @@ class UnpendedPendable(dict):
-class Pendings(object):
+class Pendings:
"""Implementation of the IPending interface."""
implements(IPendings)
diff --git a/mailman/database/requests.py b/mailman/database/requests.py
index 6e9828cf9..812c5a0ab 100644
--- a/mailman/database/requests.py
+++ b/mailman/database/requests.py
@@ -129,6 +129,7 @@ class _Request(Model):
mailing_list = Reference(mailing_list_id, 'MailingList.id')
def __init__(self, key, request_type, mailing_list, data_hash):
+ super(_Request, self).__init__()
self.key = key
self.request_type = request_type
self.mailing_list = mailing_list
diff --git a/mailman/database/roster.py b/mailman/database/roster.py
index d0759e176..fcebfb7f0 100644
--- a/mailman/database/roster.py
+++ b/mailman/database/roster.py
@@ -39,7 +39,6 @@ from storm.locals import *
from zope.interface import implements
from mailman.config import config
-from mailman.constants import SystemDefaultPreferences
from mailman.database.address import Address
from mailman.database.member import Member
from mailman.interfaces.member import DeliveryMode, MemberRole
diff --git a/mailman/database/types.py b/mailman/database/types.py
index 26bdb0aff..17719c941 100644
--- a/mailman/database/types.py
+++ b/mailman/database/types.py
@@ -23,7 +23,7 @@ __all__ = [
import sys
from storm.properties import SimpleProperty
-from storm.variables import UnicodeVariable, Variable
+from storm.variables import Variable
diff --git a/mailman/database/user.py b/mailman/database/user.py
index 1e2a7085d..ec428f0a2 100644
--- a/mailman/database/user.py
+++ b/mailman/database/user.py
@@ -15,7 +15,11 @@
# You should have received a copy of the GNU General Public License along with
# GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
-from email.utils import formataddr
+__metaclass__ = type
+__all__ = [
+ 'User',
+ ]
+
from storm.locals import *
from zope.interface import implements
diff --git a/mailman/database/usermanager.py b/mailman/database/usermanager.py
index ea628c835..c30c40d12 100644
--- a/mailman/database/usermanager.py
+++ b/mailman/database/usermanager.py
@@ -17,7 +17,10 @@
"""A user manager."""
-import os
+__metaclass__ = type
+__all__ = [
+ 'UserManager',
+ ]
from zope.interface import implements
diff --git a/mailman/database/version.py b/mailman/database/version.py
index 83e50b821..519c5438c 100644
--- a/mailman/database/version.py
+++ b/mailman/database/version.py
@@ -15,6 +15,11 @@
# You should have received a copy of the GNU General Public License along with
# GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
+__metaclass__ = type
+__all__ = [
+ 'Version',
+ ]
+
from storm.locals import *
from mailman.database.model import Model
@@ -26,5 +31,6 @@ class Version(Model):
version = Int()
def __init__(self, component, version):
+ super(Version, self).__init__()
self.component = component
self.version = version