diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9a41f2..b13d2a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: pytest - name: Validate minimum required version run: | - vermin --target=3.6 --no-tips . + vermin --target=3.7 --no-tips . - name: Check style run: | flake8 diff --git a/Makefile b/Makefile index cafe213..2b0db11 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ publish : test: pytest -v flake8 - vermin --target=3.6 --no-tips --violations --exclude-regex venv/.* . + vermin --target=3.7 --no-tips --violations --exclude-regex venv/.* . coverage: coverage erase diff --git a/toot/typing_compat.py b/toot/typing_compat.py index 87c53c4..0c6fe5d 100644 --- a/toot/typing_compat.py +++ b/toot/typing_compat.py @@ -38,8 +38,8 @@ __description__ = 'Python typing compatibility library' try: # Python >=3.8 should have these functions already - from typing import get_args as _get_args - from typing import get_origin as _get_origin + from typing import get_args as _get_args # novermin + from typing import get_origin as _get_origin # novermin except ImportError: if hasattr(typing, '_GenericAlias'): # Python 3.7 @@ -85,8 +85,8 @@ except ImportError: while tp.__origin__ is not None: tp = tp.__origin__ return _resolve_via_mro(tp) - elif hasattr(typing, '_Literal') and isinstance(tp, typing._Literal): - return typing.Literal + elif hasattr(typing, '_Literal') and isinstance(tp, typing._Literal): # novermin + return typing.Literal # novermin def _normalize_arg(args): if isinstance(args, tuple) and len(args) > 1: