summaryrefslogtreecommitdiff
path: root/sphinx/websupport/storage/sqlalchemystorage.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-21 19:03:44 +0200
committerGeorg Brandl <georg@python.org>2010-08-21 19:03:44 +0200
commit6ffec123a92ffc903af7e60a776f222d6e01cee8 (patch)
tree092d6ac8d3f025676ebc2f9c412838bc03fc7fc4 /sphinx/websupport/storage/sqlalchemystorage.py
parent0ff840dc48023e8a3f2be9aef6f38e375e5a7911 (diff)
downloadsphinx-git-6ffec123a92ffc903af7e60a776f222d6e01cee8.tar.gz
Small code style changes, remove unused imports.
Diffstat (limited to 'sphinx/websupport/storage/sqlalchemystorage.py')
-rw-r--r--sphinx/websupport/storage/sqlalchemystorage.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/sphinx/websupport/storage/sqlalchemystorage.py b/sphinx/websupport/storage/sqlalchemystorage.py
index c775f3bb4..ba011c06d 100644
--- a/sphinx/websupport/storage/sqlalchemystorage.py
+++ b/sphinx/websupport/storage/sqlalchemystorage.py
@@ -14,16 +14,19 @@ from datetime import datetime
from sqlalchemy.orm import aliased
from sqlalchemy.sql import func
-from sphinx.websupport.errors import *
+from sphinx.websupport.errors import CommentNotAllowedError, \
+ UserNotAuthorizedError
from sphinx.websupport.storage import StorageBackend
-from sphinx.websupport.storage.db import Base, Node, Comment, CommentVote,\
- Session
+from sphinx.websupport.storage.db import Base, Node, Comment, \
+ CommentVote, Session
from sphinx.websupport.storage.differ import CombinedHtmlDiff
+
class SQLAlchemyStorage(StorageBackend):
- """A :class:`~sphinx.websupport.storage.StorageBackend` using
- SQLAlchemy.
"""
+ A :class:`.StorageBackend` using SQLAlchemy.
+ """
+
def __init__(self, engine):
self.engine = engine
Base.metadata.bind = engine
@@ -147,6 +150,7 @@ class SQLAlchemyStorage(StorageBackend):
def accept_comment(self, comment_id):
session = Session()
+ # XXX assignment to "comment" needed?
comment = session.query(Comment).filter(
Comment.id == comment_id).update(
{Comment.displayed: True})