diff --git a/jedi/builtin.py b/jedi/builtin.py index bd6de005..ca948aa3 100644 --- a/jedi/builtin.py +++ b/jedi/builtin.py @@ -30,6 +30,7 @@ def get_sys_path(): check_virtual_env(p) return p + class CachedModule(object): """ The base type for all modules, which is not to be confused with diff --git a/jedi/parsing.py b/jedi/parsing.py index 67871f8c..9c27673f 100644 --- a/jedi/parsing.py +++ b/jedi/parsing.py @@ -304,7 +304,6 @@ class Module(Scope): self._name = Name(names, self.start_pos, self.end_pos, self) return self._name - def is_builtin(self): return not (self.path is None or self.path.endswith('.py')) diff --git a/test/regression.py b/test/regression.py index 88949eaf..9022bf08 100755 --- a/test/regression.py +++ b/test/regression.py @@ -207,7 +207,7 @@ class TestRegression(Base): try: s = unicode("import datetime; datetime.d") except NameError: - pass # python 3 has no unicode method + pass # python 3 has no unicode method else: assert len(self.complete(s)) @@ -218,7 +218,7 @@ class TestRegression(Base): comment = utf8("# multi-byte comment あいうえお") s = (unicode('%s\n%s') % (code, comment)).encode('utf-8') except NameError: - pass # python 3 has no unicode method + pass # python 3 has no unicode method else: assert len(self.complete(s, (1, len(code)))) @@ -234,6 +234,7 @@ class TestFeature(Base): assert self.complete('import os; os.path.join')[0].full_name \ == 'os.path.join' + class TestSpeed(Base): def _check_speed(time_per_run, number=4, run_warm=True): """ Speed checks should typically be very tolerant. Some machines are