vcspull fmt - vcspull.cli.fmt

Format vcspull configuration files.

vcspull.cli.fmt.create_fmt_subparser(parser)[source]

Create vcspull fmt argument subparser.

Return type:

None

Parameters:

parser (argparse.ArgumentParser)

vcspull.cli.fmt.normalize_repo_config(repo_data)[source]

Normalize repository configuration to verbose format.

Return type:

dict[str, Any]

Parameters:

repo_data (Any) – Repository configuration (string URL or dict)

Returns:

Normalized repository configuration with ‘repo’ key

Return type:

dict

vcspull.cli.fmt.format_config(config_data)[source]

Format vcspull configuration for consistency.

Return type:

tuple[dict[str, Any], int]

Parameters:

config_data (dict) – Raw configuration data

Returns:

Formatted configuration and count of changes made

Return type:

tuple[dict, int]

vcspull.cli.fmt.format_single_config(config_file_path, write)[source]

Format a single vcspull configuration file.

Return type:

bool

Parameters:
  • config_file_path (pathlib.Path) – Path to config file

  • write (bool) – Whether to write changes back to file

Returns:

True if formatting was successful, False otherwise

Return type:

bool

vcspull.cli.fmt.format_config_file(config_file_path_str, write, format_all=False)[source]

Format vcspull configuration file(s).

Return type:

None

Parameters:
  • config_file_path_str (str | None) – Path to config file, or None to use default

  • write (bool) – Whether to write changes back to file

  • format_all (bool) – If True, format all discovered config files