summaryrefslogtreecommitdiff
path: root/sphinx/jinja2glue.py
diff options
context:
space:
mode:
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):