MT#62763 Fix pycodestyle issues

- Replace python3-pytest-pep8 with pycodesetyle.
- Remove obsolete --pep8 option from pytest-3.

Warned-by: pycodestyle
Change-Id: I6a81e2a9d999597f0eccdeba048331db0cb3b1bb
master
Guillem Jover 7 months ago
parent f7250bd9ca
commit 18505bf166

@ -22,13 +22,18 @@ venv_dev: requirements/dev.txt
test: test_templates
RESULTS=$(RESULTS) pytest-3 -ra --junitxml=$(RESULTS)/junit.xml \
-o cache_dir=$(CACHE_DIR) \
--cov=. --cov-report=xml:$(RESULTS)/coverage.xml --cov-config=pyproject.toml \
--pep8
--cov=. \
--cov-report=xml:$(RESULTS)/coverage.xml \
--cov-config=pyproject.toml \
# EOL
test_pylint:
RESULTS=$(RESULTS) pytest-3 --junitxml=$(RESULTS)/junit.xml \
-o cache_dir=$(CACHE_DIR) \
--pylint --pylint-rcfile=pylint.cfg --pylint-jobs=4
--pylint \
--pylint-rcfile=pylint.cfg \
--pylint-jobs=4 \
# EOL
test_templates:
./manage.py validate_templates --settings="repoapi.settings.test"

@ -8,7 +8,8 @@ FROM docker.mgm.sipwise.com/sipwise-bookworm:latest
ENV REFRESHED_AT 2025-08-18
RUN apt-get update && apt-get install --assume-yes python3 python3-dev \
python3-pytest python3-pytest-pep8 \
pycodestyle \
python3-pytest \
python3-pytest-pylint python3-pytest-cov python3-junitxml \
python3-pip python3-venv sqlite3 git tmux iproute2 \
&& apt-get clean

@ -1,3 +1,6 @@
[pycodestyle]
ignore = W503
[pytest]
DJANGO_SETTINGS_MODULE = repoapi.settings.test
# -- recommended but optional:
@ -10,12 +13,8 @@ filterwarnings =
error::django.utils.deprecation.RemovedInNextVersionWarning:repoapi[.*]
#log_cli = true
#log_cli_level = DEBUG
pep8ignore = W503
cache_dir = ${RESULTS}/.__pycache__
[pep8]
ignore = W503
[coverage:run]
data_file = ${RESULTS}/.coverage
omit =

Loading…
Cancel
Save