Skip to content

Commit

Permalink
Replace flake8 + black + isort with ruff (#411)
Browse files Browse the repository at this point in the history
ruff is a single tool and acts as a drop-in replacement for all these tools.
It's config is in one place, in pyproject.toml. And it's blazing fast!

This commit also removes tox and depends on GitHub actions for multi-env
testing.

Fixes #410
  • Loading branch information
subhashb authored May 8, 2024
1 parent 5859152 commit 731cfa1
Show file tree
Hide file tree
Showing 49 changed files with 160 additions and 486 deletions.
53 changes: 0 additions & 53 deletions .cookiecutterrc

This file was deleted.

22 changes: 0 additions & 22 deletions .editorconfig

This file was deleted.

20 changes: 0 additions & 20 deletions .flake8

This file was deleted.

29 changes: 8 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
repos:
- repo: https://github.com/psf/black
rev: 24.2.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.3
hooks:
- id: black
language_version: python3

- repo: [email protected]:PyCQA/autoflake.git
rev: v2.3.1
hooks:
- id: autoflake
args:
[
"--in-place",
"--remove-all-unused-imports",
"--ignore-init-module-imports",
]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--filter-files", "--quiet"]
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
2 changes: 1 addition & 1 deletion docs_src/guides/domain-definition/009.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class EmailValidator:
def __init__(self):
self.error = f"Invalid email address"
self.error = "Invalid email address"

def __call__(self, value):
"""Business rules of Email address"""
Expand Down
Loading

0 comments on commit 731cfa1

Please sign in to comment.