erc7730.convert.convert module
- erc7730.convert.convert.convert_and_print_errors(input_descriptor: InputType, converter: ERC7730Converter[InputType, OutputType]) OutputType | dict[str, OutputType] | None [source]View on GitHub
Convert an input descriptor using a converter, print any errors encountered, and return the result model.
- Parameters:
input_descriptor – loaded, valid input descriptor
converter – converter to use
- Returns:
output descriptor (if no errors, or only non-fatal errors encountered), None otherwise
- erc7730.convert.convert.convert_and_raise_errors(input_descriptor: InputType, converter: ERC7730Converter[InputType, OutputType]) OutputType | dict[str, OutputType] | None [source]View on GitHub
Convert an input descriptor using a converter, raising any errors encountered, and return the result model.
- Parameters:
input_descriptor – loaded, valid input descriptor
converter – converter to use
- Returns:
output descriptor (if no errors, or only non-fatal errors encountered), None otherwise
- erc7730.convert.convert.convert_to_file_and_print_errors(input_descriptor: InputType, output_file: Path, converter: ERC7730Converter[InputType, OutputType]) bool [source]View on GitHub
Convert an input descriptor to an output file using a converter, and print any errors encountered.
- Parameters:
input_descriptor – loaded, valid input descriptor
output_file – output file path (overwritten if already exists)
converter – converter to use
- Returns:
True if output file was written (if no errors, or only non-fatal errors encountered)