Skip to content

Commit

Permalink
chore: update pre-commit hooks (#385)
Browse files Browse the repository at this point in the history
* chore: update pre-commit hooks

updates:
- [github.com/python-jsonschema/check-jsonschema: 0.27.0 → 0.27.1](python-jsonschema/check-jsonschema@0.27.0...0.27.1)
- [github.com/astral-sh/ruff-pre-commit: v0.1.3 → v0.1.4](astral-sh/ruff-pre-commit@v0.1.3...v0.1.4)

* update ruff

---------

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 authored Nov 9, 2023
1 parent b01164b commit f278351
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.0
rev: 0.27.1
hooks:
- id: check-github-workflows

Expand Down Expand Up @@ -65,11 +65,15 @@ repos:
["jsonschema>=2.6", "traitlets>=5.13", "jupyter_core>5.4"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: v0.1.5
hooks:
- id: ruff
types_or: [python, jupyter]
exclude: "tests/.*.ipynb"
args: ["--fix", "--show-fixes"]
- id: ruff-format
exclude: "tests/.*.ipynb"
types_or: [python, jupyter]

- repo: https://github.com/scientific-python/cookie
rev: "2023.10.27"
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ nowarn = "test -W default {args}"
detached = true
dependencies = ["pre-commit"]
[tool.hatch.envs.lint.scripts]
build = "pre-commit run --all-files ruff"
build = [
"pre-commit run --all-files ruff",
"pre-commit run --all-files ruff-format"
]

[tool.hatch.envs.typing]
dependencies = [ "pre-commit"]
Expand Down Expand Up @@ -136,7 +139,6 @@ disable_error_code = ["no-untyped-def", "no-untyped-call"]
warn_unreachable = true

[tool.ruff]
target-version = "py38"
line-length = 100

[tool.ruff.format]
Expand Down
2 changes: 1 addition & 1 deletion tests/test4custom.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"import IPython\n",
"\n",
"bundle = {}\n",
"bundle['application/vnd.raw.v1+json'] = {'apples': ['🍎', '🍏'], 'bananas': 2, 'oranges': 'apples'}\n",
"bundle[\"application/vnd.raw.v1+json\"] = {\"apples\": [\"🍎\", \"🍏\"], \"bananas\": 2, \"oranges\": \"apples\"}\n",
"\n",
"IPython.display.display(bundle, raw=True)"
]
Expand Down

0 comments on commit f278351

Please sign in to comment.