diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7de3922..114d43b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,5 +33,8 @@ jobs: pip3 --version pip3 install setuptools tox - - name: Run tox + - name: Run pytest run: tox -e py + + - name: Run flake8 + run: tox -e flake8 diff --git a/MANIFEST.in b/MANIFEST.in index 243f0e5..c80189b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,4 @@ include README.rst include LICENSE -include requirements_dev.txt include tox.ini include Makefile diff --git a/pyproject.toml b/pyproject.toml index f4bac66..be506b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,9 +23,15 @@ classifiers = [ Homepage = "https://github.com/mivade/argparse_dataclass" [project.optional-dependencies] -dev = ["black", "flake8", "tox", "pytest", "build"] +dev = ["black", "flake8", "flake8-pyproject", "tox", "pytest", "build"] [build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" +[tool.flake8] +# Recommended by black +max-line-length = 88 +extend-ignore = [ + "E501", # line too long, even for constants - incompatible with black +] diff --git a/requirements_dev.txt b/requirements_dev.txt deleted file mode 100644 index 69b3e34..0000000 --- a/requirements_dev.txt +++ /dev/null @@ -1,5 +0,0 @@ -black -flake8 -tox -pytest -build diff --git a/tox.ini b/tox.ini index 586e5cb..a417cf6 100644 --- a/tox.ini +++ b/tox.ini @@ -4,11 +4,10 @@ envlist = py39, py310, py311, py312, py313 # isolated_build = True [testenv] -deps = - -r {toxinidir}/requirements_dev.txt +extras = dev commands = python -m doctest argparse_dataclass.py pytest -commands_post = - black --check argparse_dataclass.py - black --check tests + +[testenv:flake8] +commands = flake8 {posargs}