forked from VimPlug/jedi
Correct issues with slices and some more subtle bugs.
This commit is contained in:
@@ -75,12 +75,12 @@ class LazyName(helpers.FakeName):
|
||||
except AttributeError:
|
||||
pass
|
||||
else:
|
||||
# cut the `c` from `.pyc`
|
||||
path = re.sub('c$', '', path)
|
||||
if path.endswith('.py'):
|
||||
# cut the `c` from `.pyc`
|
||||
with open(path) as f:
|
||||
source = source_to_unicode(f.read())
|
||||
mod = FastParser(load_grammar(), source, path[:-1]).module
|
||||
mod = FastParser(load_grammar(), source, path).module
|
||||
if parser_path:
|
||||
assert len(parser_path) == 1
|
||||
found = self._evaluator.find_types(mod, parser_path[0], search_global=True)
|
||||
@@ -88,7 +88,7 @@ class LazyName(helpers.FakeName):
|
||||
found = [self._evaluator.wrap(mod)]
|
||||
|
||||
if not found:
|
||||
debug.warning('Possibly an interpreter lookup for Python code failed %s',
|
||||
debug.warning('Interpreter lookup failed in global scope for %s',
|
||||
parser_path)
|
||||
|
||||
if not found:
|
||||
|
||||
Reference in New Issue
Block a user