Skip to content

Commit

Permalink
replace flake8 with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
dbatten5 committed Apr 21, 2023
1 parent 51d6fb5 commit 327b373
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
8 changes: 0 additions & 8 deletions {{cookiecutter.project_name}}/.flake8

This file was deleted.

7 changes: 3 additions & 4 deletions {{cookiecutter.project_name}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ repos:
language: system
types: [text]
stages: [commit, push, manual]
- id: flake8
name: flake8
entry: flake8
- id: ruff
name: ruff
entry: ruff
language: system
types: [python]
require_serial: true
args: [--darglint-ignore-regex, .*]
- id: isort
name: isort
entry: isort
Expand Down
5 changes: 1 addition & 4 deletions {{cookiecutter.project_name}}/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ def precommit(session: Session) -> None:
"bandit",
"black",
"darglint",
"flake8",
"flake8-bugbear",
"flake8-docstrings",
"flake8-rst-docstrings",
"ruff",
"isort",
"pep8-naming",
"pre-commit",
Expand Down
24 changes: 20 additions & 4 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ bandit = ">=1.7.4"
black = ">=21.10b0"
coverage = {extras = ["toml"], version = ">=6.2"}
darglint = ">=1.8.1"
flake8 = ">=4.0.1"
flake8-bugbear = ">=21.9.2"
flake8-docstrings = ">=1.6.0"
flake8-rst-docstrings = ">=0.2.5"
ruff = ">=0.0.262"
furo = ">=2021.11.12"
isort = ">=5.10.1"
mypy = ">=0.930"
Expand Down Expand Up @@ -77,6 +74,25 @@ pretty = true
show_column_numbers = true
show_error_context = true

[tool.ruff]
ignore = ["E501"]
line-length = 80
select = [
"B",
"B9",
"C",
"D",
"E",
"F",
"N",
"W",
]

[tool.ruff.mccabe]
max-complexity = 10

[tool.ruff.pydocstyle]
convention = "google"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 327b373

Please sign in to comment.