From cb903a7589ae23f4a0358195504da0b1d2223f2f Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Wed, 21 Jan 2026 13:24:33 +0100 Subject: [PATCH 1/2] chore: remove unused import of click from plugin.py --- plugins/tutor-contrib-ltistore/tutor_ltistore/plugin.py | 1 - plugins/tutor-contrib-paragon/tutorparagon/plugin.py | 1 - 2 files changed, 2 deletions(-) diff --git a/plugins/tutor-contrib-ltistore/tutor_ltistore/plugin.py b/plugins/tutor-contrib-ltistore/tutor_ltistore/plugin.py index 98e636d..c9e8824 100644 --- a/plugins/tutor-contrib-ltistore/tutor_ltistore/plugin.py +++ b/plugins/tutor-contrib-ltistore/tutor_ltistore/plugin.py @@ -1,7 +1,6 @@ import os from glob import glob -import click import importlib_resources from tutor import hooks diff --git a/plugins/tutor-contrib-paragon/tutorparagon/plugin.py b/plugins/tutor-contrib-paragon/tutorparagon/plugin.py index e53ff4a..f64ba64 100644 --- a/plugins/tutor-contrib-paragon/tutorparagon/plugin.py +++ b/plugins/tutor-contrib-paragon/tutorparagon/plugin.py @@ -1,7 +1,6 @@ import os from glob import glob -import click import importlib_resources from tutor import hooks from tutor import config as tutor_config From 29a1797957673873619415ea664d17bc57c803a7 Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Wed, 21 Jan 2026 13:24:46 +0100 Subject: [PATCH 2/2] chore: replace black and pylint with ruff for code formatting and linting --- plugins/tutor-contrib-ltistore/Makefile | 11 +++++------ plugins/tutor-contrib-paragon/Makefile | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/plugins/tutor-contrib-ltistore/Makefile b/plugins/tutor-contrib-ltistore/Makefile index 4a3ef81..48cd1a7 100644 --- a/plugins/tutor-contrib-ltistore/Makefile +++ b/plugins/tutor-contrib-ltistore/Makefile @@ -1,25 +1,24 @@ .DEFAULT_GOAL := help .PHONY: docs SRC_DIRS = ./tutor_ltistore -BLACK_OPTS = --exclude templates ${SRC_DIRS} # Warning: These checks are not necessarily run on every PR. test: test-lint test-types test-format # Run some static checks. test-format: ## Run code formatting tests - black --check --diff $(BLACK_OPTS) + ruff format --check --diff $(SRC_DIRS) test-lint: ## Run code linting tests - pylint --errors-only --enable=unused-import,unused-argument --ignore=templates --ignore=docs/_ext ${SRC_DIRS} + ruff check ${SRC_DIRS} test-types: ## Run type checks. mypy --exclude=templates --ignore-missing-imports --implicit-reexport --strict ${SRC_DIRS} format: ## Format code automatically - black $(BLACK_OPTS) + ruff format ${SRC_DIRS} -isort: ## Sort imports. This target is not mandatory because the output may be incompatible with black formatting. Provided for convenience purposes. - isort --skip=templates ${SRC_DIRS} +fix-lint: ## Fix lint errors automatically + ruff check --fix ${SRC_DIRS} ESCAPE =  help: ## Print this help diff --git a/plugins/tutor-contrib-paragon/Makefile b/plugins/tutor-contrib-paragon/Makefile index 4a5917d..c34f317 100644 --- a/plugins/tutor-contrib-paragon/Makefile +++ b/plugins/tutor-contrib-paragon/Makefile @@ -1,25 +1,24 @@ .DEFAULT_GOAL := help .PHONY: docs SRC_DIRS = ./tutorparagon -BLACK_OPTS = --exclude templates ${SRC_DIRS} # Warning: These checks are not necessarily run on every PR. test: test-lint test-types test-format # Run some static checks. test-format: ## Run code formatting tests - black --check --diff $(BLACK_OPTS) + ruff format --check --diff $(SRC_DIRS) test-lint: ## Run code linting tests - pylint --errors-only --enable=unused-import,unused-argument --ignore=templates --ignore=docs/_ext ${SRC_DIRS} + ruff check ${SRC_DIRS} test-types: ## Run type checks. mypy --exclude=templates --ignore-missing-imports --implicit-reexport --strict ${SRC_DIRS} format: ## Format code automatically - black $(BLACK_OPTS) + ruff format ${SRC_DIRS} -isort: ## Sort imports. This target is not mandatory because the output may be incompatible with black formatting. Provided for convenience purposes. - isort --skip=templates ${SRC_DIRS} +fix-lint: ## Fix lint errors automatically + ruff check --fix ${SRC_DIRS} unittest: ## Run code tests cases pytest tests --ignore=tests/integration