mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
ParamDefinition -> ParamName
This commit is contained in:
@@ -95,7 +95,7 @@ New APIs:
|
|||||||
- ``Name.get_signatures() -> List[Signature]``. Signatures are similar to
|
- ``Name.get_signatures() -> List[Signature]``. Signatures are similar to
|
||||||
``CallSignature``. ``Name.params`` is therefore deprecated.
|
``CallSignature``. ``Name.params`` is therefore deprecated.
|
||||||
- ``Signature.to_string()`` to format signatures.
|
- ``Signature.to_string()`` to format signatures.
|
||||||
- ``Signature.params -> List[ParamDefinition]``, ParamDefinition has the
|
- ``Signature.params -> List[ParamName]``, ParamName has the
|
||||||
following additional attributes ``infer_default()``, ``infer_annotation()``,
|
following additional attributes ``infer_default()``, ``infer_annotation()``,
|
||||||
``to_string()``, and ``kind``.
|
``to_string()``, and ``kind``.
|
||||||
- ``Name.execute() -> List[Name]``, makes it possible to infer
|
- ``Name.execute() -> List[Name]``, makes it possible to infer
|
||||||
|
|||||||
@@ -787,9 +787,9 @@ class BaseSignature(Name):
|
|||||||
Returns definitions for all parameters that a signature defines.
|
Returns definitions for all parameters that a signature defines.
|
||||||
This includes stuff like ``*args`` and ``**kwargs``.
|
This includes stuff like ``*args`` and ``**kwargs``.
|
||||||
|
|
||||||
:rtype: list of :class:`ParamDefinition`
|
:rtype: list of :class:`ParamName`
|
||||||
"""
|
"""
|
||||||
return [ParamDefinition(self._inference_state, n)
|
return [ParamName(self._inference_state, n)
|
||||||
for n in self._signature.get_param_names(resolve_stars=True)]
|
for n in self._signature.get_param_names(resolve_stars=True)]
|
||||||
|
|
||||||
def to_string(self):
|
def to_string(self):
|
||||||
@@ -842,7 +842,7 @@ class Signature(BaseSignature):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class ParamDefinition(Name):
|
class ParamName(Name):
|
||||||
def infer_default(self):
|
def infer_default(self):
|
||||||
"""
|
"""
|
||||||
Returns default values like the ``1`` of ``def foo(x=1):``.
|
Returns default values like the ``1`` of ``def foo(x=1):``.
|
||||||
|
|||||||
Reference in New Issue
Block a user