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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 29A8515800D for ; Tue, 11 Jul 2023 05:02:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 499E6E083D; Tue, 11 Jul 2023 05:02:04 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 32F12E0844 for ; Tue, 11 Jul 2023 05:02:04 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2DF13340931 for ; Tue, 11 Jul 2023 05:02:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 90335ACB for ; Tue, 11 Jul 2023 05:02:01 +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: <1689051643.f228252f4b4c3b33ff1e199f55bec9a6a104b80c.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: lib/_emerge/depgraph.py X-VCS-Directories: lib/_emerge/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f228252f4b4c3b33ff1e199f55bec9a6a104b80c X-VCS-Branch: master Date: Tue, 11 Jul 2023 05:02:01 +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: 2dbb125f-06f8-4ff5-bb85-90accf1739d8 X-Archives-Hash: a0dde27303e702b9605415b10c774be8 commit: f228252f4b4c3b33ff1e199f55bec9a6a104b80c Author: Berin Aniesh gmail com> AuthorDate: Mon Jul 10 03:10:07 2023 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jul 11 05:00:43 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f228252f depgraph.py: fix wrong type annotations Fixes: 7e8a730b85b77f9495f4999ac173dc726777203f Bug: https://bugs.gentoo.org/910171 Signed-off-by: Berin Aniesh gmail.com> Closes: https://github.com/gentoo/portage/pull/1067 Signed-off-by: Sam James gentoo.org> lib/_emerge/depgraph.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py index 1aeae6257..72747d7bc 100644 --- a/lib/_emerge/depgraph.py +++ b/lib/_emerge/depgraph.py @@ -101,7 +101,11 @@ from _emerge.resolver.circular_dependency import circular_dependency_handler from _emerge.resolver.output import Display, format_unmatched_atom # Type annotation imports -from typing import Any, Optional, Dict, List, Tuple, Union +from typing import Any, Optional, Dict, List, Tuple, Union, TYPE_CHECKING + +if TYPE_CHECKING: + import _emerge.stdout_spinner.stdout_spinner + # Exposes a depgraph interface to dep_check. _dep_check_graph_interface = collections.namedtuple( @@ -11409,7 +11413,7 @@ def _spinner_stop(spinner): def backtrack_depgraph( settings: portage.package.ebuild.config.config, trees: portage._trees_dict, - myopts: Dict[str, Any], + myopts: Dict[str, Union[str, int, bool]], myparams: Dict[str, Union[int, str, bool]], myaction: Optional[str], myfiles: List[str], @@ -11431,7 +11435,7 @@ def backtrack_depgraph( def _backtrack_depgraph( settings: portage.package.ebuild.config.config, trees: portage._trees_dict, - myopts: Dict[str, Any], + myopts: Dict[str, Union[str, int, bool]], myparams: Dict[str, Union[int, str, bool]], myaction: Optional[str], myfiles: List[str], @@ -11536,8 +11540,8 @@ def resume_depgraph( settings: portage.package.ebuild.config.config, trees: portage._trees_dict, mtimedb: Any, - myopts: Dict[str, str], - myparams: Dict[str, Any], + myopts: Dict[str, Union[str, int, bool]], + myparams: Dict[str, Union[str, bool]], spinner: "_emerge.stdout_spinner.stdout_spinner", ): """ @@ -11554,8 +11558,8 @@ def _resume_depgraph( settings: portage.package.ebuild.config.config, trees: portage._trees_dict, mtimedb: Any, - myopts: Dict[str, str], - myparams: Dict[str, Any], + myopts: Dict[str, Union[str, int, bool]], + myparams: Dict[str, Union[str, bool]], spinner: "_emerge.stdout_spinner.stdout_spinner", ): """