#8388 Make help() on plugins more useful
Closed: fixed 3 years ago by rcritten. Opened 3 years ago by cheimes.

help / pydoc on plugin objects does not show arguments and options. It would be beneficial for users to show both in the output of help(api.Command.group_add). With Python 3.6 it's easy to create a signature from IPA's parameters on demand.

>>> help(api.Command.group_add)
Help on group_add in module ipaserver.plugins.group object:

class group_add(ipaserver.plugins.baseldap.LDAPCreate)
 |  group_add(cn: str, *, description: str = None, gidnumber: int = None, setattr: List[str] = None, addattr: List[str] = None, nonposix: bool, external: bool, all: bool, raw: bool, version: str = None, no_members: bool) -> Dict[str, Any]
...

The stdlib typing module does not support complex dict notation. For return value notation it would be necessary to add mypy as new dependency.


Metadata Update from @cheimes:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/4866

3 years ago

master:

  • 069f41a Add signature to plugins
  • 80794f6 Make tab completion in console more useful

ipa-4-8:

  • e334415 Add signature to plugins
  • c21d3cf Make tab completion in console more useful

Metadata Update from @rcritten:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata