Skip to content

[pre-commit.ci] pre-commit autoupdate #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ["--enforce-all", "--maxkb=300"]
Expand All @@ -22,7 +22,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.4"
rev: "v0.11.4"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down
2 changes: 1 addition & 1 deletion jupyter_output_monitor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from ._report import report
from ._version import __version__

__all__ = ["monitor", "report", "__version__", "main"]
__all__ = ["__version__", "main", "monitor", "report"]
6 changes: 4 additions & 2 deletions jupyter_output_monitor/_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,15 @@ def _monitor_output(url, output, wait_after_execute, headless):
# Check if server is asking us to select a kernel
dialogs = list(page.query_selector_all(".jp-Dialog-header"))
for dialog in dialogs:
if 'Select Kernel' in dialog.inner_text():
if "Select Kernel" in dialog.inner_text():
print("Server is asking to select a kernel, accepting default")
accept = list(page.query_selector_all(".jp-mod-accept"))
if len(accept) == 1:
accept[0].click()
else:
print("Error: multiple accept buttons found, not sure which to click")
print(
"Error: multiple accept buttons found, not sure which to click"
)
sys.exit(1)

last_screenshot = {}
Expand Down
2 changes: 1 addition & 1 deletion jupyter_output_monitor/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from nbconvert import NotebookExporter
from traitlets.config import Config

__all__ = ["get_free_port", "clear_notebook", "isotime"]
__all__ = ["clear_notebook", "get_free_port", "isotime"]


def get_free_port():
Expand Down
10 changes: 5 additions & 5 deletions jupyter_output_monitor/tests/data/simple.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"metadata": {},
"outputs": [],
"source": [
"button = Button(description='Test')\n",
"button.layout.border = '1px solid rgb(143, 56, 3)'\n",
"button = Button(description=\"Test\")\n",
"button.layout.border = \"1px solid rgb(143, 56, 3)\"\n",
"button"
]
},
Expand All @@ -56,7 +56,7 @@
"outputs": [],
"source": [
"area = Textarea()\n",
"area.layout.border = '1px solid rgb(143, 56, 33)'\n",
"area.layout.border = \"1px solid rgb(143, 56, 33)\"\n",
"area"
]
},
Expand All @@ -67,9 +67,9 @@
"metadata": {},
"outputs": [],
"source": [
"area.value = 'Test1'\n",
"area.value = \"Test1\"\n",
"time.sleep(3)\n",
"area.value = 'Test2'"
"area.value = \"Test2\""
]
}
],
Expand Down
Loading