Skip to content

Commit

Permalink
Make sure decorators are also not inferred for big annoying libraries…
Browse files Browse the repository at this point in the history
…, see #520
  • Loading branch information
davidhalter committed Jan 4, 2020
1 parent e303854 commit 1813105
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jedi/inference/syntax_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
from jedi.inference.value import iterable
from jedi.inference.value.dynamic_arrays import ListModification, DictModification
from jedi.inference.value import TreeInstance
from jedi.inference.helpers import is_string, is_literal, is_number, get_names_of_node
from jedi.inference.helpers import is_string, is_literal, is_number, \
get_names_of_node, is_big_annoying_library
from jedi.inference.compiled.access import COMPARISON_OPERATORS
from jedi.inference.cache import inference_state_method_cache
from jedi.inference.gradual.stub_value import VersionInfo
Expand Down Expand Up @@ -750,6 +751,10 @@ def _apply_decorators(context, node):
else:
decoratee_value = FunctionValue.from_context(context, node)
initial = values = ValueSet([decoratee_value])

if is_big_annoying_library(context):
return values

for dec in reversed(node.get_decorators()):
debug.dbg('decorator: %s %s', dec, values, color="MAGENTA")
with debug.increase_indent_cm():
Expand Down

0 comments on commit 1813105

Please sign in to comment.