Skip to content

Commit 9830d75

Browse files
committed
🔧 Add blacken-docs
* Fix syntax
1 parent 730ed3a commit 9830d75

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

.pre-commit-config.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ repos:
3333
rev: 24.8.0
3434
hooks:
3535
- id: black
36+
- repo: https://github.com/adamchainz/blacken-docs
37+
rev: "1.18.0"
38+
hooks:
39+
- id: blacken-docs
40+
args: [--line-length=79]
41+
additional_dependencies:
42+
- black
3643
- repo: https://github.com/codespell-project/codespell
3744
rev: v2.3.0
3845
hooks:

docs/dashboards/voila/templating.rst

+2
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@ Es enthält neben einem Beispiel-Widget eine Code-Zelle zum Beenden des Kernels:
140140
141141
import os
142142
143+
143144
def kill_kernel(change):
144145
os._exit(0)
145146
147+
146148
button = widgets.Button(description="Kill Kernel")
147149
button.on_click(kill_kernel)
148150
button

docs/nbconvert.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,18 @@ Verwenden auf der Kommandozeile
112112
113113
# # `foo.ipynb`
114114
115+
115116
# In[1]:
116117
def bar():
117118
return "bar"
118119
120+
119121
# In[2]:
120122
def has_ip_syntax():
121-
listing = get_ipython().getoutput('ls')
123+
listing = get_ipython().getoutput("ls")
122124
return listing
123125
126+
124127
# In[3]:
125128
def whatsmyname():
126129
return __name__

docs/nbextensions/list.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Notebook-Erweiterungen.
130130

131131
.. code-block:: python
132132
133-
c.CodeFoldingPreprocessor.remove_folded_code=True = True
133+
c.CodeFoldingPreprocessor.remove_folded_code = True
134134
135135
oder auf der Kommandozeile mit
136136

docs/sphinx/nbsphinx.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ Sphinx konfigurieren
3838
.. code-block:: python
3939
4040
extensions = [
41-
...
42-
'nbsphinx',
41+
"...",
42+
"nbsphinx",
4343
]
4444
...
4545
exclude_patterns = [
46-
...
47-
'**/.ipynb_checkpoints',
46+
"...",
47+
"**/.ipynb_checkpoints",
4848
]
4949
5050
Ein Beispiel findet ihr in der :download:`/conf.py`-Datei dieses
@@ -309,8 +309,8 @@ eingetragen werden:
309309
.. code-block:: python
310310
311311
extensions = [
312-
'nbsphinx',
313-
'sphinx_gallery.load_style',
312+
"nbsphinx",
313+
"sphinx_gallery.load_style",
314314
]
315315
316316
Anschließend könnt ihr Sphinx-Gallery auf zwei verschiedene Arten nutzen:

0 commit comments

Comments
 (0)