formatting / pep8

This commit is contained in:
David Halter
2012-04-25 00:07:05 +02:00
parent c78d05fa12
commit a1cf284297
2 changed files with 14 additions and 4 deletions

View File

@@ -5,7 +5,8 @@ follow_statement -> follow_call -> follow_paths -> follow_path
`get_names_for_scope` and `get_scopes_for_name` are search functions
TODO include super classes
TOOD nonlocal statement
TODO nonlocal statement
TODO doc
"""
from _compatibility import next
@@ -523,6 +524,9 @@ def follow_import(_import):
def remove_star_imports(scope):
"""
TODO doc
"""
modules = strip_imports(i for i in scope.get_imports() if i.star)
new = []
for m in modules:

View File

@@ -431,6 +431,7 @@ class Flow(Scope):
next.parent = self.parent
return next
class ForFlow(Flow):
"""
Used for the for loop, because there are two statement parts.
@@ -440,6 +441,7 @@ class ForFlow(Flow):
set_stmt.used_vars)
self.set_stmt = set_stmt
class Import(Simple):
"""
Stores the imports of any Scopes.
@@ -705,6 +707,9 @@ class Param(Statement):
class Call(object):
"""
TODO doc
"""
NAME = object()
NUMBER = object()
STRING = object()
@@ -853,6 +858,10 @@ class Array(Call):
class NamePart(str):
"""
A string. Sometimes it is important to know if the string belongs to a name
or not.
"""
pass
@@ -1406,7 +1415,4 @@ class PyFuzzyParser(object):
debug.warning('indentation error on line %s, ignoring it' %
(self.line_nr))
self.gen = tokenize.generate_tokens(buf.readline)
#except:
# debug.dbg("parse error: %s, %s @ %s" %
# (sys.exc_info()[0], sys.exc_info()[1], self.parserline))
return self.top