Skip to content

Commit

Permalink
Fixes RUF017
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval authored Feb 7, 2024
1 parent 55821d9 commit a73cba9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
14 changes: 7 additions & 7 deletions jupyterlab_server/licenses_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ def federated_extensions(self) -> dict[str, Any]:

assert isinstance(self.parent, LabServerApp)

labextensions_path: list = sum(
[
self.parent.labextensions_path,
self.parent.extra_labextensions_path,
],
[],
)
per_paths = [
self.parent.labextensions_path,
self.parent.extra_labextensions_path,
]
labextensions_path = [
extension for extensions in per_paths for extension in extensions
]
return get_federated_extensions(labextensions_path)

async def report_async(
Expand Down
7 changes: 4 additions & 3 deletions tests/test_workspaces_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ async def test_listing_dates(jp_fetch, labserverapp):
r = await jp_fetch("lab", "api", "workspaces")
data = json.loads(r.body.decode())
values = data["workspaces"]["values"]
times: list = sum(
([ws["metadata"].get("last_modified"), ws["metadata"].get("created")] for ws in values), []
)
workspaces = [
[ws["metadata"].get("last_modified"), ws["metadata"].get("created")] for ws in values
]
times = [time for workspace in workspaces for time in workspace]
assert None not in times
[rfc3339_to_timestamp(t) for t in times]

Expand Down

0 comments on commit a73cba9

Please sign in to comment.