From 7c8576d1a247ab44b45e967c0ad74623a26046ea Mon Sep 17 00:00:00 2001 From: Ben Krikler Date: Sun, 21 Apr 2019 00:40:17 +0200 Subject: [PATCH] Add type expression to new function --- sphinx/ext/viewcode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sphinx/ext/viewcode.py b/sphinx/ext/viewcode.py index 7474fc295b0..aa6baa0c8cd 100644 --- a/sphinx/ext/viewcode.py +++ b/sphinx/ext/viewcode.py @@ -21,7 +21,7 @@ if False: # For type annotation - from typing import Any, Dict, Iterable, Iterator, Set, Tuple # NOQA + from typing import Any, Dict, Iterable, Iterator, Set, Tuple, List # NOQA from sphinx.application import Sphinx # NOQA from sphinx.config import Config # NOQA from sphinx.environment import BuildEnvironment # NOQA @@ -142,6 +142,7 @@ def missing_reference(app, env, node, contnode): def split_code_lines(lines): + # type: (List[str]) -> Tuple[List[str], List[str], List[str]] end_header_string = 'td class="code">' header = [] for i, line in enumerate(lines):