Fix vermin checks

entities2
Ivan Habunek 2023-06-26 16:42:23 +02:00
rodzic f3439ad30d
commit 3cd13f6885
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: CDBD63C43A30BB95
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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

Wyświetl plik

@ -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: