Merge pull request #8485 from tk0miya/master

Fix flake8 warnings
This commit is contained in:
Takeshi KOMIYA
2020-11-25 01:49:28 +09:00
committed by GitHub
2 changed files with 2 additions and 7 deletions

View File

@@ -11,7 +11,7 @@
import importlib
import traceback
import warnings
from typing import Any, Callable, Dict, List, Mapping, NamedTuple, Optional, Tuple
from typing import Any, Callable, Dict, List, NamedTuple, Optional, Tuple
from sphinx.pycode import ModuleAnalyzer
from sphinx.util import logging
@@ -173,12 +173,6 @@ def _getmro(obj: Any) -> Tuple["Type", ...]:
return tuple()
def _getannotations(obj: Any) -> Mapping[str, Any]:
warnings.warn('sphinx.ext.autodoc.importer._getannotations() is deprecated.',
RemovedInSphinx40Warning)
return getannotations(obj)
def get_object_members(subject: Any, objpath: List[str], attrgetter: Callable,
analyzer: ModuleAnalyzer = None) -> Dict[str, Attribute]:
"""Get members and attributes of target object."""

View File

@@ -10,6 +10,7 @@
import re
import tokenize
import warnings
from collections import OrderedDict
from importlib import import_module
from inspect import Signature