mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-15 18:17:07 +08:00
fix import problems with negative kill_counts, fixes #111
This commit is contained in:
@@ -46,7 +46,7 @@ class ImportPath(parsing.Base):
|
|||||||
self.import_stmt = import_stmt
|
self.import_stmt = import_stmt
|
||||||
self.is_like_search = is_like_search
|
self.is_like_search = is_like_search
|
||||||
self.direct_resolve = direct_resolve
|
self.direct_resolve = direct_resolve
|
||||||
self.is_partial_import = bool(kill_count)
|
self.is_partial_import = bool(max(0, kill_count))
|
||||||
path = import_stmt.get_parent_until().path
|
path = import_stmt.get_parent_until().path
|
||||||
self.file_path = os.path.dirname(path) if path is not None else None
|
self.file_path = os.path.dirname(path) if path is not None else None
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ class TestRegression(TestBase):
|
|||||||
|
|
||||||
# 111
|
# 111
|
||||||
assert self.complete("from datetime import") == []
|
assert self.complete("from datetime import") == []
|
||||||
print self.complete("from datetime import ")
|
|
||||||
assert self.complete("from datetime import ")
|
assert self.complete("from datetime import ")
|
||||||
|
|
||||||
def test_get_in_function_call(self):
|
def test_get_in_function_call(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user