summaryrefslogtreecommitdiff
path: root/sphinx/websupport/storage/sqlalchemy_db.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2016-11-08 14:05:58 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2016-11-16 12:06:22 +0900
commitceec82451bfbefc0fd720bbf48e4b9a029cacd99 (patch)
tree1d76b5d59db131fb574cd649e0c283534fd6710f /sphinx/websupport/storage/sqlalchemy_db.py
parent3407ef0ca8a8ce41e67092d2605f8fc77bebb982 (diff)
downloadsphinx-git-ceec82451bfbefc0fd720bbf48e4b9a029cacd99.tar.gz
Add type-check annotations to sphinx.*
Diffstat (limited to 'sphinx/websupport/storage/sqlalchemy_db.py')
-rw-r--r--sphinx/websupport/storage/sqlalchemy_db.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/websupport/storage/sqlalchemy_db.py b/sphinx/websupport/storage/sqlalchemy_db.py
index b412ad488..16418ec8f 100644
--- a/sphinx/websupport/storage/sqlalchemy_db.py
+++ b/sphinx/websupport/storage/sqlalchemy_db.py
@@ -14,7 +14,7 @@ from datetime import datetime
from sqlalchemy import Column, Integer, Text, String, Boolean, \
ForeignKey, DateTime
-from sqlalchemy.orm import relation, sessionmaker, aliased
+from sqlalchemy.orm import relation, sessionmaker, aliased # type: ignore
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
@@ -23,7 +23,7 @@ Session = sessionmaker()
db_prefix = 'sphinx_'
-class Node(Base):
+class Node(Base): # type: ignore
"""Data about a Node in a doctree."""
__tablename__ = db_prefix + 'nodes'
@@ -74,7 +74,7 @@ class Node(Base):
:param results: the flat list of comments
:param username: the name of the user requesting the comments.
"""
- comments = []
+ comments = [] # type: List
list_stack = [comments]
for r in results:
if username:
@@ -101,7 +101,7 @@ class Node(Base):
self.source = source
-class CommentVote(Base):
+class CommentVote(Base): # type: ignore
"""A vote a user has made on a Comment."""
__tablename__ = db_prefix + 'commentvote'
@@ -117,7 +117,7 @@ class CommentVote(Base):
self.value = value
-class Comment(Base):
+class Comment(Base): # type: ignore
"""An individual Comment being stored."""
__tablename__ = db_prefix + 'comments'