Skip to content

Commit e6be0fa

Browse files
[pre-commit.ci] pre-commit autoupdate (#1266)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester <[email protected]>
1 parent f8ed273 commit e6be0fa

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ repos:
3535
- id: black
3636

3737
- repo: https://github.com/charliermarsh/ruff-pre-commit
38-
rev: v0.0.260
38+
rev: v0.0.263
3939
hooks:
4040
- id: ruff
4141
args: ["--fix"]

jupyter_server/_sysinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def pkg_commit_hash(pkg_path):
4141
if p.exists(p.join(cur_path, ".git")):
4242
try:
4343
proc = subprocess.Popen(
44-
["git", "rev-parse", "--short", "HEAD"],
44+
["git", "rev-parse", "--short", "HEAD"], # noqa
4545
stdout=subprocess.PIPE,
4646
stderr=subprocess.PIPE,
4747
cwd=pkg_path,

jupyter_server/serverapp.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2826,10 +2826,9 @@ def start_app(self):
28262826
"",
28272827
(
28282828
"UNIX sockets are not browser-connectable, but you can tunnel to "
2829-
"the instance via e.g.`ssh -L 8888:%s -N user@this_host` and then "
2830-
"open e.g. %s in a browser."
2831-
)
2832-
% (self.sock, self.connection_url),
2829+
"the instance via e.g.`ssh -L 8888:{} -N user@this_host` and then "
2830+
"open e.g. {} in a browser."
2831+
).format(self.sock, self.connection_url),
28332832
]
28342833
)
28352834
)

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ detached = true
124124
dependencies = [
125125
"black[jupyter]==23.3.0",
126126
"mdformat>0.7",
127-
"ruff==0.0.260",
127+
"ruff==0.0.263",
128128
]
129129
[tool.hatch.envs.lint.scripts]
130130
style = [
@@ -254,6 +254,10 @@ unfixable = [
254254
"**/*_config.py" = ["F821"]
255255
# F401 `jupyter_server_terminals.TerminalAPIHandler` imported but unused
256256
"jupyter_server/terminal/api_handlers.py" = ["F401"]
257+
# S607 Starting a process with a partial executable path
258+
# S603 `subprocess` call: check for execution of untrusted input
259+
"jupyter_server/services/contents/filemanager.py" = ["S603", "S607"]
260+
"tests/unix_sockets/test_serverapp_integration.py" = ["S603", "S607"]
257261

258262
[tool.pytest.ini_options]
259263
addopts = "-raXs --durations 10 --color=yes --doctest-modules"

tests/extension/test_launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _kill_extension_app():
6666
root = Path(HERE).parent.parent
6767

6868
process = subprocess.Popen(
69-
[
69+
[ # noqa
7070
sys.executable,
7171
"-m",
7272
"tests.extension.mockextensions.app",

tests/services/kernels/test_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def mock_method(self, *args, **kwargs):
4242

4343
monkeypatch.setattr(AsyncKernelManager, f"{action}_kernel", mock_method)
4444

45-
with pytest.raises(Exception):
45+
with pytest.raises(Exception): # noqa
4646
await getattr(manager, f"{action}_kernel")()
4747

4848
output = jp_read_emitted_events()[0]

tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_check_version():
9999

100100

101101
def test_check_pid():
102-
proc = subprocess.Popen([sys.executable])
102+
proc = subprocess.Popen([sys.executable]) # noqa
103103
proc.kill()
104104
proc.wait()
105105
check_pid(proc.pid)

0 commit comments

Comments
 (0)