diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db202634..2c4f8f98 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,11 @@ repos: - id: end-of-file-fixer exclude_types: [json, binary] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.9" + rev: "v0.1.15" + hooks: + - id: ruff-format + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: "v0.1.15" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index bceca2f7..c504def8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ docs = [ "sphinx_rtd_theme", "numpydoc" ] -dev = ["pre-commit>=3.6.0", "black", "ruff"] +dev = ["pre-commit>=3.6.0", "ruff"] [project.urls] @@ -67,30 +67,21 @@ build.targets.wheel.packages = ["src/elisa"] [[tool.hatch.envs.all.matrix]] python = ["3.9", "3.10", "3.11"] - -[tool.black] -target-version = ["py39"] -line-length = 79 -skip-string-normalization = true - - [tool.ruff] format.quote-style = "single" target-version = "py39" line-length = 79 -select = ["F", "I", "E", "W", "YTT", "B", "Q", "PLE", "PLR", "PLW", "UP"] -ignore = [ - "E741", # Allow ambiguous variable names - "PLR0911", # Allow many return statements - "PLR0913", # Allow many arguments to functions - "PLR0915", # Allow many statements - "PLR2004", # Allow magic numbers in comparisons -] -unfixable = [ - "F401", # Don't touch unused imports +select = [ + "E", # pycodestyle errors + "W", # pycodestyle warnings + "F", # pyflakes + "I", # isort + "C", # flake8-comprehensions + "B", # flake8-bugbear + "UP", # pyupgrade ] +extend-select = ["Q"] extend-include = ["*.ipynb"] -exclude = [] isort.known-first-party = ["elisa"] isort.combine-as-imports = true