From d5cf916571cb66d6e1e29c30550c8b8aa7718c56 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 15 May 2022 23:45:41 -0500 Subject: fix lint and enable coverage reports --- .github/workflows/ci-tests.yml | 24 ++++++++++++------------ src/paste/deploy/util.py | 6 +++--- tox.ini | 3 +-- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 7ada44c..a7a717d 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -45,19 +45,19 @@ jobs: - run: pip install tox - name: Running tox run: tox -e py - # coverage: - # runs-on: ubuntu-latest - # name: Validate coverage - # steps: - # - uses: actions/checkout@v2 - # - name: Setup python 3.10 - # uses: actions/setup-python@v2 - # with: - # python-version: "3.10" - # architecture: x64 + coverage: + runs-on: ubuntu-latest + name: Validate coverage + steps: + - uses: actions/checkout@v2 + - name: Setup python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + architecture: x64 - # - run: pip install tox - # - run: tox -e py310,coverage + - run: pip install tox + - run: tox -e py310,coverage docs: runs-on: ubuntu-latest name: Build the documentation diff --git a/src/paste/deploy/util.py b/src/paste/deploy/util.py index f8ce2aa..a9c20d6 100644 --- a/src/paste/deploy/util.py +++ b/src/paste/deploy/util.py @@ -4,10 +4,10 @@ import inspect import sys try: - import importlib.metadata as importlib_metadata -except ImportError: + import importlib.metadata as importlib_metadata # noqa F401 +except ImportError: # pragma: no cover # bw-compat shim for py37 - import importlib_metadata + import importlib_metadata # noqa F401 def fix_type_error(exc_info, callable, varargs, kwargs): diff --git a/tox.ini b/tox.ini index 18f23f6..4b9996b 100644 --- a/tox.ini +++ b/tox.ini @@ -17,8 +17,7 @@ setenv = [testenv:coverage] commands = coverage combine - coverage xml - coverage report --fail-under=100 + coverage report deps = coverage setenv = -- cgit v1.2.1