summaryrefslogtreecommitdiff
path: root/sphinx/theming.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-03-03 12:19:09 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-03-03 23:17:34 +0900
commit554199d30e418f72f215fae65924b47249d2544c (patch)
treefd952e21a8f4e9dabf91c5e3731dea3712ade006 /sphinx/theming.py
parent28b1aceefedbb9c3a12d6ba7c712df8ad5e98db8 (diff)
downloadsphinx-git-554199d30e418f72f215fae65924b47249d2544c.tar.gz
Upgrade to mypy-0.5
Diffstat (limited to 'sphinx/theming.py')
-rw-r--r--sphinx/theming.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/sphinx/theming.py b/sphinx/theming.py
index ec7867b3b..1e1087620 100644
--- a/sphinx/theming.py
+++ b/sphinx/theming.py
@@ -16,8 +16,7 @@ import tempfile
from os import path
from six import string_types, iteritems
-from six.moves import configparser # type: ignore
-from typing import Any, Callable, Tuple # NOQA
+from six.moves import configparser
try:
import pkg_resources
@@ -32,7 +31,7 @@ logger = logging.getLogger(__name__)
if False:
# For type annotation
- from typing import Any, Callable, Tuple # NOQA
+ from typing import Any, Callable, Dict, List, Tuple # NOQA
NODEFAULT = object()
THEMECONF = 'theme.conf'
@@ -148,7 +147,7 @@ class Theme(object):
fp.write(tinfo.read(name))
self.themeconf = configparser.RawConfigParser()
- self.themeconf.read(path.join(self.themedir, THEMECONF))
+ self.themeconf.read(path.join(self.themedir, THEMECONF)) # type: ignore
try:
inherit = self.themeconf.get('theme', 'inherit')
@@ -172,7 +171,7 @@ class Theme(object):
base theme chain.
"""
try:
- return self.themeconf.get(section, name)
+ return self.themeconf.get(section, name) # type: ignore
except (configparser.NoOptionError, configparser.NoSectionError):
if self.base is not None:
return self.base.get_confstr(section, name, default)
@@ -245,7 +244,7 @@ def load_theme_plugins():
path = func_or_path
if isinstance(path, string_types):
- theme_paths.append(path) # type: ignore
+ theme_paths.append(path)
else:
raise ThemeError('Plugin %r does not response correctly.' %
plugin.module_name)