From de4d3798df5aa92d791e7dbf0c74c46bfde56b07 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sat, 16 Mar 2024 11:45:58 +0100 Subject: [PATCH] Use ruff instead of flake8 and isort --- .github/workflows/tests.yml | 4 +--- pyproject.toml | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1a1b267..fb28ac8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,6 +22,4 @@ jobs: - name: Launch tests run: python -m pytest - name: Check coding style - run: python -m flake8 - - name: Check imports order - run: python -m isort . --check --diff + run: python -m ruff check diff --git a/pyproject.toml b/pyproject.toml index b77b7a3..7f116b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ Donation = 'https://opencollective.com/courtbouillon' [project.optional-dependencies] doc = ['sphinx', 'sphinx_rtd_theme'] -test = ['pytest', 'isort', 'flake8'] +test = ['pytest', 'ruff'] [tool.flit.sdist] exclude = ['.*'] @@ -54,6 +54,6 @@ include = ['tests/*', 'pyphen/*'] exclude_lines = ['pragma: no cover', 'def __repr__', 'raise NotImplementedError'] omit = ['.*'] -[tool.isort] -default_section = 'FIRSTPARTY' -multi_line_output = 4 +[tool.ruff.lint] +select = ['E', 'W', 'F', 'I', 'N', 'RUF'] +ignore = ['RUF001', 'RUF002', 'RUF003']