core: small typing improvement

This commit is contained in:
Pablo Correa Gómez 2025-04-03 17:02:01 +02:00 committed by Oliver Smith
parent 12d125ab8b
commit 987793bb24
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -1,11 +1,11 @@
# Copyright 2024 Stefan Hansson # Copyright 2024 Stefan Hansson
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from dataclasses import dataclass from dataclasses import dataclass
from typing import Any
import pmb.build._package import pmb.build._package
from pmb.core.apkindex_block import ApkindexBlock from pmb.core.apkindex_block import ApkindexBlock
from pmb.core.context import get_context from pmb.core.context import get_context
from pmb.types import Apkbuild
@dataclass @dataclass
@ -28,7 +28,7 @@ class PackageMetadata:
) )
@staticmethod @staticmethod
def from_pmaport(pmaport: dict[str, Any]) -> "PackageMetadata": def from_pmaport(pmaport: Apkbuild) -> "PackageMetadata":
pmaport_arches = pmaport["arch"] pmaport_arches = pmaport["arch"]
pmaport_depends = pmb.build._package.get_depends(get_context(), pmaport) pmaport_depends = pmb.build._package.get_depends(get_context(), pmaport)
pmaport_pkgname = pmaport["pkgname"] pmaport_pkgname = pmaport["pkgname"]