From 83f7bc77e4daeab70e19e29a1ed1ba4bcabff9e1 Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Mon, 8 May 2023 11:22:48 -0500 Subject: Replace flake8 with ruff --- .pre-commit-config.yaml | 7 +++---- pyproject.toml | 7 +++++++ setup.cfg | 16 ---------------- 3 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 setup.cfg diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bded4e8..998da61 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,11 +16,10 @@ repos: rev: 5.12.0 hooks: - id: isort - - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.265 hooks: - - id: flake8 - additional_dependencies: [flake8-comprehensions] + - id: ruff - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.2.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index a0e89c5..87cc72b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -156,3 +156,10 @@ known_first_party = ['tests'] [tool.mypy] ignore_missing_imports = true + + +[tool.ruff] +format = 'grouped' +line-length = 120 +select = ['C4','C90', 'E', 'F'] +ignore = ['B023'] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 843f922..0000000 --- a/setup.cfg +++ /dev/null @@ -1,16 +0,0 @@ -[flake8] -max_line_length = 120 -select = E,F,W,C4,C90 -exclude = __pycache__,.tox,.venv,build,dist -# Defer these rules to black: -ignore = - # whitespace before ':' - E203 - # missing whitespace around operator - E225 - # line too long - E501 - # line break before binary operator - W503 - # line break after binary operator - W504 -- cgit v1.2.1