pycc.cli.extensions package¶
Submodules¶
pycc.cli.extensions.constants module¶
Core extension for constant in-lining.
pycc.cli.extensions.interfaces module¶
Standardized interfaces for extensions.
- class pycc.cli.extensions.interfaces.Arg¶
Bases: tuple
Arg(name, type, description)
- description¶
Alias for field number 2
- name¶
Alias for field number 0
- type¶
Alias for field number 1
- class pycc.cli.extensions.interfaces.CliExtension¶
Bases: object
This object represents the interface that extensions must implement.
- arguments = (Arg(name=u'num-tries', type=<type 'int'>, description=u'Number of times to try something.'),)¶
- description = u'A CLI Extension.'¶
- name = u'extension'¶
- static optimize(node, *args, **kwargs)¶
Run the optimizer for the given node.
Arguments given on the CLI will be passed in as keyword arguments.
pycc.cli.extensions.utils module¶
Utilities for getting and using extensions.
- pycc.cli.extensions.utils.execute(args, node)¶
Run the enabled extensions.
- pycc.cli.extensions.utils.iter_extensions()¶
Get an iterable of extensions.
- pycc.cli.extensions.utils.register_extensions(parser)¶
Register the CLI args for all extensions using the given parser.
Module contents¶
Utilities for building CLI extensions and the core extensions.