Skip to content

Commit

Permalink
Update typings for server 2.10 (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Nov 7, 2023
1 parent 33d2009 commit 085ac9b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ repos:
additional_dependencies:
[
"traitlets>=5.3",
"jupyter_server>=2.9",
"jupyter_server>=2.10",
"openapi_core",
"json5",
"pytest",
Expand Down
2 changes: 1 addition & 1 deletion jupyterlab_server/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@ def labserverapp(
) -> LabServerApp:
"""A lab server app."""
app = make_labserver_extension_app()
app._link_jupyter_server_extension(jp_serverapp) # type:ignore[no-untyped-call]
app._link_jupyter_server_extension(jp_serverapp)
app.initialize() # type:ignore[no-untyped-call]
return app
4 changes: 2 additions & 2 deletions jupyterlab_server/settings_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def _get_user_settings(settings_dir: str, schema_name: str, schema: Any) -> dict

if os.path.exists(path):
stat = os.stat(path)
last_modified = tz.utcfromtimestamp(stat.st_mtime).isoformat()
created = tz.utcfromtimestamp(stat.st_ctime).isoformat()
last_modified = tz.utcfromtimestamp(stat.st_mtime).isoformat() # type:ignore[no-untyped-call]
created = tz.utcfromtimestamp(stat.st_ctime).isoformat() # type:ignore[no-untyped-call]
with open(path, encoding="utf-8") as fid:
try: # to load and parse the settings file.
raw = fid.read() or raw
Expand Down
4 changes: 2 additions & 2 deletions jupyterlab_server/workspaces_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def _load_with_file_times(workspace_path: Path) -> dict:
with workspace_path.open(encoding="utf-8") as fid:
workspace = json.load(fid)
workspace["metadata"].update(
last_modified=tz.utcfromtimestamp(stat.st_mtime).isoformat(),
created=tz.utcfromtimestamp(stat.st_ctime).isoformat(),
last_modified=tz.utcfromtimestamp(stat.st_mtime).isoformat(), # type:ignore[no-untyped-call]
created=tz.utcfromtimestamp(stat.st_ctime).isoformat(), # type:ignore[no-untyped-call]
)
return workspace

Expand Down

0 comments on commit 085ac9b

Please sign in to comment.