Skip to content

Commit

Permalink
Add ruff to pre-commit config
Browse files Browse the repository at this point in the history
Commit 792848d migrated this project
from flake8 to ruff, but neglected to update the pre-commit config.

This commit does so. To test:

pip install pre-commit
pre-commit install
pre-commit run --all-files
  • Loading branch information
chosak committed Mar 17, 2023
1 parent 2ead99a commit c3b5512
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.1.0
hooks:
- id: black
args: ["wagtailinventory", "setup.py", "--line-length=79"]
exclude: migrations
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.254
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear==22.1.11]
- id: ruff
exclude: migrations
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
Expand Down
2 changes: 1 addition & 1 deletion wagtailinventory/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.db import migrations, models
from django.db.models import Min, Count
from django.db.models import Count, Min


def remove_duplicates(apps, schema_editor): # pragma: no cover
Expand Down
2 changes: 1 addition & 1 deletion wagtailinventory/tests/testapp/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models

from wagtail.core import blocks as core_blocks
from wagtail.core import fields as core_fields # pragma: no cover
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models

from wagtail.core import blocks as core_blocks
from wagtail.core import fields as core_fields # pragma: no cover
Expand Down

0 comments on commit c3b5512

Please sign in to comment.