Debian Codegraph @

Makefile

raw
1 .PHONY: default style types tests coverage maxi_cov build clean
2
3 export PYTHONASYNCIODEBUG=1
4 export PYTHONPATH=src
5 export PYTHONWARNINGS=default
6
7 # Work around https://github.com/python/cpython/issues/128384. This prevents
8 # a test failure in the legacy implementation on free-threaded Python.
9 # Remove when dropping the legacy implementation.
10 # Also remove -X context_aware_warnings=0 in tox.ini.
11 export PYTHON_CONTEXT_AWARE_WARNINGS=0
12
13 build:
14 python setup.py build_ext --inplace
15
16 spell:
17 codespell --write-changes compliance src docs tests
18
19 style:
20 ruff format compliance docs src tests
21 ruff check --fix compliance docs src tests
22
23 types:
24 mypy --strict src
25
26 tests:
27 python -m unittest
28
29 coverage:
30 coverage run --source src/websockets,tests -m unittest
31 coverage html
32 coverage report --show-missing --fail-under=100
33
34 maxi_cov:
35 python tests/maxi_cov.py
36 coverage html
37 coverage report --show-missing --fail-under=100
38
39 clean:
40 find src -name '*.so' -delete
41 find . -name '*.pyc' -delete
42 find . -name __pycache__ -delete
43 rm -rf .coverage .mypy_cache build compliance/reports dist docs/_build htmlcov MANIFEST src/websockets.egg-info