Skip to content

Commit 5959216

Browse files
authored
remove checking of node.docstring (#704)
this was only present during a brief period of 3.7 pre-release
1 parent 405a090 commit 5959216

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

pyflakes/checker.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,19 +1439,7 @@ def handleNode(self, node, parent):
14391439

14401440
def handleDoctests(self, node):
14411441
try:
1442-
if hasattr(node, 'docstring'):
1443-
docstring = node.docstring
1444-
1445-
# This is just a reasonable guess. In Python 3.7, docstrings no
1446-
# longer have line numbers associated with them. This will be
1447-
# incorrect if there are empty lines between the beginning
1448-
# of the function and the docstring.
1449-
node_lineno = node.lineno
1450-
if hasattr(node, 'args'):
1451-
node_lineno = max([node_lineno] +
1452-
[arg.lineno for arg in node.args.args])
1453-
else:
1454-
(docstring, node_lineno) = self.getDocstring(node.body[0])
1442+
(docstring, node_lineno) = self.getDocstring(node.body[0])
14551443
examples = docstring and self._getDoctestExamples(docstring)
14561444
except (ValueError, IndexError):
14571445
# e.g. line 6 of the docstring for <string> has inconsistent

0 commit comments

Comments
 (0)