mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-02-20 04:27:09 +00:00
Merge pull request #92 from yan12125/fix-pypi
pypi: fix valueless items
This commit is contained in:
commit
2f24822c88
@ -8,7 +8,7 @@ python:
|
||||
- "3.7"
|
||||
- "nightly"
|
||||
- "pypy3.5"
|
||||
install: pip install -U $DEPS pytest pytest-asyncio pytest-xdist flaky structlog
|
||||
install: pip install -U $DEPS "pytest<4.1" pytest-asyncio pytest-xdist flaky structlog
|
||||
script: pytest
|
||||
env:
|
||||
global:
|
||||
|
@ -1,18 +1,14 @@
|
||||
# MIT licensed
|
||||
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
from . import cmd, conf_cacheable_with_name, session
|
||||
from . import conf_cacheable_with_name, session
|
||||
|
||||
get_cacheable_conf = conf_cacheable_with_name('pypi')
|
||||
|
||||
async def get_version(name, conf, **kwargs):
|
||||
package = conf.get('pypi')
|
||||
package = conf.get('pypi') or name
|
||||
use_pre_release = conf.getboolean('use_pre_release', False)
|
||||
|
||||
headers = {
|
||||
'Accept': 'application/json',
|
||||
'User-Agent': 'lilydjwg/nvchecker',
|
||||
}
|
||||
url = 'https://pypi.org/pypi/{}/json'.format(package)
|
||||
|
||||
async with session.get(url) as res:
|
||||
|
Loading…
Reference in New Issue
Block a user