Skip to content

Commit 19214e8

Browse files
committed
No longer use pathlib .suffix to check file extension
for client event schema files .suffix is not included in importlib.resources APIs and so might not always work
1 parent cce5c71 commit 19214e8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyter_server/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,10 @@ def get_client_schema_files():
268268

269269
files = chain.from_iterable(d.iterdir() for d in dirs if d is not None)
270270

271-
return (f for f in files if f.suffix in ('.json', '.yaml', '.yml'))
271+
return (
272+
f for f in files
273+
if f.is_file() and os.path.splitext(f.name)[1] in ('.json', '.yaml', '.yml')
274+
)
272275

273276

274277
def _is_iterable(x):

0 commit comments

Comments
 (0)