Skip to content

Commit b9fba37

Browse files
committed
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.
1 parent 5899863 commit b9fba37

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/linters.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
- name: Install dependencies
1616
run: |
1717
python -m pip install --upgrade pip
18-
pip install ruff flake8
18+
pip install ruff
1919
- name: Run Ruff
2020
run: ruff check --output-format=github .
21-
- name: Run Flake8
22-
run: flake8 --max-line-length 120

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ classifiers = [
1717
"Programming Language :: Python :: 3 :: Only",
1818
]
1919

20+
[project.optional-dependencies]
21+
dev = ["ruff"]
22+
2023
[project.urls]
2124
"Homepage" = "https://github.com/kanboard/python-api-client"
2225
"Bug Reports" = "https://github.com/kanboard/python-api-client/issues"
@@ -25,3 +28,9 @@ classifiers = [
2528
[build-system]
2629
requires = ["setuptools>=61.0"]
2730
build-backend = "setuptools.build_meta"
31+
32+
[tool.ruff]
33+
line-length = 120
34+
35+
[tool.ruff.lint]
36+
select = ["E", "F", "W", "I"]

tests/test_kanboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
# THE SOFTWARE.
2222

23-
import unittest
24-
from unittest import mock
2523
import types
24+
import unittest
2625
import warnings
26+
from unittest import mock
2727

2828
import kanboard
2929

0 commit comments

Comments
 (0)