| 25 | |
| 26 | |
| 27 | class 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 | |
| 57 | class Signature: |
no outgoing calls
no test coverage detected