erc7730.format.format module

erc7730.format.format.format_all(paths: list[Path], out: OutputAdder) int[source]View on GitHub

Format all ERC-7730 descriptor files at given paths.

Paths can be files or directories, in which case all descriptor files in the directory are recursively formatted.

Parameters:
  • paths – paths to apply formatter on

  • out – output adder

Returns:

number of files formatted

erc7730.format.format.format_all_and_print_errors(paths: list[Path]) bool[source]View on GitHub

Format all ERC-7730 descriptor files at given paths and print errors.

Parameters:

paths – paths to apply formatter on

Returns:

true if not errors occurred

erc7730.format.format.format_file(path: Path, out: OutputAdder, show_as: Path | None = None) None[source]View on GitHub

Format a single ERC-7730 descriptor file.

Parameters:
  • path – ERC-7730 descriptor file path

  • show_as – if provided, print this label instead of the file path

  • out – error handler