From ce2fca6a118b74af54679c27311a9fa73285e2e8 Mon Sep 17 00:00:00 2001 From: Newbyte <newbyte@postmarketos.org> Date: Wed, 9 Oct 2024 15:10:27 +0200 Subject: [PATCH] pmb.helpers.pmaports: Annotate return type for get_list() as list (MR 2431) I'm not sure why this was annotated as a Sequence rather than list. The function clearly returns a list, not a Sequence, and the commit that originally did it[1] provides no justification. This causes problems with mypy checks in other places, so let's just annotate this as returning a list. [1]: 198f302a36ca31ff1af65836fad19aa755ec828b --- pmb/helpers/pmaports.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pmb/helpers/pmaports.py b/pmb/helpers/pmaports.py index 5dfbf50d7..2deb06788 100644 --- a/pmb/helpers/pmaports.py +++ b/pmb/helpers/pmaports.py @@ -13,7 +13,6 @@ from pmb.core.pkgrepo import pkgrepo_iter_package_dirs from pmb.helpers import logging from pathlib import Path from typing import Any -from collections.abc import Sequence from pmb.meta import Cache import pmb.parse @@ -46,7 +45,7 @@ def _find_apkbuilds(skip_extra_repos=False) -> dict[str, Path]: return apkbuilds -def get_list() -> Sequence[str]: +def get_list() -> list[str]: """:returns: list of all pmaport pkgnames (["hello-world", ...])""" return list(_find_apkbuilds().keys()) -- GitLab