Skip to content

Commit 367d06e

Browse files
authored
Ensure compatibility with both sync and async contents managers (#62)
1 parent 2b358ee commit 367d06e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jupyterlab_quickopen/handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from fnmatch import fnmatch
55

66
from jupyter_server.base.handlers import APIHandler
7+
from jupyter_server.utils import ensure_async
78
from tornado import web
89
from tornado.escape import json_encode
910

@@ -39,7 +40,7 @@ async def should_hide(self, entry, excludes):
3940
any(fnmatch(entry.name, glob) for glob in excludes)
4041
or not self.contents_manager.should_list(entry.name)
4142
or (
42-
await self.contents_manager.is_hidden(entry.path)
43+
await ensure_async(self.contents_manager.is_hidden(entry.path))
4344
and not self.contents_manager.allow_hidden
4445
)
4546
)

0 commit comments

Comments
 (0)