1
0
forked from VimPlug/jedi

moved using setting.fast_parser to fast_parser

This commit is contained in:
David Halter
2012-12-18 01:50:10 +01:00
parent 2a8660b989
commit 74a51c87cb
4 changed files with 6 additions and 12 deletions

View File

@@ -138,6 +138,8 @@ class Module(parsing.Simple, parsing.Module):
class CachedFastParser(type):
""" This is a metaclass for caching `FastParser`. """
def __call__(self, code, module_path=None, user_position=None):
if not settings.fast_parser:
return parsing.PyFuzzyParser(code, module_path, user_position)
if module_path is None or module_path not in parser_cache:
p = super(CachedFastParser, self).__call__(code, module_path,
user_position)