mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
fix mypy
This commit is contained in:
parent
ffe84cae08
commit
88cbdd925c
6 changed files with 6 additions and 6 deletions
2
.github/workflows/mypy.yaml
vendored
2
.github/workflows/mypy.yaml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/tests.yaml
vendored
2
.github/workflows/tests.yaml
vendored
|
@ -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 }}
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue