Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
bloomsa committed Nov 13, 2023
2 parents 33f55b5 + 93a7666 commit 78394da
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ repos:
["traitlets>=5.13", "jupyter_core>=5.5", "jupyter_client>=8.5"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.4
rev: v0.1.5
hooks:
- id: ruff
types_or: [python, jupyter]
args: ["--fix", "--show-fixes"]
- id: ruff-format
types_or: [python, jupyter]

- repo: https://github.com/scientific-python/cookie
rev: "2023.10.27"
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ integration = "test --integration_tests=true {args}"
detached = true
dependencies = ["pre-commit"]
[tool.hatch.envs.lint.scripts]
build = "pre-commit run --all-files ruff"
build = [
"pre-commit run --all-files ruff",
"pre-commit run --all-files ruff-format",
]

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

[tool.ruff]
target-version = "py38"
line-length = 100

[tool.ruff.lint]
Expand Down
2 changes: 2 additions & 0 deletions tests/services/kernels/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import jupyter_client
import pytest
import tornado
from flaky import flaky
from jupyter_client.kernelspec import NATIVE_KERNEL_NAME
from tornado.httpclient import HTTPClientError

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


@flaky
@pytest.mark.timeout(TEST_TIMEOUT)
async def test_connection(jp_fetch, jp_ws_fetch, jp_http_port, jp_auth_header):
# Create kernel
Expand Down
2 changes: 2 additions & 0 deletions tests/services/sessions/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import jupyter_client
import pytest
import tornado
from flaky import flaky
from jupyter_client.ioloop import AsyncIOLoopKernelManager
from nbformat import writes
from nbformat.v4 import new_notebook
Expand Down Expand Up @@ -506,6 +507,7 @@ async def test_modify_kernel_id(session_client, jp_fetch, jp_serverapp, session_
assert kernel_list == [kernel]


@flaky
@pytest.mark.timeout(TEST_TIMEOUT)
async def test_restart_kernel(session_client, jp_base_url, jp_fetch, jp_ws_fetch, session_is_ready):
# Create a session.
Expand Down

0 comments on commit 78394da

Please sign in to comment.