Skip to content

Commit

Permalink
Merge pull request #70 from cfpb/fix/precommit-ruff
Browse files Browse the repository at this point in the history
Add ruff to pre-commit config
  • Loading branch information
chosak committed Mar 27, 2023
2 parents 30d6fcf + c43d729 commit c331865
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 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://github.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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ and patterns in the existing code-base.

This project uses [`black`](https://github.com/psf/black) to format code,
[`isort`](https://github.com/timothycrosley/isort) to format imports,
and [`flake8`](https://gitlab.com/pycqa/flake8).
and [`ruff`](https://github.com/charliermarsh/ruff).

You can format code and imports by calling:

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

0 comments on commit c331865

Please sign in to comment.