Skip to content

Commit 3da4a63

Browse files
committed
docs: apply black formatting in documentation's examples
1 parent b619add commit 3da4a63

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

docs/source/server-process.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ For example, with the following config:
6666

6767
```python
6868
c.ServerProxy.servers = {
69-
'test-server': {
70-
'command': ['python3', '-m', 'http.server', '{port}'],
71-
'absolute_url': False
72-
}
69+
"test-server": {
70+
"command": ["python3", "-m", "http.server", "{port}"],
71+
"absolute_url": False
72+
}
7373
}
7474
```
7575

@@ -162,10 +162,10 @@ For example, with the following config:
162162

163163
```python
164164
def _cmd_callback():
165-
return ['some-command']
165+
return ["some-command"]
166166

167167
server_config = {
168-
'command': _cmd_callback
168+
"command": _cmd_callback
169169
}
170170
```
171171

@@ -174,10 +174,10 @@ with:
174174

175175
```python
176176
def _cmd_callback(port):
177-
return ['some-command', '--port=' + str(port)]
177+
return ["some-command", "--port=" + str(port)]
178178

179179
server_config = {
180-
'command': _cmd_callback
180+
"command": _cmd_callback
181181
}
182182
```
183183

@@ -200,7 +200,7 @@ of the argument. For example, if your function is:
200200

201201
```python
202202
def _openrefine_cmd():
203-
return ['openrefine', '-p', '{port}']
203+
return ["openrefine", "-p", "{port}"]
204204
```
205205

206206
The `{port}` will be replaced with the appropriate port before
@@ -225,9 +225,9 @@ if we want tighter control over what process is spawned.
225225

226226
```python
227227
c.ServerProxy.servers = {
228-
'openrefine': {
229-
'command': ['refine', '-p', '{port}']
230-
}
228+
"openrefine": {
229+
"command": ["refine", "-p", "{port}"]
230+
}
231231
}
232232
```
233233

@@ -252,9 +252,9 @@ above.
252252

253253
```python
254254
def setup_openrefine():
255-
return {
256-
'command': ['refine', '-p', '{port}']
257-
}
255+
return {
256+
"command": ["refine", "-p", "{port}"]
257+
}
258258
```
259259

260260
A simple function that returns a Server Process configuration
@@ -267,16 +267,16 @@ above.
267267
import setuptools
268268

269269
setuptools.setup(
270-
name="jupyter-openrefine-server",
271-
# py_modules rather than packages, since we only have 1 file
272-
py_modules=['openrefine'],
273-
entry_points={
274-
'jupyter_serverproxy_servers': [
275-
# name = packagename:function_name
276-
'openrefine = openrefine:setup_openrefine',
277-
]
278-
},
279-
install_requires=['jupyter-server-proxy'],
270+
name="jupyter-openrefine-server",
271+
# py_modules rather than packages, since we only have 1 file
272+
py_modules=["openrefine"],
273+
entry_points={
274+
"jupyter_serverproxy_servers": [
275+
# name = packagename:function_name
276+
"openrefine = openrefine:setup_openrefine",
277+
]
278+
},
279+
install_requires=["jupyter-server-proxy"],
280280
)
281281
```
282282

0 commit comments

Comments
 (0)