Skip to content

Commit

Permalink
Drop unmaintained pytest-flake8
Browse files Browse the repository at this point in the history
Just call `flake8` instead.

See
- tholo/pytest-flake8#98
- tholo/pytest-flake8#92
  • Loading branch information
gentooboontoo committed Nov 19, 2023
1 parent dcf0d51 commit f5e257d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ clean:
rm -fr *.egg-info

lint:
$(PYTEST) --flake8 -m flake8 $(PROJECT_NAME)
$(FLAKE8) $(PROJECT_NAME)
$(PYTEST) --isort -m isort $(PROJECT_NAME)

fix:
Expand Down
1 change: 1 addition & 0 deletions Makefile.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PROJECT_NAME = pygal
# Python env
PYTHON_VERSION ?= python
VENV = $(PWD)/.env$(if $(filter $(PYTHON_VERSION),python),,-$(PYTHON_VERSION))
FLAKE8 = $(VENV)/bin/flake8
PIP = $(VENV)/bin/pip
PYTHON = $(VENV)/bin/python
PYTEST = $(VENV)/bin/py.test
Expand Down
7 changes: 4 additions & 3 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ The pygal code tries to respect the `pep8 <https://www.python.org/dev/peps/pep-0
Testing
=======

Before submiting a pull request, please check that all tests still pass.
Before submiting a pull request, please check that linting and all tests still pass.


To do this install ``py.test`` and them run ``py.test`` in the root of your pygal clone:
To do this launch `make install` and then run in the root of your pygal clone:

.. code-block:: bash
[dev@dev pygal/]$ py.test --flake8
[dev@dev pygal/]$ make check
[dev@dev pygal/]$ make lint
Even better if you have several python versions installed you can run ``tox``.
Expand Down
10 changes: 4 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ universal = 1
[pycodestyle]
ignore = E731,E402,E741,W503

[tool:pytest]
flake8-ignore =
*.py E731 E402 E741 W503 W504
pygal/__init__.py F401
pygal/_compat.py F821 F401
docs/conf.py ALL
[flake8]
per-file-ignores =
*.py:E731 E741
pygal/__init__.py:E402 F401
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def run_tests(self):
tests_requirements = [
"pyquery", "flask", cairosvg, 'lxml', 'pygal_maps_world', 'pygal_maps_fr',
'pygal_maps_ch', 'coveralls',
'pytest-runner', 'pytest-cov', 'pytest-flake8', 'pytest-isort',
'flake8',
'pytest-runner', 'pytest-cov', 'pytest-isort',
'pytest'
]

Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ envlist = py36,py37,py38,py39,pypy

[testenv]
deps =
flake8
pytest
pytest-flake8
coverage
lxml
pyquery
Expand All @@ -14,5 +14,6 @@ setenv =
COVERAGE_FILE=.cov-{envname}

commands =
coverage run --source=pygal {envbindir}/py.test {posargs:pygal/test} --junitxml=junit-{envname}.xml --flake8
coverage run --source=pygal {envbindir}/py.test {posargs:pygal/test} --junitxml=junit-{envname}.xml
coverage xml -o coverage-{envname}.xml
flake8 pygal

0 comments on commit f5e257d

Please sign in to comment.