Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace pre-commit with prek#1718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
juhannc wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromjuhannc:prek
Draft
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions.github/workflows/lint.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,4 @@ jobs:

steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.x"
- uses: pre-commit/action@v3.0.1
- uses: j178/prek-action@v1
10 changes: 5 additions & 5 deletionsMakefile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -95,13 +95,13 @@ _ensure-package: venv
$(VENVDIR)/bin/python3 -m pip install $(PACKAGE); \
fi

.PHONY: _ensure-pre-commit
_ensure-pre-commit:
make _ensure-package PACKAGE=pre-commit
.PHONY: _ensure-prek
_ensure-prek:
make _ensure-package PACKAGE=prek

.PHONY: lint
lint: _ensure-pre-commit
$(VENVDIR)/bin/python3 -mpre_commit run --all-files
lint: _ensure-prek
$(VENVDIR)/bin/python3 -mprek run --all-files

# Generate all release cycle files together with a single script invocation
# Use branches.csv as the primary target, others depend on it
Expand Down
2 changes: 1 addition & 1 deletiongetting-started/pull-request-lifecycle.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,7 +111,7 @@ You should have already :ref:`set up your system <setup>`,

(Learn more about :ref:`good-commits`)

* If your code isn't linted correctly, :ref:`pre-commit <install-pre-commit>`
* If your code isn't linted correctly, :ref:`prek <install-prek>`
will block the commit with an error message, for example::

Doc/library/stdtypes.rst:5718: No newline at end of file. (missing-final-newline)
Expand Down
14 changes: 7 additions & 7 deletionsgetting-started/setup-building.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -135,18 +135,18 @@ affected files as described below.)
Changes for the documentation can be made from the same repository; see
:ref:`documenting`.

.. _install-pre-commit:
.. _install-prek:

Installpre-commit as a Git hook
--------------------------------
Installprek as a Git hook
--------------------------

To make sure your code is linted correctly, we recommend setting up
`pre-commit <https://pre-commit.com#installation>`__ as a Git hook::
`prek <https://prek.j178.dev/installation/>`__ as a Git hook::

$pre-commit install --allow-missing-config
pre-commit installed at .git/hooks/pre-commit
$prek install --allow-missing-config
prek installed at .git/hooks/pre-commit

Nowpre-commit will run automatically on ``git commit``.
Nowprek will run automatically on ``git commit``.

.. c_get_source_code_end

Expand Down
Loading

[8]ページ先頭

©2009-2026 Movatter.jp