We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4364218 commit 1b3e7f1Copy full SHA for 1b3e7f1
astroid/rebuilder.py
@@ -27,9 +27,9 @@
27
28
T_Doc = TypeVar(
29
"T_Doc",
30
- "ast.Module",
31
- "ast.ClassDef",
32
- "ast.FunctionDef" | "ast.AsyncFunctionDef",
+ ast.Module,
+ ast.ClassDef,
+ ast.FunctionDef | ast.AsyncFunctionDef,
33
)
34
_FunctionT = TypeVar("_FunctionT", nodes.FunctionDef, nodes.AsyncFunctionDef)
35
_ForT = TypeVar("_ForT", nodes.For, nodes.AsyncFor)
@@ -72,7 +72,7 @@ def __init__(
72
else:
73
self._parser_module = parser_module
74
75
- def _get_doc(self, node: T_Doc) -> tuple[T_Doc, ast.Constant | ast.Str | None]:
+ def _get_doc(self, node: T_Doc) -> tuple[T_Doc, ast.Constant | None]:
76
"""Return the doc ast node."""
77
try:
78
if node.body and isinstance(node.body[0], ast.Expr):
0 commit comments