Skip to content

Commit a3e787d

Browse files
[pre-commit.ci] pre-commit autoupdate (#373)
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 bc4d3b8 commit a3e787d

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
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.2
23+
rev: 0.23.3
2424
hooks:
2525
- id: check-github-workflows
2626

@@ -30,12 +30,12 @@ repos:
3030
- id: mdformat
3131

3232
- repo: https://github.com/psf/black
33-
rev: 23.3.0
33+
rev: 23.7.0
3434
hooks:
3535
- id: black
3636

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

nbformat/validator.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,9 @@ def validate( # noqa
474474
version = nbdict_version
475475
if version_minor is None:
476476
version_minor = nbdict_version_minor
477-
else:
478-
# if ref is specified, and we don't have a version number, assume we're validating against 1.0
479-
if version is None: # noqa
480-
version, version_minor = 1, 0
477+
# if ref is specified, and we don't have a version number, assume we're validating against 1.0
478+
elif version is None:
479+
version, version_minor = 1, 0
481480

482481
if ref is None:
483482
assert isinstance(version, int) # noqa

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ dependencies = ["mypy>=0.990"]
8686
test = "mypy --install-types --non-interactive {args:nbformat tests}"
8787

8888
[tool.hatch.envs.lint]
89-
dependencies = ["black[jupyter]==23.3.0", "mdformat>0.7", "ruff==0.0.276"]
89+
dependencies = ["black[jupyter]==23.3.0", "mdformat>0.7", "ruff==0.0.281"]
9090
detached = true
9191
[tool.hatch.envs.lint.scripts]
9292
style = [

tests/v4/test_json.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ def test_base_version_matches_latest(self):
115115
with open(
116116
os.path.join(
117117
BASE_PATH,
118-
"nbformat.v{major}.{minor}.schema.json".format(
119-
major=nbformat, minor=nbformat_minor
120-
),
118+
f"nbformat.v{nbformat}.{nbformat_minor}.schema.json",
121119
),
122120
encoding='utf-8',
123121
) as schema_file: # noqa

0 commit comments

Comments
 (0)