From 62d94729ab8060a67ac87e4976e608cdb1fa71da Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 3 Oct 2020 14:10:21 +0900 Subject: [PATCH] Fix missing module: warnings --- sphinx/builders/latex/__init__.py | 1 + sphinx/ext/autodoc/__init__.py | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sphinx/builders/latex/__init__.py b/sphinx/builders/latex/__init__.py index 73d85d269..34518c42d 100644 --- a/sphinx/builders/latex/__init__.py +++ b/sphinx/builders/latex/__init__.py @@ -9,6 +9,7 @@ """ import os +import warnings from os import path from typing import Any, Dict, Iterable, List, Tuple, Union diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py index f850ad1de..9325c0f4c 100644 --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -1616,9 +1616,6 @@ class DataDocumenter(ModuleLevelDocumenter): except KeyError: # a broken class found (refs: https://github.com/sphinx-doc/sphinx/issues/8084) annotations = {} - except AttributeError: - # AttributeError is raised on 3.5.2 (fixed by 3.5.3) - annotations = {} if self.objpath[-1] in annotations: objrepr = stringify_typehint(annotations.get(self.objpath[-1])) @@ -1995,9 +1992,6 @@ class AttributeDocumenter(DocstringStripSignatureMixin, ClassLevelDocumenter): except KeyError: # a broken class found (refs: https://github.com/sphinx-doc/sphinx/issues/8084) annotations = {} - except AttributeError: - # AttributeError is raised on 3.5.2 (fixed by 3.5.3) - annotations = {} if self.objpath[-1] in annotations: objrepr = stringify_typehint(annotations.get(self.objpath[-1]))