Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#373)
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 <steven.silvester@ieee.org>
  • Loading branch information
pre-commit-ci[bot] and blink1073 committed Aug 1, 2023
1 parent bc4d3b8 commit a3e787d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 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.2
rev: 0.23.3
hooks:
- id: check-github-workflows

Expand All @@ -30,12 +30,12 @@ repos:
- id: mdformat

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.276
rev: v0.0.281
hooks:
- id: ruff
args: ["--fix"]
Expand Down
7 changes: 3 additions & 4 deletions nbformat/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,9 @@ def validate( # noqa
version = nbdict_version
if version_minor is None:
version_minor = nbdict_version_minor
else:
# if ref is specified, and we don't have a version number, assume we're validating against 1.0
if version is None: # noqa
version, version_minor = 1, 0
# if ref is specified, and we don't have a version number, assume we're validating against 1.0
elif version is None:
version, version_minor = 1, 0

if ref is None:
assert isinstance(version, int) # noqa
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ dependencies = ["mypy>=0.990"]
test = "mypy --install-types --non-interactive {args:nbformat tests}"

[tool.hatch.envs.lint]
dependencies = ["black[jupyter]==23.3.0", "mdformat>0.7", "ruff==0.0.276"]
dependencies = ["black[jupyter]==23.3.0", "mdformat>0.7", "ruff==0.0.281"]
detached = true
[tool.hatch.envs.lint.scripts]
style = [
Expand Down
4 changes: 1 addition & 3 deletions tests/v4/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ def test_base_version_matches_latest(self):
with open(
os.path.join(
BASE_PATH,
"nbformat.v{major}.{minor}.schema.json".format(
major=nbformat, minor=nbformat_minor
),
f"nbformat.v{nbformat}.{nbformat_minor}.schema.json",
),
encoding='utf-8',
) as schema_file: # noqa
Expand Down

0 comments on commit a3e787d

Please sign in to comment.