MCPcopy Index your code
hub / github.com/prompt-toolkit/ptpython / Parameter

Class Parameter

src/ptpython/signatures.py:27–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26
27class Parameter:
28 def __init__(
29 self,
30 name: str,
31 annotation: str | None,
32 default: str | None,
33 kind: ParameterKind,
34 ) -> None:
35 self.name = name
36 self.kind = kind
37
38 self.annotation = annotation
39 self.default = default
40
41 def __repr__(self) -> str:
42 return f"Parameter(name={self.name!r})"
43
44 @property
45 def description(self) -> str:
46 """
47 Name + annotation.
48 """
49 description = self.name
50
51 if self.annotation is not None:
52 description += f": {self.annotation}"
53
54 return description
55
56
57class Signature:

Callers 2

from_jedi_signatureMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected