From 4fe5b6498c8d9f82f9f8aac4ea3b5de021ac3fd7 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Tue, 17 Mar 2020 18:48:59 +0100 Subject: [PATCH] Fix flake and mypy errors --- sphinx/domains/cpp.py | 2 +- sphinx/util/cfamily.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 551a395b0..740df225a 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -6983,7 +6983,7 @@ class CPPDomain(Domain): # the non-identifier refs are cross-references, which should be processed: # - fix parenthesis due to operator() and add_function_parentheses if typ != "identifier": - title = contnode.pop(0).astext() # type: ignore + title = contnode.pop(0).astext() # If it's operator(), we need to add '()' if explicit function parens # are requested. Then the Sphinx machinery will add another pair. # Also, if it's an 'any' ref that resolves to a function, we need to add diff --git a/sphinx/util/cfamily.py b/sphinx/util/cfamily.py index 72072084d..516221cf9 100644 --- a/sphinx/util/cfamily.py +++ b/sphinx/util/cfamily.py @@ -14,7 +14,9 @@ from copy import deepcopy from typing import ( Any, Callable, List, Match, Pattern, Tuple, Union ) + from docutils import nodes + from sphinx.deprecation import RemovedInSphinx40Warning from sphinx.util import logging