Skip to content

Commit e840a7c

Browse files
authored
Remove unused code - TreeRebuilder docstring (#1289)
1 parent c28bf74 commit e840a7c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

astroid/rebuilder.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
from astroid import nodes
5050
from astroid._ast import ParserModule, get_parser_module, parse_function_type_comment
51-
from astroid.const import PY37_PLUS, PY38, PY38_PLUS, Context
51+
from astroid.const import PY38, PY38_PLUS, Context
5252
from astroid.manager import AstroidManager
5353
from astroid.nodes import NodeNG
5454

@@ -106,11 +106,7 @@ def __init__(
106106

107107
def _get_doc(self, node: T_Doc) -> Tuple[T_Doc, Optional[str]]:
108108
try:
109-
if PY37_PLUS and hasattr(node, "docstring"):
110-
doc = node.docstring # type: ignore[union-attr,attr-defined] # mypy doesn't recognize hasattr
111-
return node, doc
112109
if node.body and isinstance(node.body[0], self._module.Expr):
113-
114110
first_value = node.body[0].value
115111
if isinstance(first_value, self._module.Str) or (
116112
PY38_PLUS

0 commit comments

Comments
 (0)