rocrate_action_recorder.adapters.shared

Shared helpers for CLI framework adapters.

Attributes

Classes

IOArgumentNames

Which argument names have values that are input/output files or directories.

Functions

try_convert_to_path(→ pathlib.Path | None)

Try to convert a single item to a Path.

_flatten_nested_tuples(→ list[Any])

Flatten nested tuples recursively.

value2paths(→ list[pathlib.Path])

Convert a value to a list of deduplicated Path objects.

Module Contents

rocrate_action_recorder.adapters.shared.logger
class rocrate_action_recorder.adapters.shared.IOArgumentNames[source]

Which argument names have values that are input/output files or directories.

input_files: list[str]

List of argument names for input files.

output_files: list[str]

List of argument names for output files.

input_dirs: list[str]

List of argument names for input directories.

output_dirs: list[str]

List of argument names for output directories.

rocrate_action_recorder.adapters.shared.try_convert_to_path(item: Any) pathlib.Path | None[source]

Try to convert a single item to a Path.

rocrate_action_recorder.adapters.shared._flatten_nested_tuples(value: Any) list[Any][source]

Flatten nested tuples recursively.

rocrate_action_recorder.adapters.shared.value2paths(value: Any) list[pathlib.Path][source]

Convert a value to a list of deduplicated Path objects.