util

util

Utility functions for the package

Functions

Name Description
date_today Returns the current date in ISO8601-compliant format (YYYY-MM-DD).
path_resolve Resolves the given filepath to an absolute path.
precommit_run Run pre-commit run with the specified arguments.

date_today

util.date_today()

Returns the current date in ISO8601-compliant format (YYYY-MM-DD).

Returns

Name Type Description
str The current date as a string in the format YYYY-MM-DD.

path_resolve

util.path_resolve(filepath)

Resolves the given filepath to an absolute path.

Parameters

Name Type Description Default
filepath str The path to be resolved. required

Returns

Name Type Description
pathlib.Path: The resolved absolute path.

precommit_run

util.precommit_run(args)

Run pre-commit run with the specified arguments.

Parameters

Name Type Description Default
args str The arguments to pass to the pre-commit command. required

Returns

Name Type Description
subprocess.CompletedProcess: The result of the shell command execution.