From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CDB48158009 for ; Thu, 29 Jun 2023 08:19:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 860BBE0802; Thu, 29 Jun 2023 08:19:33 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 639C0E0802 for ; Thu, 29 Jun 2023 08:19:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4CFC8340F91 for ; Thu, 29 Jun 2023 08:19:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D4CA4AC5 for ; Thu, 29 Jun 2023 08:19:30 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1688026768.e29cb58272b26fb6a4eeae27f4b127f80b34a88c.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: lib/_emerge/actions.py X-VCS-Directories: lib/_emerge/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: e29cb58272b26fb6a4eeae27f4b127f80b34a88c X-VCS-Branch: master Date: Thu, 29 Jun 2023 08:19:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2079ae1d-19ac-430b-bc12-3087f8e3cbad X-Archives-Hash: 997cf54ed61e69218e7b0b2df8380ad3 commit: e29cb58272b26fb6a4eeae27f4b127f80b34a88c Author: Berin Aniesh gmail com> AuthorDate: Mon Jun 19 01:30:25 2023 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jun 29 08:19:28 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e29cb582 actions.py: More type annotations Signed-off-by: Berin Aniesh gmail.com> Signed-off-by: Sam James gentoo.org> lib/_emerge/actions.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py index 01bf82fcb..7dddd4760 100644 --- a/lib/_emerge/actions.py +++ b/lib/_emerge/actions.py @@ -105,6 +105,9 @@ from _emerge.UnmergeDepPriority import UnmergeDepPriority from _emerge.UseFlagDisplay import pkg_use_display from _emerge.UserQuery import UserQuery +# Type annotation imports +from typing import List + def action_build( emerge_config, @@ -2790,7 +2793,7 @@ def relative_profile_path(portdir, abs_profile): return profilever -def get_libc_version(vardb): +def get_libc_version(vardb: portage.dbapi.vartree.vardbapi) -> List[str]: libcver = [] libclist = set() for atom in expand_new_virt(vardb, portage.const.LIBC_PACKAGE_ATOM): @@ -2807,7 +2810,9 @@ def get_libc_version(vardb): return libcver -def get_profile_version(portdir, profile, vardb): +def get_profile_version( + portdir: str, profile: str, vardb: portage.dbapi.vartree.vardbapi +) -> str: profilever = None repositories = vardb.settings.repositories if profile: @@ -2851,7 +2856,13 @@ def get_profile_version(portdir, profile, vardb): return profilever -def getportageversion(portdir, _unused, profile, chost, vardb): +def getportageversion( + portdir: str, + _unused: None, + profile: str, + chost: str, + vardb: portage.dbapi.vartree.vardbapi, +) -> str: pythonver = ( "python" f" {sys.version_info[0]}"