diff --git a/scripts/coverage b/scripts/coverage index 8846cf08c7..3207d9719c 100755 --- a/scripts/coverage +++ b/scripts/coverage @@ -8,4 +8,4 @@ export SOURCE_FILES="uvicorn tests" set -x -${PREFIX}coverage report --show-missing --skip-covered --fail-under=97 +${PREFIX}coverage report --show-missing --skip-covered --fail-under=96.77 diff --git a/setup.cfg b/setup.cfg index 46dd82a182..58832b22d9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -71,7 +71,11 @@ include = uvicorn/*, tests/* plugins = coverage_conditional_plugin +[coverage:report] +precision = 2 + [coverage:coverage_conditional_plugin] rules = "sys_platform == 'win32'": py-win32 "sys_version_info >= (3, 8)": py-gte-38 + "sys_version_info < (3, 8)": py-lt-38 diff --git a/tests/test_config.py b/tests/test_config.py index 05a126ddb6..cce3862197 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -10,7 +10,7 @@ if sys.version_info < (3, 8): # pragma: py-gte-38 from typing_extensions import Literal -else: +else: # pragma: py-lt-38 from typing import Literal import pytest diff --git a/uvicorn/config.py b/uvicorn/config.py index fbc8462d17..40a431e80b 100644 --- a/uvicorn/config.py +++ b/uvicorn/config.py @@ -14,7 +14,7 @@ if sys.version_info < (3, 8): # pragma: py-gte-38 from typing_extensions import Literal -else: +else: # pragma: py-lt-38 from typing import Literal import click