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:
parent
f3439ad30d
commit
3cd13f6885
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -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
|
||||
|
2
Makefile
2
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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user