Skip to content

Commit 508982f

Browse files
[pre-commit.ci] pre-commit autoupdate (#954)
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 6dda5ad commit 508982f

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
- id: trailing-whitespace
2121

2222
- repo: https://github.com/python-jsonschema/check-jsonschema
23-
rev: 0.23.1
23+
rev: 0.23.2
2424
hooks:
2525
- id: check-github-workflows
2626

@@ -34,8 +34,8 @@ repos:
3434
hooks:
3535
- id: black
3636

37-
- repo: https://github.com/charliermarsh/ruff-pre-commit
38-
rev: v0.0.270
37+
- repo: https://github.com/astral-sh/ruff-pre-commit
38+
rev: v0.0.276
3939
hooks:
4040
- id: ruff
4141
args: ["--fix"]

jupyter_client/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def write_connection_file(
114114
else:
115115
N = 1
116116
for _ in range(ports_needed):
117-
while os.path.exists(f"{ip}-{str(N)}"):
117+
while os.path.exists(f"{ip}-{N!s}"):
118118
N += 1
119119
ports.append(N)
120120
N += 1

jupyter_client/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def _kernel_name_changed(self, change: t.Dict[str, str]) -> None:
178178

179179
@property
180180
def kernel_spec(self) -> t.Optional[kernelspec.KernelSpec]:
181-
if self._kernel_spec is None and self.kernel_name != "": # noqa
181+
if self._kernel_spec is None and self.kernel_name != "":
182182
self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
183183
return self._kernel_spec
184184

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ test = "mypy --install-types --non-interactive {args:.}"
111111
dependencies = [
112112
"black[jupyter]==23.3.0",
113113
"mdformat>0.7",
114-
"ruff==0.0.270",
114+
"ruff==0.0.276",
115115
]
116116
[tool.hatch.envs.lint.scripts]
117117
style = [
@@ -249,6 +249,8 @@ ignore = [
249249
"S110",
250250
# PLW0603 Using the global statement to update
251251
"PLW0603",
252+
# Mutable class attributes should be annotated with `typing.ClassVar`
253+
"RUF012",
252254
]
253255
unfixable = [
254256
# Don't touch print statements

tests/test_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_default_version():
2020

2121
def test_code_to_line_no_code():
2222
line, pos = code_to_line("", 0)
23-
assert line == "" # noqa
23+
assert line == ""
2424
assert pos == 0
2525

2626

tests/test_jsonutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __float__(self):
3434

3535
def test_parse_date_invalid():
3636
assert jsonutil.parse_date(None) is None
37-
assert jsonutil.parse_date("") == "" # noqa
37+
assert jsonutil.parse_date("") == ""
3838
assert jsonutil.parse_date("invalid-date") == "invalid-date"
3939

4040

0 commit comments

Comments
 (0)