Index
Processing module for changelog generation.
MODULE | DESCRIPTION |
---|---|
file_processing |
File reading and writing actions. |
matching |
Commit matching functions. |
metadata |
Metadata callback and processing functions. |
shell |
Shell commands for processing. |
text_processing |
Text functions. |
CLASS | DESCRIPTION |
---|---|
Registry |
Built-in action registry. |
FUNCTION | DESCRIPTION |
---|---|
register_builtin |
A decorator that registers a function with an optional name. |
ATTRIBUTE | DESCRIPTION |
---|---|
BUILT_INS |
The registered actions that are considered to be built-in.
|
Attributes¶
BUILT_INS
module-attribute
¶
BUILT_INS = Registry()
The registered actions that are considered to be built-in.
Classes¶
Registry
¶
Registry(initialdata: Optional[MutableMapping[str, Callable]] = None)
Bases: UserDict
Built-in action registry.
This allows setting keys normally. When getting a key, it makes sure the appropriate modules are imported to fill the internal dictionary before getting the key.
METHOD | DESCRIPTION |
---|---|
__contains__ |
Make sure the built-in actions are loaded before testing containment. |
__getitem__ |
Make sure the built-in actions are loaded. |
load_builtins |
Import all submodules so the decorated functions get registered. |
Functions¶
register_builtin
¶
A decorator that registers a function with an optional name.
Example
The simplest usage is to decorate a callable::
@register_builtin
def do_something(input_text: str) -> str:
pass
That registers the name do_something
as a built-in action. You can
also pass in a name to the decorator to change the registered name::
@register_builtin("good_name")
def a_very_bad_name(input_text: str) -> str:
pass
That registers the name good_name
as a built-in action for that function.
PARAMETER | DESCRIPTION |
---|---|
function_or_name
|
A callable or custom name. |
RETURNS | DESCRIPTION |
---|---|
Callable
|
The original, but already registered, callable. |