Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from pylint, flake8, isort and black to ruff #437

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/on_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
lint:
name: Lint
name: Lint and Format
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
Expand All @@ -32,12 +32,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -r requirements/base.txt -r requirements/style.txt
- name: Run flake8
- name: Run ruff
run: |
flake8 src/ tests/
- name: Run pylint
run: |
pylint src/ tests/
ruff check .
test:
name: Test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.issue.pull_request.html_url }}
run: |
gh pr comment $PR --body 'The "Tests [Docker]" workflow will be started.'
gh pr comment $PR --body 'Running "Tests [Docker]" workflow.'
unit-tests:
name: Unit tests
Expand Down
42 changes: 7 additions & 35 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ default_stages: [commit]
fail_fast: true
default_language_version:
python: python3.12
ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand All @@ -16,39 +18,9 @@ repos:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: pyupgrade
args: ['--py38-plus']
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
args: ['--safe']
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==23.12.1
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-isort==6.1.1
- flake8-bugbear==24.1.17
- flake8-pyi==24.1.0
- flake8-quotes==3.3.2
- flake8-implicit-str-concat==0.4.0
- flake8-pyproject==1.2.3
args: ['--toml-config=pyproject.toml']
- repo: https://github.com/PyCQA/pylint
rev: v3.0.3
hooks:
- id: pylint
- id: ruff
- id: ruff-format
Loading