forked from VimPlug/jedi
cleanup
This commit is contained in:
@@ -93,6 +93,7 @@ else:
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
|
||||
class Python3Method(object):
|
||||
def __init__(self, func):
|
||||
self.func = func
|
||||
@@ -109,6 +110,7 @@ try:
|
||||
except ImportError:
|
||||
reduce = reduce
|
||||
|
||||
|
||||
def use_metaclass(meta, *bases):
|
||||
""" Create a class with a metaclass. """
|
||||
if not bases:
|
||||
@@ -120,6 +122,7 @@ try:
|
||||
except ImportError:
|
||||
# python 2.5 doesn't have this method
|
||||
import string
|
||||
|
||||
def cleandoc(doc):
|
||||
"""Clean up indentation from docstrings.
|
||||
|
||||
@@ -141,7 +144,8 @@ except ImportError:
|
||||
if lines:
|
||||
lines[0] = lines[0].lstrip()
|
||||
if margin < sys.maxint:
|
||||
for i in range(1, len(lines)): lines[i] = lines[i][margin:]
|
||||
for i in range(1, len(lines)):
|
||||
lines[i] = lines[i][margin:]
|
||||
# Remove any trailing or leading blank lines.
|
||||
while lines and not lines[-1]:
|
||||
lines.pop()
|
||||
|
||||
@@ -1030,8 +1030,6 @@ def get_scopes_for_name(scope, name_str, position=None, search_global=False):
|
||||
"""
|
||||
result = []
|
||||
no_break_scope = False
|
||||
#if isinstance(scope, InstanceElement) and scope.var == name.parent().parent():
|
||||
#name = InstanceElement(scope.instance, name)
|
||||
par = name.parent()
|
||||
|
||||
if par.isinstance(parsing.Flow):
|
||||
|
||||
@@ -92,7 +92,8 @@ class ExecutionRecursionDecorator(object):
|
||||
self.reset()
|
||||
|
||||
def __call__(self, execution, evaluate_generator=False):
|
||||
#print execution, self.recursion_level, self.execution_count, len(self.execution_funcs), a
|
||||
debug.dbg('Execution recursions: ', execution, self.recursion_level,
|
||||
self.execution_count, len(self.execution_funcs))
|
||||
if self.check_recursion(execution, evaluate_generator):
|
||||
result = []
|
||||
else:
|
||||
|
||||
@@ -30,7 +30,6 @@ class TestRegression(unittest.TestCase):
|
||||
"A.different_line"
|
||||
)
|
||||
|
||||
|
||||
in_name = 2, 9
|
||||
under_score = 2, 8
|
||||
cls = 2, 7
|
||||
|
||||
@@ -7,7 +7,7 @@ import traceback
|
||||
os.chdir(os.path.dirname(os.path.abspath(__file__)) + '/..')
|
||||
sys.path.append('.')
|
||||
|
||||
from _compatibility import unicode, BytesIO, reduce, literal_eval
|
||||
from _compatibility import unicode, BytesIO, reduce, literal_eval, is_py25
|
||||
|
||||
import functions
|
||||
import debug
|
||||
@@ -185,8 +185,7 @@ def test_dir(completion_test_dir, thirdparty=False):
|
||||
if f_name.endswith(".py") and (not test_files or files_to_execute):
|
||||
# for python2.5 certain tests are not being done, because it
|
||||
# only has these features partially.
|
||||
if sys.hexversion < 0x02060000 \
|
||||
and f_name in ['generators.py', 'types.py']:
|
||||
if is_py25 and f_name in ['generators.py', 'types.py']:
|
||||
continue
|
||||
|
||||
if thirdparty:
|
||||
|
||||
Reference in New Issue
Block a user