mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 23:04:48 +08:00
formatting / pep8
This commit is contained in:
@@ -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:
|
||||
|
||||
12
parsing.py
12
parsing.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user