mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-15 00:16:44 +08:00
Ignore processing param names, fixes #520
This commit is contained in:
@@ -24,7 +24,7 @@ from jedi.inference.cache import inference_state_method_cache
|
||||
from jedi.inference import imports
|
||||
from jedi.inference.arguments import TreeArguments
|
||||
from jedi.inference.param import get_executed_param_names
|
||||
from jedi.inference.helpers import is_stdlib_path, is_big_annoying_library
|
||||
from jedi.inference.helpers import is_stdlib_path
|
||||
from jedi.inference.utils import to_list
|
||||
from jedi.inference.value import instance
|
||||
from jedi.inference.base_value import ValueSet, NO_VALUES
|
||||
@@ -67,9 +67,6 @@ def dynamic_param_lookup(function_value, param_index):
|
||||
have to look for all calls to ``func`` to find out what ``foo`` possibly
|
||||
is.
|
||||
"""
|
||||
if is_big_annoying_library(function_value.parent_context):
|
||||
return NO_VALUES
|
||||
|
||||
funcdef = function_value.tree_node
|
||||
|
||||
if not settings.dynamic_params:
|
||||
|
||||
@@ -14,6 +14,7 @@ The signature here for bar should be `bar(b, c)` instead of bar(*args).
|
||||
from jedi._compatibility import Parameter
|
||||
from jedi.inference.utils import to_list
|
||||
from jedi.inference.names import ParamNameWrapper
|
||||
from jedi.inference.helpers import is_big_annoying_library
|
||||
|
||||
|
||||
def _iter_nodes_for_param(param_name):
|
||||
@@ -93,6 +94,14 @@ def _remove_given_params(arguments, param_names):
|
||||
|
||||
@to_list
|
||||
def process_params(param_names, star_count=3): # default means both * and **
|
||||
if param_names:
|
||||
if is_big_annoying_library(param_names[0].parent_context):
|
||||
# At first this feature can look innocent, but it does a lot of
|
||||
# type inference in some cases, so we just ditch it.
|
||||
for p in param_names:
|
||||
yield p
|
||||
return
|
||||
|
||||
used_names = set()
|
||||
arg_callables = []
|
||||
kwarg_callables = []
|
||||
|
||||
Reference in New Issue
Block a user