File tree Expand file tree Collapse file tree 7 files changed +2
-9
lines changed
jupyter_server/services/contents Expand file tree Collapse file tree 7 files changed +2
-9
lines changed Original file line number Diff line number Diff line change 15
15
16
16
from anyio import run_sync_in_worker_thread
17
17
from jupyter_core .utils import ensure_dir_exists
18
- from jupyter_server .utils import ensure_async
19
18
from ipython_genutils .py3compat import getcwd
20
19
from traitlets import Unicode
21
20
Original file line number Diff line number Diff line change 12
12
import os
13
13
import shutil
14
14
15
- from anyio import open_file , run_sync_in_worker_thread
15
+ from anyio import run_sync_in_worker_thread
16
16
from tornado .web import HTTPError
17
17
18
18
from jupyter_server .utils import (
Original file line number Diff line number Diff line change 10
10
import shutil
11
11
import stat
12
12
import sys
13
- import warnings
14
13
import mimetypes
15
14
import nbformat
16
15
Original file line number Diff line number Diff line change 30
30
default ,
31
31
)
32
32
from ipython_genutils .py3compat import string_types
33
- from jupyter_server .base .handlers import JupyterHandler
34
33
from jupyter_server .transutils import _
35
34
from jupyter_server .utils import ensure_async
36
35
Original file line number Diff line number Diff line change 12
12
)
13
13
14
14
from jupyter_server .utils import url_path_join
15
- from jupyter_server .services .contents .filecheckpoints import AsyncFileCheckpoints , FileCheckpoints
16
15
17
16
from base64 import encodebytes , decodebytes
18
17
Original file line number Diff line number Diff line change 1
1
import pytest
2
2
3
- from traitlets .config import Config
4
3
from jupyter_server .services .contents .checkpoints import AsyncCheckpoints
5
4
from jupyter_server .services .contents .filecheckpoints import GenericFileCheckpoints
6
5
from jupyter_server .services .contents .manager import AsyncContentsManager
Original file line number Diff line number Diff line change 10
10
11
11
from nbformat import v4 as nbformat
12
12
13
- from jupyter_server .services .contents .filecheckpoints import AsyncFileCheckpoints , FileCheckpoints
14
13
from jupyter_server .services .contents .filemanager import AsyncFileContentsManager , FileContentsManager
15
14
from jupyter_server .utils import ensure_async
16
15
from ...utils import expected_http_error
@@ -335,7 +334,7 @@ async def test_get(jp_contents_manager):
335
334
# Test in sub-directory
336
335
sub_dir = '/foo/'
337
336
_make_dir (cm , 'foo' )
338
- model = await ensure_async (cm .new_untitled (path = sub_dir , ext = '.ipynb' ))
337
+ await ensure_async (cm .new_untitled (path = sub_dir , ext = '.ipynb' ))
339
338
model2 = await ensure_async (cm .get (sub_dir + name ))
340
339
assert isinstance (model2 , dict )
341
340
assert 'name' in model2
@@ -461,7 +460,6 @@ async def test_save(jp_contents_manager):
461
460
sub_dir = '/foo/'
462
461
_make_dir (cm , 'foo' )
463
462
model = await ensure_async (cm .new_untitled (path = sub_dir , type = 'notebook' ))
464
- name = model ['name' ]
465
463
path = model ['path' ]
466
464
model = await ensure_async (cm .get (path ))
467
465
You can’t perform that action at this time.
0 commit comments