Skip to content

Commit

Permalink
Replace black with ruff (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
sujuka99 committed Nov 8, 2023
1 parent a86375f commit 72594f9
Show file tree
Hide file tree
Showing 19 changed files with 608 additions and 621 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ jobs:
echo "::add-matcher::.github/ruff-matcher.json"
poetry run ruff check . --config pyproject.toml --output-format text --no-fix
else
poetry run pre-commit run ruff --all-files --show-diff-on-failure
poetry run pre-commit run ruff-lint --all-files --show-diff-on-failure
fi;
- name: Formatting (black)
run: poetry run pre-commit run black --all-files --show-diff-on-failure
- name: Formatting (ruff)
run: poetry run pre-commit run ruff-format --all-files --show-diff-on-failure

- name: Typing (pyright)
run: poetry run pre-commit run pyright --all-files
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
poetry-version: "1.5.1"
changelog: true
changelog-config: "./.github/changelog-config.json"
changelog-file: "./docs/docs/user/changelog.md"
secrets:
github-username: "${{ secrets.GH_USERNAME }}"
github-email: "${{ secrets.GH_EMAIL }}"
Expand Down
21 changes: 11 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
repos:
- repo: local
hooks:
- id: ruff
name: ruff
entry: ruff check .
args: [ --config, pyproject.toml, --fix, --show-fixes, --exit-non-zero-on-fix ]
- id: ruff-lint
name: ruff-lint
entry: ruff check
args: [ --force-exclude, --config, pyproject.toml, --fix, --show-fixes, --exit-non-zero-on-fix ]
language: system
types_or: [python]
require_serial: true # run once for all files
pass_filenames: false
- id: black
name: black
entry: black
- id: ruff-format
name: ruff-format
entry: ruff format
args: [ --force-exclude, --config, pyproject.toml ]
language: system
types_or: [python, pyi]
types_or: [python]
require_serial: true # run once for all files
exclude: ^tests/.*snapshots/
- id: pyright
name: pyright
entry: pyright
Expand All @@ -38,13 +37,15 @@ repos:
types: [python]
require_serial: true
exclude: ^tests/.*snapshots/
pass_filenames: false
- id: gen-docs-env-vars
name: gen-docs-env-vars
entry: python hooks/gen_docs/gen_docs_env_vars.py
language: system
types: [python]
require_serial: true
exclude: ^tests/.*snapshots/
pass_filenames: false
- id: gen-docs-components
name: gen-docs-components
entry: python hooks/gen_docs/gen_docs_components.py
Expand Down
Loading

0 comments on commit 72594f9

Please sign in to comment.