aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-01-26 11:36:00 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2024-01-26 11:36:00 +0200
commitc2854afa252886214964f2f962581a2cf3c1f72b (patch)
treea30d7a9bd0bf7967d59848a8bd25433f78be6669
parentfix: tox.ini since it's not been used in ages. (diff)
downloadpkgcore-c2854afa252886214964f2f962581a2cf3c1f72b.tar.gz
pkgcore-c2854afa252886214964f2f962581a2cf3c1f72b.tar.bz2
pkgcore-c2854afa252886214964f2f962581a2cf3c1f72b.zip
reformat with black 24
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--src/pkgcore/config/central.py3
-rw-r--r--src/pkgcore/config/hint.py1
-rw-r--r--src/pkgcore/ebuild/eclass_cache.py1
-rw-r--r--src/pkgcore/ebuild/profiles.py6
-rw-r--r--src/pkgcore/ebuild/restricts.py1
-rw-r--r--src/pkgcore/fs/fs.py6
-rw-r--r--src/pkgcore/merge/triggers.py1
-rw-r--r--src/pkgcore/package/virtual.py1
-rw-r--r--src/pkgcore/repository/misc.py6
-rw-r--r--src/pkgcore/repository/virtual.py6
-rw-r--r--src/pkgcore/sync/base.py1
-rw-r--r--src/pkgcore/util/commandline.py16
-rw-r--r--tests/config/test_central.py1
-rw-r--r--tests/ebuild/test_domain.py7
-rw-r--r--tests/ebuild/test_eapi.py13
-rw-r--r--tests/ebuild/test_profiles.py3
-rw-r--r--tests/restrictions/test_restriction.py1
-rw-r--r--tests/restrictions/test_values.py1
18 files changed, 31 insertions, 44 deletions
diff --git a/src/pkgcore/config/central.py b/src/pkgcore/config/central.py
index 12e0ce13..58463863 100644
--- a/src/pkgcore/config/central.py
+++ b/src/pkgcore/config/central.py
@@ -22,7 +22,6 @@ _section_data = namedtuple("_section_data", ["name", "section"])
class _ConfigMapping(mappings.DictMixin):
-
"""Minimal dict-like wrapper returning config sections by type.
Similar to :class:`mappings.LazyValDict` but __getitem__
@@ -78,7 +77,6 @@ class _ConfigStack(defaultdict[str, list[typing.Any]]):
class CollapsedConfig:
-
"""A collapsed config section.
:type type: :obj:`basics.ConfigType`
@@ -281,7 +279,6 @@ class CompatConfigManager:
class ConfigManager:
-
"""Combine config type definitions and configuration sections.
Creates instances of a requested type and name by pulling the
diff --git a/src/pkgcore/config/hint.py b/src/pkgcore/config/hint.py
index 8a230204..57972c11 100644
--- a/src/pkgcore/config/hint.py
+++ b/src/pkgcore/config/hint.py
@@ -1,6 +1,5 @@
"""Config introspection support."""
-
__all__ = ("ConfigHint", "configurable")
import typing
diff --git a/src/pkgcore/ebuild/eclass_cache.py b/src/pkgcore/ebuild/eclass_cache.py
index 402b1595..bbe8226d 100644
--- a/src/pkgcore/ebuild/eclass_cache.py
+++ b/src/pkgcore/ebuild/eclass_cache.py
@@ -113,7 +113,6 @@ class cache(base):
class StackedCaches(base):
-
"""
collapse multiple eclass caches into one.
diff --git a/src/pkgcore/ebuild/profiles.py b/src/pkgcore/ebuild/profiles.py
index 660fcea8..384e41e2 100644
--- a/src/pkgcore/ebuild/profiles.py
+++ b/src/pkgcore/ebuild/profiles.py
@@ -606,9 +606,9 @@ class EmptyRootNode(ProfileNode):
parents = ()
deprecated = None
- pkg_use = (
- masked_use
- ) = stable_masked_use = forced_use = stable_forced_use = misc.ChunkedDataDict()
+ pkg_use = masked_use = stable_masked_use = forced_use = stable_forced_use = (
+ misc.ChunkedDataDict()
+ )
forced_use.freeze()
pkg_bashrc = ()
pkg_use_force = pkg_use_mask = ImmutableDict()
diff --git a/src/pkgcore/ebuild/restricts.py b/src/pkgcore/ebuild/restricts.py
index 6d4c1804..9aaa84b6 100644
--- a/src/pkgcore/ebuild/restricts.py
+++ b/src/pkgcore/ebuild/restricts.py
@@ -25,7 +25,6 @@ from . import cpv, errors
# TODO: change values.EqualityMatch so it supports le, lt, gt, ge, eq,
# ne ops, and convert this to it.
class _VersionMatch(restriction.base, metaclass=generic_equality):
-
"""
package restriction implementing gentoo ebuild version comparison rules
diff --git a/src/pkgcore/fs/fs.py b/src/pkgcore/fs/fs.py
index 9149750e..ba9fedd7 100644
--- a/src/pkgcore/fs/fs.py
+++ b/src/pkgcore/fs/fs.py
@@ -52,7 +52,6 @@ def gen_doc_additions(init, slots):
class fsBase:
-
"""base class, all extensions must derive from this class"""
__slots__ = ("location", "mtime", "mode", "uid", "gid")
@@ -146,7 +145,6 @@ class _LazyChksums(LazyFullValLoadDict):
class fsFile(fsBase):
-
"""file class"""
__slots__ = ("chksums", "data", "dev", "inode")
@@ -206,7 +204,6 @@ class fsFile(fsBase):
class fsDir(fsBase):
-
"""dir class"""
__slots__ = ()
@@ -217,7 +214,6 @@ class fsDir(fsBase):
class fsLink(fsBase):
-
"""symlink class"""
__slots__ = ("target",)
@@ -269,7 +265,6 @@ fsSymlink = fsLink
class fsDev(fsBase):
-
"""dev class (char/block objects)"""
__slots__ = ("major", "minor")
@@ -315,7 +310,6 @@ def get_major_minor(stat_inst):
class fsFifo(fsBase):
-
"""fifo class (socket objects)"""
__slots__ = ()
diff --git a/src/pkgcore/merge/triggers.py b/src/pkgcore/merge/triggers.py
index c484ad8c..25e88ac5 100644
--- a/src/pkgcore/merge/triggers.py
+++ b/src/pkgcore/merge/triggers.py
@@ -49,7 +49,6 @@ INSTALLING_MODES = (const.REPLACE_MODE, const.INSTALL_MODE)
class base:
-
"""base trigger class
:ivar required_csets: If None, all csets are passed in, else it must be a
diff --git a/src/pkgcore/package/virtual.py b/src/pkgcore/package/virtual.py
index 29c163b6..ddd48bdd 100644
--- a/src/pkgcore/package/virtual.py
+++ b/src/pkgcore/package/virtual.py
@@ -9,7 +9,6 @@ from . import metadata
class package(metadata.package):
-
"""
Virtual package.
diff --git a/src/pkgcore/repository/misc.py b/src/pkgcore/repository/misc.py
index d7f0ab00..e6c220a5 100644
--- a/src/pkgcore/repository/misc.py
+++ b/src/pkgcore/repository/misc.py
@@ -12,9 +12,9 @@ from ..restrictions import packages
class nodeps_repo:
"""Repository wrapper that returns wrapped pkgs with deps wiped."""
- default_bdepend = (
- default_depend
- ) = default_rdepend = default_pdepend = default_idepend = DepSet()
+ default_bdepend = default_depend = default_rdepend = default_pdepend = (
+ default_idepend
+ ) = DepSet()
def __init__(self, repo):
"""
diff --git a/src/pkgcore/repository/virtual.py b/src/pkgcore/repository/virtual.py
index b584c71b..12e8d972 100644
--- a/src/pkgcore/repository/virtual.py
+++ b/src/pkgcore/repository/virtual.py
@@ -68,9 +68,9 @@ class InjectedPkg(pkg_base.wrapper):
"unversioned_atom",
"data",
)
- default_bdepend = (
- default_depend
- ) = default_rdepend = default_pdepend = default_idepend = DepSet()
+ default_bdepend = default_depend = default_rdepend = default_pdepend = (
+ default_idepend
+ ) = DepSet()
package_is_real = False
is_supported = True
diff --git a/src/pkgcore/sync/base.py b/src/pkgcore/sync/base.py
index e9099e91..83b56770 100644
--- a/src/pkgcore/sync/base.py
+++ b/src/pkgcore/sync/base.py
@@ -152,7 +152,6 @@ class Syncer:
class ExternalSyncer(Syncer):
-
"""Base class for syncers that spawn a binary to do the the actual work."""
binary = None
diff --git a/src/pkgcore/util/commandline.py b/src/pkgcore/util/commandline.py
index d7e47ded..b6878d26 100644
--- a/src/pkgcore/util/commandline.py
+++ b/src/pkgcore/util/commandline.py
@@ -529,9 +529,11 @@ def _mk_domain(parser, help=True):
get_default=True,
config_type="domain",
action=StoreConfigObject,
- help="custom pkgcore domain to use for this operation"
- if help
- else argparse.SUPPRESS,
+ help=(
+ "custom pkgcore domain to use for this operation"
+ if help
+ else argparse.SUPPRESS
+ ),
)
@@ -575,9 +577,11 @@ class ArgumentParser(arghparse.ArgumentParser):
"--config",
action=_ConfigArg,
dest="config_path",
- help="use custom config or skip loading system config"
- if help
- else argparse.SUPPRESS,
+ help=(
+ "use custom config or skip loading system config"
+ if help
+ else argparse.SUPPRESS
+ ),
docs="""
The path to a custom pkgcore config file or portage
config directory can be given to override loading the
diff --git a/tests/config/test_central.py b/tests/config/test_central.py
index 55b541f8..c7572f56 100644
--- a/tests/config/test_central.py
+++ b/tests/config/test_central.py
@@ -27,7 +27,6 @@ def drawer(content=None, contents=None):
class RemoteSource:
-
"""Use this one for tests that do need the names but nothing more."""
def __iter__(self):
diff --git a/tests/ebuild/test_domain.py b/tests/ebuild/test_domain.py
index 54aa8f36..329305b2 100644
--- a/tests/ebuild/test_domain.py
+++ b/tests/ebuild/test_domain.py
@@ -47,9 +47,10 @@ class TestDomain:
def rev_iter_scan(*args, **kwargs):
return iter(sorted(orig_func(*args, **kwargs), reverse=True))
- with mock.patch(
- "pkgcore.fs.livefs.iter_scan", side_effect=rev_iter_scan
- ), mock.patch("pkgcore.ebuild.domain.iter_scan", side_effect=rev_iter_scan):
+ with (
+ mock.patch("pkgcore.fs.livefs.iter_scan", side_effect=rev_iter_scan),
+ mock.patch("pkgcore.ebuild.domain.iter_scan", side_effect=rev_iter_scan),
+ ):
assert (
(packages.AlwaysTrue, ((), ("X",))),
(packages.AlwaysTrue, (("X",), ("Y",))),
diff --git a/tests/ebuild/test_eapi.py b/tests/ebuild/test_eapi.py
index cf7ef090..2b39e68a 100644
--- a/tests/ebuild/test_eapi.py
+++ b/tests/ebuild/test_eapi.py
@@ -26,10 +26,10 @@ class TestEAPI:
EAPI.register(magic="0")
mock_ebd_temp = str(shutil.copytree(EBD_PATH, tmp_path / "ebd"))
- with mock.patch(
- "pkgcore.ebuild.eapi.bash_version"
- ) as bash_version, mock.patch.dict(eapi.EAPI.known_eapis), mock.patch(
- "pkgcore.ebuild.eapi.const.EBD_PATH", mock_ebd_temp
+ with (
+ mock.patch("pkgcore.ebuild.eapi.bash_version") as bash_version,
+ mock.patch.dict(eapi.EAPI.known_eapis),
+ mock.patch("pkgcore.ebuild.eapi.const.EBD_PATH", mock_ebd_temp),
):
# inadequate bash version
bash_version.return_value = "3.1"
@@ -52,8 +52,9 @@ class TestEAPI:
assert eapi6.is_supported
mock_ebd_temp = str(shutil.copytree(EBD_PATH, tmp_path / "ebd"))
- with mock.patch.dict(eapi.EAPI.known_eapis), mock.patch(
- "pkgcore.ebuild.eapi.const.EBD_PATH", mock_ebd_temp
+ with (
+ mock.patch.dict(eapi.EAPI.known_eapis),
+ mock.patch("pkgcore.ebuild.eapi.const.EBD_PATH", mock_ebd_temp),
):
# partially supported EAPI is flagged as such
test_eapi = EAPI.register("test", optionals={"is_supported": False})
diff --git a/tests/ebuild/test_profiles.py b/tests/ebuild/test_profiles.py
index 31549d5d..47fcf8b5 100644
--- a/tests/ebuild/test_profiles.py
+++ b/tests/ebuild/test_profiles.py
@@ -95,8 +95,7 @@ class TestPmsProfileNode(profile_mixin):
klass = staticmethod(ProfileNode)
profile = "default"
- def setup_repo(self, tmp_path):
- ...
+ def setup_repo(self, tmp_path): ...
@pytest.fixture(autouse=True)
def _setup(self, tmp_path):
diff --git a/tests/restrictions/test_restriction.py b/tests/restrictions/test_restriction.py
index b1f8a5d8..37a26be8 100644
--- a/tests/restrictions/test_restriction.py
+++ b/tests/restrictions/test_restriction.py
@@ -71,7 +71,6 @@ class TestAlwaysBool(TestRestriction):
class NoneMatch(restriction.base):
-
"""Only matches None."""
__slots__ = ()
diff --git a/tests/restrictions/test_values.py b/tests/restrictions/test_values.py
index 4365fda0..40450c42 100644
--- a/tests/restrictions/test_values.py
+++ b/tests/restrictions/test_values.py
@@ -24,7 +24,6 @@ class TestBase(TestRestriction):
class TestGetAttr(TestRestriction):
-
"""Test bits of GetAttrRestriction that differ from PackageRestriction."""
def test_force(self):