diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-10-20 13:33:44 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-10-20 13:33:44 +0900 |
commit | 0b719faabb640bf620d62d947b51166715d2477e (patch) | |
tree | 299d7d8365e83c4cd9c41a6db678eca0474947b9 /sphinx/util | |
parent | d000de6e9950de32f8a1c872232513d8196c0530 (diff) | |
download | sphinx-git-0b719faabb640bf620d62d947b51166715d2477e.tar.gz |
Fix mypy violations (for mypy-0.740)
Diffstat (limited to 'sphinx/util')
-rw-r--r-- | sphinx/util/docutils.py | 2 | ||||
-rw-r--r-- | sphinx/util/matching.py | 4 | ||||
-rw-r--r-- | sphinx/util/pycompat.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py index 0f732411c..e455d0aad 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -187,7 +187,7 @@ class sphinx_domains: def __enter__(self) -> None: self.enable() - def __exit__(self, exc_type: "Type[Exception]", exc_value: Exception, traceback: Any) -> bool: # NOQA + def __exit__(self, exc_type: "Type[Exception]", exc_value: Exception, traceback: Any) -> bool: # type: ignore # NOQA self.disable() return False diff --git a/sphinx/util/matching.py b/sphinx/util/matching.py index 97eeff40f..cd8e16e20 100644 --- a/sphinx/util/matching.py +++ b/sphinx/util/matching.py @@ -9,7 +9,7 @@ """ import re -from typing import Callable, Dict, List, Match, Pattern +from typing import Callable, Dict, Iterable, List, Match, Pattern from sphinx.util.osutil import canon_path @@ -96,7 +96,7 @@ def patmatch(name: str, pat: str) -> Match[str]: return _pat_cache[pat].match(name) -def patfilter(names: List[str], pat: str) -> List[str]: +def patfilter(names: Iterable[str], pat: str) -> List[str]: """Return the subset of the list NAMES that match PAT. Adapted from fnmatch module. diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py index 06d3bcc2c..18c44ad18 100644 --- a/sphinx/util/pycompat.py +++ b/sphinx/util/pycompat.py @@ -55,7 +55,7 @@ class UnicodeMixin: def __str__(self): warnings.warn('UnicodeMixin is deprecated', RemovedInSphinx40Warning, stacklevel=2) - return self.__unicode__() + return self.__unicode__() # type: ignore def execfile_(filepath: str, _globals: Any, open: Callable = open) -> None: |