struct#

class PrecommitConfig[source]#

Bases: TypedDict

https://pre-commit.com/#pre-commit-configyaml—top-level.

ci: NotRequired[PrecommitCi][source]#
repos: list[Repo][source]#
default_stages: NotRequired[list[str]][source]#
files: NotRequired[str][source]#
exclude: NotRequired[str][source]#
fail_fast: NotRequired[bool][source]#
minimum_pre_commit_version: NotRequired[str][source]#
class PrecommitCi[source]#

Bases: TypedDict

https://pre-commit.ci/#configuration.

autofix_commit_msg: NotRequired[str][source]#
autofix_prs: NotRequired[bool][source]#
autoupdate_branch: NotRequired[str][source]#
autoupdate_commit_msg: NotRequired[str][source]#
autoupdate_schedule: NotRequired[Literal['weekly', 'monthly', 'quarterly']][source]#
skip: NotRequired[list[str]][source]#
submodules: NotRequired[bool][source]#
class Repo[source]#

Bases: TypedDict

https://pre-commit.com/#pre-commit-configyaml—repos.

repo: str[source]#
rev: str[source]#
hooks: list[Hook][source]#
class Hook[source]#

Bases: TypedDict

https://pre-commit.com/#pre-commit-configyaml—hooks.

id: str[source]#
alias: NotRequired[str][source]#
name: NotRequired[str][source]#
language_version: NotRequired[str][source]#
files: NotRequired[str][source]#
exclude: NotRequired[str][source]#
types: NotRequired[list[str]][source]#
types_or: NotRequired[list[str]][source]#
exclude_types: NotRequired[list[str]][source]#
args: NotRequired[list[str]][source]#
stages: NotRequired[list[str]][source]#
additional_dependencies: NotRequired[list[str]][source]#
always_run: NotRequired[bool][source]#
verbose: NotRequired[bool][source]#
log_file: NotRequired[str][source]#
pass_filenames: NotRequired[bool][source]#
validate(config: PrecommitConfig) None[source]#