summaryrefslogtreecommitdiff
path: root/sphinx/domains/cpp.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2023-03-18 14:53:23 +0000
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2023-03-18 14:59:20 +0000
commit2ee7d0f678324d8ea8e1400f6a3d376c9639bfc5 (patch)
treefd71d2b3ad3c2be7c6a28b420a481edb6999ed27 /sphinx/domains/cpp.py
parent17d4dfa7fb9a7db6376f4dbd2b4a7b5522bacb02 (diff)
downloadsphinx-git-2ee7d0f678324d8ea8e1400f6a3d376c9639bfc5.tar.gz
Resolve lint errors from Ruff 0.0.257
Diffstat (limited to 'sphinx/domains/cpp.py')
-rw-r--r--sphinx/domains/cpp.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py
index 04ffad118..5047f9b28 100644
--- a/sphinx/domains/cpp.py
+++ b/sphinx/domains/cpp.py
@@ -4501,7 +4501,7 @@ class Symbol:
nestedName: ASTNestedName,
templateDecls: list[Any],
onMissingQualifiedSymbol: Callable[
- [Symbol, ASTIdentifier | ASTOperator, Any, ASTTemplateArgs], Symbol,
+ [Symbol, ASTIdentifier | ASTOperator, Any, ASTTemplateArgs], Symbol | None,
],
strictTemplateParamArgLists: bool, ancestorLookupType: str,
templateShorthand: bool, matchSelf: bool,
@@ -4648,7 +4648,7 @@ class Symbol:
def onMissingQualifiedSymbol(parentSymbol: Symbol,
identOrOp: ASTIdentifier | ASTOperator,
templateParams: Any, templateArgs: ASTTemplateArgs,
- ) -> Symbol:
+ ) -> Symbol | None:
if Symbol.debug_lookup:
Symbol.debug_indent += 1
Symbol.debug_print("_add_symbols, onMissingQualifiedSymbol:")
@@ -5053,7 +5053,7 @@ class Symbol:
def onMissingQualifiedSymbol(parentSymbol: Symbol,
identOrOp: ASTIdentifier | ASTOperator,
templateParams: Any,
- templateArgs: ASTTemplateArgs) -> Symbol:
+ templateArgs: ASTTemplateArgs) -> Symbol | None:
# TODO: Maybe search without template args?
# Though, the correctPrimaryTemplateArgs does
# that for primary templates.
@@ -5061,7 +5061,7 @@ class Symbol:
if parentSymbol.declaration is not None:
if parentSymbol.declaration.objectType == 'templateParam':
raise QualifiedSymbolIsTemplateParam()
- return # type: ignore[return-value]
+ return None # NoQA: RET501,PLR1711
try:
lookupResult = self._symbol_lookup(nestedName, templateDecls,
@@ -5119,7 +5119,7 @@ class Symbol:
def onMissingQualifiedSymbol(parentSymbol: Symbol,
identOrOp: ASTIdentifier | ASTOperator,
templateParams: Any,
- templateArgs: ASTTemplateArgs) -> Symbol:
+ templateArgs: ASTTemplateArgs) -> Symbol | None:
return None
lookupResult = self._symbol_lookup(nestedName, templateDecls,