Convert parser-specific parameter name to click-internal name Get the click-internal name (name of call argument of wrapped function) from the names used in the parser. This method has to be "idempotent", so that if the click-internal name is provided as argument, it
(self, name: str)
| 459 | pass |
| 460 | |
| 461 | def get_internal_name(self, name: str) -> Optional[str]: |
| 462 | """Convert parser-specific parameter name to click-internal name |
| 463 | |
| 464 | Get the click-internal name (name of call argument of wrapped function) |
| 465 | from the names used in the parser. |
| 466 | This method has to be "idempotent", so that if the click-internal name is provided as |
| 467 | argument, it will simply pass through this name |
| 468 | """ |
| 469 | |
| 470 | if name in self._internal_names: |
| 471 | return name |
| 472 | return self.name_map.get(name) |
| 473 | |
| 474 | def register_param(self, param: click.Parameter): |
| 475 | """Registers a click.Parameter so that the mapping from "external" name to "internal" |