Use walrus operator and explicitly require python >= 3.8

Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
This commit is contained in:
Jean-Christophe Morin 2025-02-09 14:50:10 -05:00
parent 6f5870787a
commit ca011221cf
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ async def get_version(name, conf, *, cache, **kwargs):
for version in data['releases'].keys():
# Skip versions that are marked as yanked.
if len(data['releases'][version]) != 0 and data['releases'][version][0]['yanked']:
if (vers := data['releases'][version]) and vers[0]['yanked']:
continue
try:

View File

@ -39,10 +39,10 @@ classifiers =
[options]
zip_safe = True
python_requires = >=3.8
packages = find_namespace:
install_requires =
setuptools; python_version<"3.8"
tomli; python_version<"3.11"
structlog
platformdirs