1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-11-03 04:17:21 -05:00

Fix vermin checks

This commit is contained in:
Ivan Habunek 2023-06-26 16:42:23 +02:00
parent f3439ad30d
commit 3cd13f6885
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
3 changed files with 6 additions and 6 deletions

View File

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

View File

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

View File

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