commit: a22424e497b9e4c2e16d1e8dc41f0dc0ec32a64d
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 16 06:52:18 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 16 06:52:18 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a22424e4
*/*: rerun black
Signed-off-by: Sam James <sam <AT> gentoo.org>
lib/_emerge/resolver/output.py | 3 +-
lib/portage/emaint/__init__.py | 3 +-
lib/portage/emaint/modules/__init__.py | 3 +-
lib/portage/locks.py | 2 +-
lib/portage/tests/__init__.py | 2 +
lib/portage/tests/dbapi/test_portdb_cache.py | 3 +-
lib/portage/tests/resolver/test_onlydeps_ideps.py | 4 +-
lib/portage/util/_xattr.py | 2 +-
lib/portage/xml/metadata.py | 46 +++++++++++------------
9 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py
index 930a75678d..780642c6d2 100644
--- a/lib/_emerge/resolver/output.py
+++ b/lib/_emerge/resolver/output.py
@@ -1,8 +1,7 @@
# Copyright 2010-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-"""Resolver output display operation.
-"""
+"""Resolver output display operation."""
__all__ = (
"Display",
diff --git a/lib/portage/emaint/__init__.py b/lib/portage/emaint/__init__.py
index 48bc6e2ae4..6cee20a523 100644
--- a/lib/portage/emaint/__init__.py
+++ b/lib/portage/emaint/__init__.py
@@ -1,5 +1,4 @@
# Copyright 2005-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-"""System health checks and maintenance utilities.
-"""
+"""System health checks and maintenance utilities."""
diff --git a/lib/portage/emaint/modules/__init__.py
b/lib/portage/emaint/modules/__init__.py
index f67197d9f8..ecdb03567b 100644
--- a/lib/portage/emaint/modules/__init__.py
+++ b/lib/portage/emaint/modules/__init__.py
@@ -1,5 +1,4 @@
# Copyright 2005-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-"""Plug-in modules for system health checks and maintenance.
-"""
+"""Plug-in modules for system health checks and maintenance."""
diff --git a/lib/portage/locks.py b/lib/portage/locks.py
index c3eff5c56d..b66fde12a7 100644
--- a/lib/portage/locks.py
+++ b/lib/portage/locks.py
@@ -103,7 +103,7 @@ def _get_lock_fn():
def _test_lock_fn(
- lock_fn: typing.Callable[[str, int, int], typing.Callable[[], None]]
+ lock_fn: typing.Callable[[str, int, int], typing.Callable[[], None]],
) -> bool:
fd, lock_path = tempfile.mkstemp()
unlock_fn = None
diff --git a/lib/portage/tests/__init__.py b/lib/portage/tests/__init__.py
index e06b03c6d7..f9c7222117 100644
--- a/lib/portage/tests/__init__.py
+++ b/lib/portage/tests/__init__.py
@@ -26,6 +26,7 @@ from portage.proxy.objectproxy import ObjectProxy
# This remains constant when the real value is a mock.
EPREFIX_ORIG = portage.const.EPREFIX
+
@dataclass
class CommandStep:
returncode: int
@@ -38,6 +39,7 @@ class CommandStep:
class FunctionStep:
function: Callable[[int], Any] # called with step index as argument
+
class lazy_value(ObjectProxy):
__slots__ = ("_func",)
diff --git a/lib/portage/tests/dbapi/test_portdb_cache.py
b/lib/portage/tests/dbapi/test_portdb_cache.py
index e14dc57d00..406e293f1a 100644
--- a/lib/portage/tests/dbapi/test_portdb_cache.py
+++ b/lib/portage/tests/dbapi/test_portdb_cache.py
@@ -102,7 +102,8 @@ class PortdbCacheTestCase(TestCase):
returncode=os.EX_OK,
command=python_cmd
+ (
- textwrap.dedent("""
+ textwrap.dedent(
+ """
import os, sys, portage
if
portage.portdb.repositories['test_repo'].location not in
portage.portdb._pregen_auxdb:
sys.exit(1)
diff --git a/lib/portage/tests/resolver/test_onlydeps_ideps.py
b/lib/portage/tests/resolver/test_onlydeps_ideps.py
index e34ee2aed3..909683e14d 100644
--- a/lib/portage/tests/resolver/test_onlydeps_ideps.py
+++ b/lib/portage/tests/resolver/test_onlydeps_ideps.py
@@ -52,7 +52,7 @@ class OnlydepsIdepsTestCase(TestCase):
"--onlydeps-with-ideps": "y",
},
ambiguous_merge_order=True,
- mergelist=[("dev-libs/B-1")],
+ mergelist=["dev-libs/B-1"],
),
ResolverPlaygroundTestCase(
["dev-libs/F"],
@@ -64,7 +64,7 @@ class OnlydepsIdepsTestCase(TestCase):
"--onlydeps-with-ideps": True,
},
ambiguous_merge_order=True,
- mergelist=[("dev-libs/B-1")],
+ mergelist=["dev-libs/B-1"],
),
ResolverPlaygroundTestCase(
["dev-libs/F"],
diff --git a/lib/portage/util/_xattr.py b/lib/portage/util/_xattr.py
index 41b396d0bf..039e759814 100644
--- a/lib/portage/util/_xattr.py
+++ b/lib/portage/util/_xattr.py
@@ -8,7 +8,7 @@ We do not include the functions that Python 3.3+ provides in
the os module as
the signature there is different compared to xattr.
See the standard xattr module for more documentation:
- https://pypi.python.org/pypi/pyxattr
+ https://pypi.python.org/pypi/pyxattr
"""
import contextlib
diff --git a/lib/portage/xml/metadata.py b/lib/portage/xml/metadata.py
index 018c0f379f..f95af4e3f9 100644
--- a/lib/portage/xml/metadata.py
+++ b/lib/portage/xml/metadata.py
@@ -3,29 +3,29 @@
"""Provides an easy-to-use python interface to Gentoo's metadata.xml file.
- Example usage:
- >>> from portage.xml.metadata import MetaDataXML
- >>> pkg_md =
MetaDataXML('/var/db/repos/gentoo/app-misc/gourmet/metadata.xml')
- >>> pkg_md
- <MetaDataXML
'/var/db/repos/gentoo/app-misc/gourmet/metadata.xml'>
- >>> pkg_md.herds()
- ['no-herd']
- >>> for maint in pkg_md.maintainers():
- ... print "{0} ({1})".format(maint.email, maint.name)
- ...
- [email protected] (Joe Sapp)
- >>> for flag in pkg_md.use():
- ... print flag.name, "->", flag.description
- ...
- rtf -> Enable export to RTF
- gnome-print -> Enable printing support using gnome-print
- >>> upstream = pkg_md.upstream()
- >>> upstream
- [<_Upstream {'docs': [], 'remoteid': [], 'maintainer':
- [<_Maintainer '[email protected]'>],
'bugtracker': [],
- 'changelog': []}>]
- >>> upstream[0].maintainer[0].name
- 'Thomas Mills Hinkle'
+Example usage:
+ >>> from portage.xml.metadata import MetaDataXML
+ >>> pkg_md =
MetaDataXML('/var/db/repos/gentoo/app-misc/gourmet/metadata.xml')
+ >>> pkg_md
+ <MetaDataXML '/var/db/repos/gentoo/app-misc/gourmet/metadata.xml'>
+ >>> pkg_md.herds()
+ ['no-herd']
+ >>> for maint in pkg_md.maintainers():
+ ... print "{0} ({1})".format(maint.email, maint.name)
+ ...
+ [email protected] (Joe Sapp)
+ >>> for flag in pkg_md.use():
+ ... print flag.name, "->", flag.description
+ ...
+ rtf -> Enable export to RTF
+ gnome-print -> Enable printing support using gnome-print
+ >>> upstream = pkg_md.upstream()
+ >>> upstream
+ [<_Upstream {'docs': [], 'remoteid': [], 'maintainer':
+ [<_Maintainer '[email protected]'>], 'bugtracker': [],
+ 'changelog': []}>]
+ >>> upstream[0].maintainer[0].name
+ 'Thomas Mills Hinkle'
"""
__all__ = ("MetaDataXML", "parse_metadata_use")