From 576e53f771ca80c8b0b5a9febd3ba5405af4200b Mon Sep 17 00:00:00 2001 From: David Halter Date: Wed, 21 Nov 2012 16:49:01 +0100 Subject: [PATCH] a few pep8 improvements --- jedi/builtin.py | 1 + jedi/parsing.py | 1 - test/regression.py | 5 +++-- 3 files changed, 4 insertions(+), 3 deletions(-) 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