mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-03-04 02:18:09 +00:00
16 lines
354 B
Python
16 lines
354 B
Python
# MIT licensed
|
|
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
|
|
|
from .simple_json import simple_json
|
|
|
|
HACKAGE_URL = 'https://hackage.haskell.org/package/%s/preferred.json'
|
|
|
|
def _version_from_json(data):
|
|
return data['normal-version'][0]
|
|
|
|
get_version, get_cacheable_conf = simple_json(
|
|
HACKAGE_URL,
|
|
'hackage',
|
|
_version_from_json,
|
|
)
|