Skip to content

Commit

Permalink
Merge pull request #11 from JakobEliasWagner/bugfix/linters-pyproject…
Browse files Browse the repository at this point in the history
…-toml

Remove Flake8 and Add Ruff
  • Loading branch information
JakobEliasWagner authored Jan 19, 2024
2 parents 5803792 + 49ca741 commit c59d934
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ repos:
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.13
hooks:
- id: flake8
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand Down
38 changes: 35 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ version = "0.0.0"
dev = [
# --------- style --------- #
"black",
"flake8",
"ruff",
"isort",
# --------- linters --------- #
"pre-commit", # hooks for applying linters on commit
Expand Down Expand Up @@ -69,5 +69,37 @@ skip_glob = [
"venv/*",
]

[tool.flake8]
max_line_length = 119
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]

# Same as Black.
line-length = 119
indent-width = 4

0 comments on commit c59d934

Please sign in to comment.