Skip to content

Commit

Permalink
chore: use ruff fmt (#23)
Browse files Browse the repository at this point in the history
* chore: use ruff fmt

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* ci: drop pre-commit job in favor of pre-commit.ci

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Apr 1, 2024
1 parent b840675 commit 4c57cfd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 36 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,9 @@ env:
FORCE_COLOR: 3

jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: pre-commit/action@v3.0.1
with:
extra_args: --hook-stage manual --all-files

checks:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
needs: [pre-commit]
strategy:
fail-fast: false
matrix:
Expand Down
27 changes: 8 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@ ci:
autofix_commit_msg: "style: pre-commit fixes"

repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: "23.10.1"
hooks:
- id: black-jupyter

- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
hooks:
- id: blacken-docs
additional_dependencies: [black==23.*]
additional_dependencies: [black==24.*]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
Expand All @@ -30,29 +25,23 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
args: [--prose-wrap=always]
exclude: '^src/validate_pyproject_schema_store/resources/.*\.json'

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.3"
rev: "v0.3.4"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.6.1"
rev: "v1.9.0"
hooks:
- id: mypy
files: src|tests|tools
Expand All @@ -71,7 +60,7 @@ repos:
args: ["-Lcrate"]

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.9.0.6"
rev: "v0.10.0.1"
hooks:
- id: shellcheck

Expand All @@ -84,12 +73,12 @@ repos:
exclude: .pre-commit-config.yaml

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
rev: v0.16
hooks:
- id: validate-pyproject

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.0
rev: 0.28.1
hooks:
- id: check-dependabot
- id: check-github-workflows
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ extend-select = [
]
ignore = [
"PLR", # Design related pylint codes
# "ISC001", # Conflicts with formatter
"ISC001", # Conflicts with formatter
]
isort.required-imports = ["from __future__ import annotations"]

Expand Down
1 change: 0 additions & 1 deletion src/validate_pyproject_schema_store/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
validate-pyproject-schema-store: A plugin set for validate-pyproject and schema-store.
"""


from __future__ import annotations

0 comments on commit 4c57cfd

Please sign in to comment.