Skip to content

Commit af598e7

Browse files
Update README-PLUGINS.md
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
1 parent eb9a0d8 commit af598e7

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README-PLUGINS.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,18 @@ to study the handle_files_helper function in nbgitpuller to get a sense of how t
3636
is implemented.
3737

3838
For the rest of the steps, I refer you to the [nbgitpuller-downloader-dropbox](https://github.com/jupyterhub/nbgitpuller-downloader-dropbox) plugin.
39-
```
40-
@hookimpl
41-
def handle_files(query_line_args):
42-
query_line_args["repo"] = query_line_args["repo"].replace("dl=0", "dl=1") # dropbox: dl set to 1
43-
ext = determine_file_extension(query_line_args["repo"])`
44-
query_line_args["extension"] = ext
45-
loop = asyncio.get_event_loop()
46-
tasks = handle_files_helper(query_line_args), query_line_args["progress_func"]()
47-
result_handle, _ = loop.run_until_complete(asyncio.gather(*tasks))
48-
return result_handle
49-
```
39+
40+
```python
41+
@hookimpl
42+
def handle_files(query_line_args):
43+
query_line_args["repo"] = query_line_args["repo"].replace("dl=0", "dl=1") # dropbox: dl set to 1
44+
ext = determine_file_extension(query_line_args["repo"])`
45+
query_line_args["extension"] = ext
46+
loop = asyncio.get_event_loop()
47+
tasks = handle_files_helper(query_line_args), query_line_args["progress_func"]()
48+
result_handle, _ = loop.run_until_complete(asyncio.gather(*tasks))
49+
return result_handle
50+
```
5051

5152
The following pieces describe what happens in handle_files before, at least, in this case, we call
5253
the handle_files_helper function:

0 commit comments

Comments
 (0)