validate_pyproject.pre_compile package#

Submodules#

validate_pyproject.pre_compile.cli module#

class validate_pyproject.pre_compile.cli.CliParams(plugins, output_dir, main_file, replacements, loglevel)[source]#

Bases: tuple

loglevel: int#

Alias for field number 4

main_file: str#

Alias for field number 2

output_dir: Path#

Alias for field number 1

plugins: List[PluginWrapper]#

Alias for field number 0

replacements: Mapping[str, str]#

Alias for field number 3

validate_pyproject.pre_compile.cli.ensure_dict(name: str, value: Any) dict[source]#
validate_pyproject.pre_compile.cli.main(args: Sequence[str] = ())#
validate_pyproject.pre_compile.cli.parser_spec(plugins: Sequence[PluginWrapper]) Dict[str, dict][source]#
validate_pyproject.pre_compile.cli.run(args: Sequence[str] = ())[source]#

Module contents#

validate_pyproject.pre_compile.copy_fastjsonschema_exceptions(output_dir: Path, replacements: Dict[str, str]) Path[source]#
validate_pyproject.pre_compile.copy_module(name: str, output_dir: Path, replacements: Dict[str, str]) Path[source]#
validate_pyproject.pre_compile.load_licenses() Dict[str, str][source]#
validate_pyproject.pre_compile.pre_compile(output_dir: Union[str, PathLike] = '.', main_file: str = '__init__.py', original_cmd: str = '', plugins: Union[AllPlugins, Sequence[PluginWrapper]] = AllPlugins.ALL_PLUGINS, text_replacements: Mapping[str, str] = mappingproxy({'from fastjsonschema import': 'from .fastjsonschema_exceptions import', 'from ._vendor.fastjsonschema import': 'from .fastjsonschema_exceptions import'})) Path[source]#

Populate the given output_dir with all files necessary to perform the validation. The validation can be performed by calling the validate function inside the the file named with the main_file value. text_replacements can be used to

validate_pyproject.pre_compile.replace_text(text: str, replacements: Dict[str, str]) str[source]#
validate_pyproject.pre_compile.write_main(file_path: Path, schema: Schema, replacements: Dict[str, str]) Path[source]#
validate_pyproject.pre_compile.write_notice(out: Path, main_file: str, cmd: str, replacements: Dict[str, str]) Path[source]#