summaryrefslogtreecommitdiff
path: root/sphinx/pycode
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/pycode')
-rw-r--r--sphinx/pycode/__init__.py2
-rw-r--r--sphinx/pycode/ast.py2
-rw-r--r--sphinx/pycode/parser.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py
index 9ffb607db..c899410bd 100644
--- a/sphinx/pycode/__init__.py
+++ b/sphinx/pycode/__init__.py
@@ -77,7 +77,7 @@ class ModuleAnalyzer:
return filename, None
@classmethod
- def for_string(cls, string: str, modname: str, srcname: str = '<string>'
+ def for_string(cls, string: str, modname: str, srcname: str = '<string>',
) -> ModuleAnalyzer:
return cls(string, modname, srcname)
diff --git a/sphinx/pycode/ast.py b/sphinx/pycode/ast.py
index 702006817..58c0fc056 100644
--- a/sphinx/pycode/ast.py
+++ b/sphinx/pycode/ast.py
@@ -35,7 +35,7 @@ def parse(code: str, mode: str = 'exec') -> ast.AST:
"""Parse the *code* using the built-in ast module."""
warnings.warn(
"'sphinx.pycode.ast.parse' is deprecated, use 'ast.parse' instead.",
- RemovedInSphinx70Warning, stacklevel=2
+ RemovedInSphinx70Warning, stacklevel=2,
)
try:
return ast.parse(code, mode=mode, type_comments=True)
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py
index 49ef4f7ff..cddb8bcf5 100644
--- a/sphinx/pycode/parser.py
+++ b/sphinx/pycode/parser.py
@@ -349,7 +349,7 @@ class VariableCommentPicker(ast.NodeVisitor):
try:
targets = get_assign_targets(node)
varnames: list[str] = sum(
- [get_lvar_names(t, self=self.get_self()) for t in targets], []
+ [get_lvar_names(t, self=self.get_self()) for t in targets], [],
)
current_line = self.get_line(node.lineno)
except TypeError: