Track removal of doc string from Module().nodes[0]
This commit is contained in:
parent
8548f9b183
commit
ec5bfd13ca
|
@ -15,19 +15,14 @@ def is_future(stmt):
|
||||||
|
|
||||||
class FutureParser:
|
class FutureParser:
|
||||||
|
|
||||||
features = ("nested_scopes",)
|
features = ("nested_scopes", "generators", "division")
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.found = {} # set
|
self.found = {} # set
|
||||||
|
|
||||||
def visitModule(self, node):
|
def visitModule(self, node):
|
||||||
if node.doc is None:
|
|
||||||
off = 0
|
|
||||||
else:
|
|
||||||
off = 1
|
|
||||||
|
|
||||||
stmt = node.node
|
stmt = node.node
|
||||||
for s in stmt.nodes[off:]:
|
for s in stmt.nodes:
|
||||||
if not self.check_stmt(s):
|
if not self.check_stmt(s):
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
|
@ -15,19 +15,14 @@ def is_future(stmt):
|
||||||
|
|
||||||
class FutureParser:
|
class FutureParser:
|
||||||
|
|
||||||
features = ("nested_scopes",)
|
features = ("nested_scopes", "generators", "division")
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.found = {} # set
|
self.found = {} # set
|
||||||
|
|
||||||
def visitModule(self, node):
|
def visitModule(self, node):
|
||||||
if node.doc is None:
|
|
||||||
off = 0
|
|
||||||
else:
|
|
||||||
off = 1
|
|
||||||
|
|
||||||
stmt = node.node
|
stmt = node.node
|
||||||
for s in stmt.nodes[off:]:
|
for s in stmt.nodes:
|
||||||
if not self.check_stmt(s):
|
if not self.check_stmt(s):
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue