Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c45ee4a

Browse files
authored
Merge pull request #31081 from QuLogic/prek
Switch from pre-commit to prek
2 parents 2b8103b + dda01c6 commit c45ee4a

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1818
with:
1919
python-version: "3.x"
20-
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
20+
- uses: j178/prek-action@564dda4cfa5e96aafdc4a5696c4bf7b46baae5ac # v1.1.0
2121
with:
2222
extra_args: --hook-stage manual --all-files
2323

doc/devel/development_setup.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ you are aware of the existing issues beforehand.
322322

323323
Install pre-commit hooks
324324
========================
325-
`pre-commit <https://pre-commit.com/>`_ hooks save time in the review process by
325+
`prek <https://prek.j178.dev/>`_ hooks save time in the review process by
326326
identifying issues with the code before a pull request is formally opened. Most
327327
hooks can also aide in fixing the errors, and the checks should have
328328
corresponding :ref:`development workflow <development-workflow>` and
@@ -333,8 +333,8 @@ committed files, import order, and incorrect branching.
333333

334334
Install pre-commit hooks ::
335335

336-
python -m pip install pre-commit
337-
pre-commit install
336+
python -m pip install prek
337+
prek install
338338

339339
Hooks are run automatically after the ``git commit`` stage of the
340340
:ref:`editing workflow<edit-flow>`. When a hook has found and fixed an error in a
@@ -343,11 +343,11 @@ file, that file must be *staged and committed* again.
343343
Hooks can also be run manually. All the hooks can be run, in order as
344344
listed in ``.pre-commit-config.yaml``, against the full codebase with ::
345345

346-
pre-commit run --all-files
346+
prek run --all-files
347347

348-
To run a particular hook manually, run ``pre-commit run`` with the hook id ::
348+
To run a particular hook manually, run ``prek run`` with the hook id ::
349349

350-
pre-commit run <hook id> --all-files
350+
prek run <hook id> --all-files
351351

352352

353353
Please note that the ``mypy`` pre-commit hook cannot check the :ref:`type-hints`

doc/devel/pr_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ When opening a pull request on Github, please ensure that:
5656

5757
* Changes were made on a :ref:`feature branch <make-feature-branch>`.
5858

59-
* :ref:`pre-commit <pre-commit-hooks>` checks for spelling, formatting, etc pass
59+
* :ref:`prek <pre-commit-hooks>` checks for spelling, formatting, etc pass
6060

6161
* The pull request targets the :ref:`main branch <pr-branch-selection>`
6262

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ dependencies:
6161
- nbformat!=5.0.0,!=5.0.1
6262
- pandas!=0.25.0
6363
- psutil
64-
- pre-commit
64+
- prek
6565
- pydocstyle>=5.1.0
6666
- pytest!=4.6.0,!=5.4.0,!=8.1.0
6767
- pytest-cov

0 commit comments

Comments
 (0)