File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change 48
48
49
49
from astroid import nodes
50
50
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
52
52
from astroid .manager import AstroidManager
53
53
from astroid .nodes import NodeNG
54
54
@@ -106,11 +106,7 @@ def __init__(
106
106
107
107
def _get_doc (self , node : T_Doc ) -> Tuple [T_Doc , Optional [str ]]:
108
108
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
112
109
if node .body and isinstance (node .body [0 ], self ._module .Expr ):
113
-
114
110
first_value = node .body [0 ].value
115
111
if isinstance (first_value , self ._module .Str ) or (
116
112
PY38_PLUS
You can’t perform that action at this time.
0 commit comments