Skip to content

Commit

Permalink
chore: update pre-commit hooks (#435)
Browse files Browse the repository at this point in the history
* chore: update pre-commit hooks

updates:
- [github.com/python-jsonschema/check-jsonschema: 0.27.3 → 0.27.4](python-jsonschema/check-jsonschema@0.27.3...0.27.4)
- [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.2.0](astral-sh/ruff-pre-commit@v0.1.9...v0.2.0)
- [github.com/scientific-python/cookie: 2023.12.21 → 2024.01.24](scientific-python/cookie@2023.12.21...2024.01.24)

* Fixes RUF017

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Frédéric Collonval <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and fcollonval authored Feb 7, 2024
1 parent 75b1ec0 commit 8b8182d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.27.4
hooks:
- id: check-github-workflows

Expand Down Expand Up @@ -77,7 +77,7 @@ repos:
]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.2.0
hooks:
- id: ruff
types_or: [python, jupyter]
Expand All @@ -86,7 +86,7 @@ repos:
types_or: [python, jupyter]

- repo: https://github.com/scientific-python/cookie
rev: "2023.12.21"
rev: "2024.01.24"
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
12 changes: 5 additions & 7 deletions jupyterlab_server/licenses_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ 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 8b8182d

Please sign in to comment.