This commit is contained in:
lilydjwg 2022-06-05 14:41:57 +08:00
parent ffe84cae08
commit 88cbdd925c
6 changed files with 6 additions and 6 deletions

View file

@ -18,7 +18,7 @@ jobs:
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-cache-pip-
- name: Install deps
run: pip3 install -U tornado pytest pytest-asyncio pytest-httpbin flaky structlog tomli aiohttp httpx mypy
run: pip3 install -U tornado pytest pytest-asyncio pytest-httpbin flaky structlog tomli aiohttp httpx mypy awesomeversion
- name: Run mypy for --install-types
run: PATH=$HOME/.local/bin:$PATH mypy nvchecker nvchecker_source tests
continue-on-error: true

View file

@ -45,7 +45,7 @@ jobs:
sudo apt install -y libcurl4-openssl-dev
# werkzeug is pinned for httpbin compatibility https://github.com/postmanlabs/httpbin/issues/673
- name: Install Python deps
run: pip install -U ${{ matrix.deps }} pytest pytest-asyncio pytest-httpbin flaky structlog tomli appdirs lxml 'werkzeug<2.1'
run: pip install -U ${{ matrix.deps }} pytest pytest-asyncio pytest-httpbin flaky structlog tomli appdirs lxml 'werkzeug<2.1' awesomeversion
- name: Decrypt keys
env:
KEY: ${{ secrets.KEY }}

View file

@ -311,7 +311,7 @@ def apply_list_options(
sort_version_key = sort_version_keys[
conf.get("sort_version_key", "parse_version")]
versions.sort(key=sort_version_key)
versions.sort(key=sort_version_key) # type: ignore
return versions[-1]

View file

@ -23,7 +23,7 @@ try:
from awesomeversion import AwesomeVersion
awesomeversion_available = True
except ImportError:
def AwesomeVersion(k):
def AwesomeVersion(k): # type: ignore
raise NotImplementedError("Using awesomeversion but it can not be imported!")
awesomeversion_available = False

View file

@ -126,7 +126,7 @@ def cmp() -> None:
from .sortversion import sort_version_keys
version = sort_version_keys[args.sort]
if version(oldver) > version(newver):
if version(oldver) > version(newver): # type: ignore
if args.newer:
continue # don't store this diff
diff['delta'] = 'old'

View file

@ -194,7 +194,7 @@ class AsyncCache:
self.cache[key] = fu
if asyncio.isfuture(cached): # pending
return await cached # type: ignore
return await cached
elif cached is not None: # cached
return cached
else: # not cached