From 9879a521430f382beb0a30dce1c680a080aaac00 Mon Sep 17 00:00:00 2001 From: Fred <323546+fguillot@users.noreply.github.com> Date: Tue, 24 Mar 2026 17:33:29 -0700 Subject: [PATCH] chore(ci): remove redundant flake8 and configure ruff explicitly Ruff already covers flake8's rules, so drop flake8 from the linters workflow. Add explicit ruff lint rule selection and dev optional dependencies to pyproject.toml. Fix import order in tests. --- .github/workflows/linters.yml | 4 +--- pyproject.toml | 9 +++++++++ tests/test_kanboard.py | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index d8c17fe..e176e2d 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -15,8 +15,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install ruff flake8 + pip install ruff - name: Run Ruff run: ruff check --output-format=github . - - name: Run Flake8 - run: flake8 --max-line-length 120 diff --git a/pyproject.toml b/pyproject.toml index a3ee48e..07c8f6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,9 @@ classifiers = [ "Programming Language :: Python :: 3 :: Only", ] +[project.optional-dependencies] +dev = ["ruff"] + [project.urls] "Homepage" = "https://github.com/kanboard/python-api-client" "Bug Reports" = "https://github.com/kanboard/python-api-client/issues" @@ -25,3 +28,9 @@ classifiers = [ [build-system] requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" + +[tool.ruff] +line-length = 120 + +[tool.ruff.lint] +select = ["E", "F", "W", "I"] \ No newline at end of file diff --git a/tests/test_kanboard.py b/tests/test_kanboard.py index 816fb61..08c3be7 100644 --- a/tests/test_kanboard.py +++ b/tests/test_kanboard.py @@ -20,10 +20,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -import unittest -from unittest import mock import types +import unittest import warnings +from unittest import mock import kanboard