mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 07:14: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
|
`get_names_for_scope` and `get_scopes_for_name` are search functions
|
||||||
|
|
||||||
TODO include super classes
|
TODO include super classes
|
||||||
TOOD nonlocal statement
|
TODO nonlocal statement
|
||||||
|
TODO doc
|
||||||
"""
|
"""
|
||||||
from _compatibility import next
|
from _compatibility import next
|
||||||
|
|
||||||
@@ -523,6 +524,9 @@ def follow_import(_import):
|
|||||||
|
|
||||||
|
|
||||||
def remove_star_imports(scope):
|
def remove_star_imports(scope):
|
||||||
|
"""
|
||||||
|
TODO doc
|
||||||
|
"""
|
||||||
modules = strip_imports(i for i in scope.get_imports() if i.star)
|
modules = strip_imports(i for i in scope.get_imports() if i.star)
|
||||||
new = []
|
new = []
|
||||||
for m in modules:
|
for m in modules:
|
||||||
|
|||||||
12
parsing.py
12
parsing.py
@@ -431,6 +431,7 @@ class Flow(Scope):
|
|||||||
next.parent = self.parent
|
next.parent = self.parent
|
||||||
return next
|
return next
|
||||||
|
|
||||||
|
|
||||||
class ForFlow(Flow):
|
class ForFlow(Flow):
|
||||||
"""
|
"""
|
||||||
Used for the for loop, because there are two statement parts.
|
Used for the for loop, because there are two statement parts.
|
||||||
@@ -440,6 +441,7 @@ class ForFlow(Flow):
|
|||||||
set_stmt.used_vars)
|
set_stmt.used_vars)
|
||||||
self.set_stmt = set_stmt
|
self.set_stmt = set_stmt
|
||||||
|
|
||||||
|
|
||||||
class Import(Simple):
|
class Import(Simple):
|
||||||
"""
|
"""
|
||||||
Stores the imports of any Scopes.
|
Stores the imports of any Scopes.
|
||||||
@@ -705,6 +707,9 @@ class Param(Statement):
|
|||||||
|
|
||||||
|
|
||||||
class Call(object):
|
class Call(object):
|
||||||
|
"""
|
||||||
|
TODO doc
|
||||||
|
"""
|
||||||
NAME = object()
|
NAME = object()
|
||||||
NUMBER = object()
|
NUMBER = object()
|
||||||
STRING = object()
|
STRING = object()
|
||||||
@@ -853,6 +858,10 @@ class Array(Call):
|
|||||||
|
|
||||||
|
|
||||||
class NamePart(str):
|
class NamePart(str):
|
||||||
|
"""
|
||||||
|
A string. Sometimes it is important to know if the string belongs to a name
|
||||||
|
or not.
|
||||||
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@@ -1406,7 +1415,4 @@ class PyFuzzyParser(object):
|
|||||||
debug.warning('indentation error on line %s, ignoring it' %
|
debug.warning('indentation error on line %s, ignoring it' %
|
||||||
(self.line_nr))
|
(self.line_nr))
|
||||||
self.gen = tokenize.generate_tokens(buf.readline)
|
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
|
return self.top
|
||||||
|
|||||||
Reference in New Issue
Block a user