pmb.build.autodetect: Fix return type and docstring for arch() (MR 2464)

At some point, this function was updated to use the Arch type instead of
plain strings, but the return type was left omitted and the docstring
outdated.
This commit is contained in:
Newbyte 2024-10-29 13:49:37 +01:00
parent a89ecb11d2
commit f507aed9aa
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -39,14 +39,14 @@ def arch_from_deviceinfo(pkgname, aport: Path) -> Arch | None:
@Cache("package")
def arch(package: str | dict[str, Any]):
def arch(package: str | dict[str, Any]) -> Arch:
"""
Find a good default in case the user did not specify for which architecture
a package should be built.
:param package: The name of the package or parsed APKBUILD
:returns: arch string like "x86_64" or "armhf". Preferred order, depending
:returns: Arch object. Preferred order, depending
on what is supported by the APKBUILD:
* native arch
* device arch (this will be preferred instead if build_default_device_arch is true)