tfpaths

class tfutility.core.tfpaths.TfPaths(parent: TfUtility, parser: ArgumentParser)

Add an CLI argument to the command to Found .tf files

SEARCH_GLOB = '**/*.tf'
add_arguments(parser: ArgumentParser) ArgumentParser

Add argument that consumes multiple filesystem paths.

Parameters:

parser (argparse.ArgumentParser) – A ArgumentParser object. if it is None the default one (for the whole application) will be used.

Returns:

Tthe argument parser enriched with arguments

Return type:

argparse.ArgumentParser

get_command_name()

Return the command_name

Raises:

NotImplementedError – Triggerd when this method is not ovewritten

Returns:

The name of this command

Return type:

str

get_file_list(paths: list[Path]) list[Path]
Resolve all given cli nargs of Paths (to folders and files) to a simple list of file paths.

If a given path has no file matching it logs a warning

Parameters:

paths (pathlib.Path) – list[pathlib.Path]

Returns:

List of all found Files

Return type:

list[pathlib.Path]

get_help()
get_logger() Logger

Get the Logger from the main class

Returns:

The logger from the main class

Return type:

logging.Logger

handle(option)
itsme(options: Namespace) bool