Skip to content

Commit

Permalink
Add py-gte-38 coverage rule on import statements (#1348)
Browse files Browse the repository at this point in the history
* Add py-gte-38 coverage rule on import statement

* Add another import
  • Loading branch information
Kludex authored Feb 1, 2022
1 parent c4af0b7 commit 4c56024
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ plugins =
[coverage:coverage_conditional_plugin]
rules =
"sys_platform == 'win32'": py-win32
"sys_version_info >= (3, 8)": py-gte-38
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pathlib import Path
from unittest.mock import MagicMock

if sys.version_info < (3, 8):
if sys.version_info < (3, 8): # pragma: py-gte-38
from typing_extensions import Literal
else:
from typing import Literal
Expand Down
2 changes: 1 addition & 1 deletion uvicorn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from uvicorn.logging import TRACE_LOG_LEVEL

if sys.version_info < (3, 8):
if sys.version_info < (3, 8): # pragma: py-gte-38
from typing_extensions import Literal
else:
from typing import Literal
Expand Down

0 comments on commit 4c56024

Please sign in to comment.