Commit 9830d75 1 parent 730ed3a commit 9830d75 Copy full SHA for 9830d75
File tree 5 files changed +20
-8
lines changed
5 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,13 @@ repos:
33
33
rev : 24.8.0
34
34
hooks :
35
35
- 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
36
43
- repo : https://github.com/codespell-project/codespell
37
44
rev : v2.3.0
38
45
hooks :
Original file line number Diff line number Diff line change @@ -140,9 +140,11 @@ Es enthält neben einem Beispiel-Widget eine Code-Zelle zum Beenden des Kernels:
140
140
141
141
import os
142
142
143
+
143
144
def kill_kernel (change ):
144
145
os._exit(0 )
145
146
147
+
146
148
button = widgets.Button(description = " Kill Kernel" )
147
149
button.on_click(kill_kernel)
148
150
button
Original file line number Diff line number Diff line change @@ -112,15 +112,18 @@ Verwenden auf der Kommandozeile
112
112
113
113
# # `foo.ipynb`
114
114
115
+
115
116
# In[1]:
116
117
def bar ():
117
118
return " bar"
118
119
120
+
119
121
# In[2]:
120
122
def has_ip_syntax ():
121
- listing = get_ipython().getoutput(' ls ' )
123
+ listing = get_ipython().getoutput(" ls " )
122
124
return listing
123
125
126
+
124
127
# In[3]:
125
128
def whatsmyname ():
126
129
return __name__
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ Notebook-Erweiterungen.
130
130
131
131
.. code-block :: python
132
132
133
- c.CodeFoldingPreprocessor.remove_folded_code= True = True
133
+ c.CodeFoldingPreprocessor.remove_folded_code = True
134
134
135
135
oder auf der Kommandozeile mit
136
136
Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ Sphinx konfigurieren
38
38
.. code-block :: python
39
39
40
40
extensions = [
41
- ...
42
- ' nbsphinx' ,
41
+ " ..." ,
42
+ " nbsphinx" ,
43
43
]
44
44
...
45
45
exclude_patterns = [
46
- ...
47
- ' **/.ipynb_checkpoints' ,
46
+ " ..." ,
47
+ " **/.ipynb_checkpoints" ,
48
48
]
49
49
50
50
Ein Beispiel findet ihr in der :download: `/conf.py `-Datei dieses
@@ -309,8 +309,8 @@ eingetragen werden:
309
309
.. code-block :: python
310
310
311
311
extensions = [
312
- ' nbsphinx' ,
313
- ' sphinx_gallery.load_style' ,
312
+ " nbsphinx" ,
313
+ " sphinx_gallery.load_style" ,
314
314
]
315
315
316
316
Anschließend könnt ihr Sphinx-Gallery auf zwei verschiedene Arten nutzen:
You can’t perform that action at this time.
0 commit comments