Skip to content

Commit bdd2c17

Browse files
author
Fabien Coelho
committed
add ruff style check
1 parent 96c3502 commit bdd2c17

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Makefile

+9-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ F.pdf = $(F.md:%.md=%.pdf)
1212

1313
.PHONY: clean clean-venv
1414
clean:
15-
$(RM) -r __pycache__ *.egg-info dist build .mypy_cache .pytest_cache htmlcov
15+
$(RM) -r __pycache__ *.egg-info dist build .mypy_cache .pytest_cache htmlcov .ruff_cache
1616
$(RM) .coverage $(F.pdf)
1717
$(MAKE) -C docs clean
1818

@@ -47,10 +47,17 @@ check.pyright: venv
4747
source venv/bin/activate
4848
pyright $(MODULE).py
4949

50+
IGNORE = E227,E501
51+
5052
.PHONY: check.flake8
5153
check.flake8: venv
5254
source venv/bin/activate
53-
flake8 --ignore=E227,E501 $(MODULE).py
55+
flake8 --ignore=$(IGNORE) $(MODULE).py
56+
57+
.PHONY: check.ruff
58+
check.ruff: venv
59+
source venv/bin/activate
60+
ruff check --ignore=$(IGNORE) $(MODULE).py
5461

5562
.PHONY: check.black
5663
check.black: venv

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ package = "https://pypi.org/project/CacheToolsUtils/"
3030
py-modules = [ "CacheToolsUtils" ]
3131

3232
[project.optional-dependencies]
33-
dev = [ "mypy", "pyright", "black", "flake8", "pytest", "coverage", "pymarkdownlnt", "types-redis", "types-cachetools" ]
33+
dev = [ "mypy", "pyright", "black", "flake8", "ruff", "pytest", "coverage", "pymarkdownlnt", "types-redis", "types-cachetools" ]
3434
doc = [ "sphinx", "sphinx_rtd_theme", "sphinx-autoapi", "sphinx-lint", "myst_parser" ]
3535
tests = [ "pymemcache", "redis" ]
3636
pub = [ "build", "wheel", "twine" ]

0 commit comments

Comments
 (0)