Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-01-22 16:05:38 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-02-04 09:14:51 +0300
commitdc2b153835af985c1bd940aa4116b78bf248b6e0 (patch)
tree29383d6007d2f13c517ae4646e639362017aa9d4 /sphinx/jinja2glue.py
parent498fa379efe5b6b106c8d3eb56041164cdc8bab3 (diff)
Update type annotations
Diffstat (limited to 'sphinx/jinja2glue.py')
-rw-r--r--sphinx/jinja2glue.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/jinja2glue.py b/sphinx/jinja2glue.py
index cc935d577..24dd0e0fd 100644
--- a/sphinx/jinja2glue.py
+++ b/sphinx/jinja2glue.py
@@ -24,7 +24,7 @@ from sphinx.util.osutil import mtimes_of_files
if False:
# For type annotation
- from typing import Any, Callable, Dict, List, Iterator, Tuple # NOQA
+ from typing import Any, Callable, Dict, List, Iterator, Tuple, Union # NOQA
from jinja2.environment import Environment # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.theming import Theme # NOQA
@@ -46,7 +46,7 @@ def _toint(val):
def _todim(val):
- # type (int or unicode) -> unicode
+ # type: (Union[int, unicode]) -> unicode
"""
Make val a css dimension. In particular the following transformations
are performed:
@@ -61,7 +61,7 @@ def _todim(val):
return 'initial'
elif str(val).isdigit():
return '0' if int(val) == 0 else '%spx' % val
- return val
+ return val # type: ignore
def _slice_index(values, slices):