File: Makefile

package info (click to toggle)
python-refurb 1.27.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,700 kB
  • sloc: python: 9,468; makefile: 40; sh: 6
file content (48 lines) | stat: -rw-r--r-- 759 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.PHONY: install ruff mypy black isort typos test test-e2e refurb docs

all: ruff mypy black isort typos test refurb docs

install:
	pip install -e .
	pip install -r dev-requirements.txt

ruff:
	ruff refurb test

mypy:
	mypy refurb
	mypy test --exclude "test/data*"

black:
	black refurb test --check --diff

isort:
	isort . --diff --check

typos:
	typos --format brief

test:
	pytest

test-e2e: install
	refurb test/e2e/dummy.py

refurb:
	refurb refurb test/*.py

test/%.txt: test/%.py
	refurb "$^" --enable-all --quiet --no-color > "$@" || true

update-tests: $(patsubst %.py,%.txt,$(wildcard test/data*/*.py))

docs:
	python3 -m docs.gen_checks

fmt:
	ruff refurb test --fix
	isort .
	black refurb test

clean:
	rm -rf .mypy_cache .ruff_cache .pytest_cache