Skip to content

Commit bd2e5e2

Browse files
committed
Updates to section 1
1 parent 2caeb14 commit bd2e5e2

1 file changed

Lines changed: 29 additions & 26 deletions

File tree

index.html

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ <h3>Basic configuration</h3>
537537
<code data-trim class="language-yaml" data-line-numbers="1-8|1|2-8|2|3|4-8" data-fragment-index="1">
538538
repos:
539539
- repo: https://github.com/pre-commit/pre-commit-hooks
540-
rev: v5.0.0
540+
rev: v6.0.0
541541
hooks:
542542
- id: check-toml
543543
- id: check-yaml
@@ -621,7 +621,7 @@ <h2>Example solution</h2>
621621
<code data-trim class="language-diff hide-line-numbers" data-line-numbers="5-6">
622622
repos:
623623
- repo: https://github.com/pre-commit/pre-commit-hooks
624-
rev: v5.0.0
624+
rev: v6.0.0
625625
hooks:
626626
+ - id: check-executables-have-shebangs
627627
+ - id: check-shebang-scripts-are-executable
@@ -703,15 +703,15 @@ <h3>
703703
<code data-trim class="language-yaml" data-line-numbers="10-15|10|11|12-15|14" data-fragment-index="1">
704704
repos:
705705
- repo: https://github.com/pre-commit/pre-commit-hooks
706-
rev: v5.0.0
706+
rev: v6.0.0
707707
hooks:
708708
- id: check-toml
709709
- id: check-yaml
710710
- id: end-of-file-fixer
711711
- id: trailing-whitespace
712712

713713
- repo: https://github.com/astral-sh/ruff-pre-commit
714-
rev: v0.11.12
714+
rev: v0.15.10
715715
hooks:
716716
- id: ruff-check
717717
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
@@ -805,7 +805,7 @@ <h3>The commit fails</h3>
805805
check yaml.........................(no files to check)Skipped
806806
fix end of files.......................................Passed
807807
trim trailing whitespace...............................Passed
808-
ruff-check.............................................Failed
808+
ruff check.............................................Failed
809809
- hook id: ruff-check
810810
- exit code: 1
811811
- files were modified by this hook
@@ -816,7 +816,7 @@ <h3>The commit fails</h3>
816816

817817
Found 1 error (1 fixed, 0 remaining).
818818

819-
ruff-format............................................Failed
819+
ruff format............................................Failed
820820
- hook id: ruff-format
821821
- files were modified by this hook
822822

@@ -891,7 +891,7 @@ <h2>Example solution</h2>
891891
<pre>
892892
<code data-trim class="language-yaml">
893893
- repo: https://github.com/numpy/numpydoc
894-
rev: v1.8.0
894+
rev: v1.10.0
895895
hooks:
896896
- id: numpydoc-validation
897897
</code>
@@ -936,25 +936,21 @@ <h2>Validating docstrings</h2>
936936
</div>
937937
<div class="center fragment" data-fragment-index="0">
938938
<pre>
939-
<code data-trim class="language-shell hide-line-numbers" data-line-numbers="1|2-4|6-18" data-fragment-index="1">
939+
<code data-trim class="language-shell hide-line-numbers" data-line-numbers="1|2-4|6-14" data-fragment-index="1">
940940
$ pre-commit run numpydoc-validation --files example.py
941941
numpydoc-validation.....................................Failed
942942
- hook id: numpydoc-validation
943943
- exit code: 1
944944

945-
+---------------------+-------+------------------------------+
946-
| item | check | description |
947-
+=====================+=======+==============================+
948-
| example | GL08 | The object missing docstring |
949-
+---------------------+-------+------------------------------+
950-
| example.my_function | ES01 | No extended summary found |
951-
+---------------------+-------+------------------------------+
952-
| example.my_function | PR01 | Param {'a'} not documented |
953-
+---------------------+-------+------------------------------+
954-
| example.my_function | SA01 | See Also section not found |
955-
+---------------------+-------+------------------------------+
956-
| example.my_function | EX01 | No examples section found |
957-
+---------------------+-------+------------------------------+
945+
example.py:1: GL08 The object does not have a docstring
946+
947+
example.py:1: ES01 No extended summary found
948+
949+
example.py:1: PR01 Parameters {'a'} not documented
950+
951+
example.py:1: SA01 See Also section not found
952+
953+
example.py:1: EX01 No examples section found
958954

959955
</code>
960956
</pre>
@@ -965,8 +961,15 @@ <h2>Validating docstrings</h2>
965961
<h2>Modifying hook behavior</h2>
966962
<p>Two options:</p>
967963
<ul>
968-
<li class="fragment">via command line arguments</li>
969-
<li class="fragment">via a configuration file</li>
964+
<li class="fragment">
965+
via command line arguments (in
966+
<code>.pre-commit-config.yaml</code>)
967+
</li>
968+
<li class="fragment">
969+
via a configuration file (<em>e.g.</em>,
970+
<code>pyproject.toml</code>, <code>ruff.toml</code>,
971+
<em>etc.</em>)
972+
</li>
970973
</ul>
971974
</section>
972975
<section id="modifying-hooks-with-args">
@@ -980,7 +983,7 @@ <h3>Modifying hook behavior with command line arguments</h3>
980983
<pre>
981984
<code data-trim class="language-yaml hide-line-numbers" data-line-numbers="4-5">
982985
- repo: https://github.com/astral-sh/ruff-pre-commit
983-
rev: v0.11.12
986+
rev: v0.15.10
984987
hooks:
985988
- id: ruff-check
986989
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
@@ -1083,7 +1086,7 @@ <h2>Excluding files</h2>
10831086
<pre>
10841087
<code data-trim class="language-diff hide-line-numbers" data-line-numbers="5">
10851088
- repo: https://github.com/numpy/numpydoc
1086-
rev: v1.8.0
1089+
rev: v1.10.0
10871090
hooks:
10881091
- id: numpydoc-validation
10891092
+ exclude: (tests|docs)/.*
@@ -1113,7 +1116,7 @@ <h2>Keeping hooks up-to-date</h2>
11131116
<code data-trim class="language-shell hide-line-numbers" data-line-numbers="1">
11141117
$ pre-commit autoupdate
11151118
[...]/pre-commit-hooks ... already up to date!
1116-
[...]/ruff-pre-commit ... updating v0.11.12 -> v0.11.13
1119+
[...]/ruff-pre-commit ... updating v0.15.10 -> v0.15.11
11171120
[...]/numpy/numpydoc ... already up to date!
11181121
</code>
11191122
</pre>

0 commit comments

Comments
 (0)