From 088fca2f8e186d94df432b5b68ddce793d83924b Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 4 Jan 2020 13:33:06 +0100 Subject: [PATCH] Fix an issue with the is_big_annoying_library function, see #520 --- jedi/inference/helpers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jedi/inference/helpers.py b/jedi/inference/helpers.py index 607bb0c6..622f6051 100644 --- a/jedi/inference/helpers.py +++ b/jedi/inference/helpers.py @@ -265,5 +265,10 @@ def values_from_qualified_names(inference_state, *names): def is_big_annoying_library(context): string_names = context.get_root_context().string_names - # Pandas is huge, so just ignore it, because stuff makes everything slow. + if string_names is None: + return False + + # Especially pandas and tensorflow are huge complicated Python libraries + # that get even slower than they already are when Jedi tries to undrstand + # dynamic features like decorators, ifs and other stuff. return string_names[0] in ('pandas', 'numpy', 'tensorflow', 'matplotlib')