f_lib.mixins package

Class mixins.

class f_lib.mixins.CliInterfaceMixin[source]

Bases: object

Mixin for adding CLI interface methods.

EXECUTABLE: ClassVar[str]

CLI executable.

env: Environment

Environment.

cwd: pathlib.Path

Working directory where commands will be run.

classmethod found_in_path() bool[source]

Determine if executable is found in $PATH.

classmethod generate_command(_CliInterfaceMixin__command: list[str] | str | None = None, **kwargs: bool | Iterable[pathlib.Path] | Iterable[str] | str | None) list[str][source]

Generate command to be executed and log it.

Parameters:
  • __command – Command to run.

  • **kwargs – Additional args to pass to the command.

Returns:

The full command to be passed into a subprocess.

class f_lib.mixins.DelCachedPropMixin[source]

Bases: object

Mixin to handle safely clearing the value of functools.cached_property().