Skip to content

Commit 78394da

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 33f55b5 + 93a7666 commit 78394da

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ repos:
6767
["traitlets>=5.13", "jupyter_core>=5.5", "jupyter_client>=8.5"]
6868

6969
- repo: https://github.com/astral-sh/ruff-pre-commit
70-
rev: v0.1.4
70+
rev: v0.1.5
7171
hooks:
7272
- id: ruff
73+
types_or: [python, jupyter]
7374
args: ["--fix", "--show-fixes"]
7475
- id: ruff-format
76+
types_or: [python, jupyter]
7577

7678
- repo: https://github.com/scientific-python/cookie
7779
rev: "2023.10.27"

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ integration = "test --integration_tests=true {args}"
116116
detached = true
117117
dependencies = ["pre-commit"]
118118
[tool.hatch.envs.lint.scripts]
119-
build = "pre-commit run --all-files ruff"
119+
build = [
120+
"pre-commit run --all-files ruff",
121+
"pre-commit run --all-files ruff-format",
122+
]
120123

121124
[tool.hatch.version]
122125
path = "jupyter_server/_version.py"
@@ -137,7 +140,6 @@ install-pre-commit-hook = true
137140
optional-editable-build = true
138141

139142
[tool.ruff]
140-
target-version = "py38"
141143
line-length = 100
142144

143145
[tool.ruff.lint]

tests/services/kernels/test_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import jupyter_client
88
import pytest
99
import tornado
10+
from flaky import flaky
1011
from jupyter_client.kernelspec import NATIVE_KERNEL_NAME
1112
from tornado.httpclient import HTTPClientError
1213

@@ -256,6 +257,7 @@ async def test_kernel_handler_startup_error_pending(
256257
await jp_ws_fetch("api", "kernels", kid, "channels")
257258

258259

260+
@flaky
259261
@pytest.mark.timeout(TEST_TIMEOUT)
260262
async def test_connection(jp_fetch, jp_ws_fetch, jp_http_port, jp_auth_header):
261263
# Create kernel

tests/services/sessions/test_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import jupyter_client
1010
import pytest
1111
import tornado
12+
from flaky import flaky
1213
from jupyter_client.ioloop import AsyncIOLoopKernelManager
1314
from nbformat import writes
1415
from nbformat.v4 import new_notebook
@@ -506,6 +507,7 @@ async def test_modify_kernel_id(session_client, jp_fetch, jp_serverapp, session_
506507
assert kernel_list == [kernel]
507508

508509

510+
@flaky
509511
@pytest.mark.timeout(TEST_TIMEOUT)
510512
async def test_restart_kernel(session_client, jp_base_url, jp_fetch, jp_ws_fetch, session_is_ready):
511513
# Create a session.

0 commit comments

Comments
 (0)