Install all hook types with a plain pre-commit install
This commit is contained in:
parent
83007d458c
commit
08dd3b8218
2 changed files with 3 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
default_install_hook_types: [pre-commit, pre-merge-commit] # used by a plain `pre-commit install`
|
||||
default_stages: [pre-commit] # only used if a hook does not specify stages
|
||||
fail_fast: true
|
||||
repos:
|
||||
|
|
|
|||
|
|
@ -444,8 +444,8 @@ def check_dependency_upgrades(session: Session) -> None:
|
|||
@nox.session(name='init-project', python=MAIN_PYTHON, venv_backend='none')
|
||||
def initialize_project(session: Session) -> None:
|
||||
"""Install the `pre-commit` hooks."""
|
||||
for type_ in ('pre-commit', 'pre-merge-commit', 'pre-push'):
|
||||
session.run('uv', 'run', 'pre-commit', 'install', f'--hook-type={type_}')
|
||||
# .pre-commit-config.yaml sets the hook types via "default_install_hook_types"
|
||||
session.run('uv', 'run', 'pre-commit', 'install')
|
||||
|
||||
|
||||
@nox.session(name='clean-cwd', python=MAIN_PYTHON, venv_backend='none')
|
||||
|
|
|
|||
Loading…
Reference in a new issue