mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 05:54:25 +08:00
Add a few docstrings to make some things clearer
This commit is contained in:
@@ -621,6 +621,9 @@ class Signature(Definition):
|
||||
|
||||
@property
|
||||
def params(self):
|
||||
"""
|
||||
:return list of ParamDefinition:
|
||||
"""
|
||||
return [ParamDefinition(self._evaluator, n)
|
||||
for n in self._signature.get_param_names(resolve_stars=True)]
|
||||
|
||||
@@ -668,10 +671,15 @@ class CallSignature(Signature):
|
||||
|
||||
class ParamDefinition(Definition):
|
||||
def infer_default(self):
|
||||
"""
|
||||
:return list of Definition:
|
||||
"""
|
||||
return _contexts_to_definitions(self._name.infer_default())
|
||||
|
||||
def infer_annotation(self, **kwargs):
|
||||
"""
|
||||
:return list of Definition:
|
||||
|
||||
:param execute_annotation: If False, the values are not executed and
|
||||
you get classes instead of instances.
|
||||
"""
|
||||
|
||||
@@ -315,7 +315,8 @@ def test_signature_is_definition(Script):
|
||||
|
||||
# Now compare all the attributes that a CallSignature must also have.
|
||||
for attr_name in dir(definition):
|
||||
dont_scan = ['defined_names', 'parent', 'goto_assignments', 'infer', 'params']
|
||||
dont_scan = ['defined_names', 'parent', 'goto_assignments', 'infer',
|
||||
'params', 'get_signatures']
|
||||
if attr_name.startswith('_') or attr_name in dont_scan:
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user