Skip to content
Snippets Groups Projects
Verified Commit ce2fca6a authored by Newbyte's avatar Newbyte :snowflake:
Browse files

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]: 198f302a
parent 7ed07fb6
No related branches found
No related tags found
1 merge request!2431CI: Run mypy with --check-untyped-defs
......@@ -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())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment