Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#954)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Steven Silvester <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and blink1073 authored Jul 7, 2023
1 parent 6dda5ad commit 508982f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.1
rev: 0.23.2
hooks:
- id: check-github-workflows

Expand All @@ -34,8 +34,8 @@ repos:
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.270
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.276
hooks:
- id: ruff
args: ["--fix"]
2 changes: 1 addition & 1 deletion jupyter_client/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def write_connection_file(
else:
N = 1
for _ in range(ports_needed):
while os.path.exists(f"{ip}-{str(N)}"):
while os.path.exists(f"{ip}-{N!s}"):
N += 1
ports.append(N)
N += 1
Expand Down
2 changes: 1 addition & 1 deletion jupyter_client/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _kernel_name_changed(self, change: t.Dict[str, str]) -> None:

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

Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ test = "mypy --install-types --non-interactive {args:.}"
dependencies = [
"black[jupyter]==23.3.0",
"mdformat>0.7",
"ruff==0.0.270",
"ruff==0.0.276",
]
[tool.hatch.envs.lint.scripts]
style = [
Expand Down Expand Up @@ -249,6 +249,8 @@ ignore = [
"S110",
# PLW0603 Using the global statement to update
"PLW0603",
# Mutable class attributes should be annotated with `typing.ClassVar`
"RUF012",
]
unfixable = [
# Don't touch print statements
Expand Down
2 changes: 1 addition & 1 deletion tests/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_default_version():

def test_code_to_line_no_code():
line, pos = code_to_line("", 0)
assert line == "" # noqa
assert line == ""
assert pos == 0


Expand Down
2 changes: 1 addition & 1 deletion tests/test_jsonutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __float__(self):

def test_parse_date_invalid():
assert jsonutil.parse_date(None) is None
assert jsonutil.parse_date("") == "" # noqa
assert jsonutil.parse_date("") == ""
assert jsonutil.parse_date("invalid-date") == "invalid-date"


Expand Down

0 comments on commit 508982f

Please sign in to comment.