aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2020-07-21 20:53:05 -0700
committerZac Medico <zmedico@gentoo.org>2020-07-22 09:52:57 -0700
commit25021f0b92c1898c3cc56bc2e446b4f1d57e49aa (patch)
treeacd58d073f645e1fe0fbb73ac56690d26a93a2ff /lib/_emerge
parentFix pylint R0205. (diff)
downloadportage-25021f0b92c1898c3cc56bc2e446b4f1d57e49aa.tar.gz
portage-25021f0b92c1898c3cc56bc2e446b4f1d57e49aa.tar.bz2
portage-25021f0b92c1898c3cc56bc2e446b4f1d57e49aa.zip
Fix R0205 in _emerge.
Inheriting from object is not required in py3. Signed-off-by: Alec Warner <antarus@gentoo.org> Change-Id: Ia12500d590ef3b7f5852b6af03801d40a8af8fa2 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge')
-rw-r--r--lib/_emerge/BlockerCache.py2
-rw-r--r--lib/_emerge/BlockerDB.py2
-rw-r--r--lib/_emerge/DepPriorityNormalRange.py2
-rw-r--r--lib/_emerge/DepPrioritySatisfiedRange.py2
-rw-r--r--lib/_emerge/DependencyArg.py2
-rw-r--r--lib/_emerge/FakeVartree.py2
-rw-r--r--lib/_emerge/JobStatusDisplay.py2
-rw-r--r--lib/_emerge/Package.py4
-rw-r--r--lib/_emerge/PollScheduler.py2
-rw-r--r--lib/_emerge/ProgressHandler.py2
-rw-r--r--lib/_emerge/RootConfig.py2
-rw-r--r--lib/_emerge/Scheduler.py2
-rw-r--r--lib/_emerge/UseFlagDisplay.py2
-rw-r--r--lib/_emerge/UserQuery.py2
-rw-r--r--lib/_emerge/actions.py2
-rw-r--r--lib/_emerge/depgraph.py16
-rw-r--r--lib/_emerge/main.py4
-rw-r--r--lib/_emerge/resolver/DbapiProvidesIndex.py2
-rw-r--r--lib/_emerge/resolver/backtracking.py6
-rw-r--r--lib/_emerge/resolver/circular_dependency.py2
-rw-r--r--lib/_emerge/resolver/output.py2
-rw-r--r--lib/_emerge/resolver/output_helpers.py8
-rw-r--r--lib/_emerge/resolver/package_tracker.py4
-rw-r--r--lib/_emerge/resolver/slot_collision.py8
-rw-r--r--lib/_emerge/search.py4
-rw-r--r--lib/_emerge/stdout_spinner.py2
26 files changed, 45 insertions, 45 deletions
diff --git a/lib/_emerge/BlockerCache.py b/lib/_emerge/BlockerCache.py
index 5f8fb360e..9fa3a0d95 100644
--- a/lib/_emerge/BlockerCache.py
+++ b/lib/_emerge/BlockerCache.py
@@ -21,7 +21,7 @@ class BlockerCache(portage.cache.mappings.MutableMapping):
# it's wasteful to update it for every vdb change.
_cache_threshold = 5
- class BlockerData(object):
+ class BlockerData:
__slots__ = ("__weakref__", "atoms", "counter")
diff --git a/lib/_emerge/BlockerDB.py b/lib/_emerge/BlockerDB.py
index 6122e73a8..356f25bee 100644
--- a/lib/_emerge/BlockerDB.py
+++ b/lib/_emerge/BlockerDB.py
@@ -14,7 +14,7 @@ from _emerge.Package import Package
from _emerge.show_invalid_depstring_notice import show_invalid_depstring_notice
-class BlockerDB(object):
+class BlockerDB:
def __init__(self, fake_vartree):
root_config = fake_vartree._root_config
diff --git a/lib/_emerge/DepPriorityNormalRange.py b/lib/_emerge/DepPriorityNormalRange.py
index 86395549f..5f3f3da70 100644
--- a/lib/_emerge/DepPriorityNormalRange.py
+++ b/lib/_emerge/DepPriorityNormalRange.py
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
from _emerge.DepPriority import DepPriority
-class DepPriorityNormalRange(object):
+class DepPriorityNormalRange:
"""
DepPriority properties Index Category
diff --git a/lib/_emerge/DepPrioritySatisfiedRange.py b/lib/_emerge/DepPrioritySatisfiedRange.py
index 391f5409b..e056e676f 100644
--- a/lib/_emerge/DepPrioritySatisfiedRange.py
+++ b/lib/_emerge/DepPrioritySatisfiedRange.py
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
from _emerge.DepPriority import DepPriority
-class DepPrioritySatisfiedRange(object):
+class DepPrioritySatisfiedRange:
"""
DepPriority Index Category
diff --git a/lib/_emerge/DependencyArg.py b/lib/_emerge/DependencyArg.py
index 2d24359f2..4bb24d0ef 100644
--- a/lib/_emerge/DependencyArg.py
+++ b/lib/_emerge/DependencyArg.py
@@ -5,7 +5,7 @@ import sys
from portage import _encodings, _unicode_encode
-class DependencyArg(object):
+class DependencyArg:
__slots__ = ('arg', 'force_reinstall', 'internal', 'reset_depth', 'root_config')
diff --git a/lib/_emerge/FakeVartree.py b/lib/_emerge/FakeVartree.py
index 6070aeabb..b993cdb0d 100644
--- a/lib/_emerge/FakeVartree.py
+++ b/lib/_emerge/FakeVartree.py
@@ -18,7 +18,7 @@ from portage.versions import _pkg_str
from _emerge.resolver.DbapiProvidesIndex import PackageDbapiProvidesIndex
-class FakeVardbGetPath(object):
+class FakeVardbGetPath:
"""
Implements the vardbapi.getpath() method which is used in error handling
code for the Package class and vartree.get_provide().
diff --git a/lib/_emerge/JobStatusDisplay.py b/lib/_emerge/JobStatusDisplay.py
index 2ef3f8465..8986e90db 100644
--- a/lib/_emerge/JobStatusDisplay.py
+++ b/lib/_emerge/JobStatusDisplay.py
@@ -14,7 +14,7 @@ from portage.output import xtermTitle
from _emerge.getloadavg import getloadavg
-class JobStatusDisplay(object):
+class JobStatusDisplay:
_bound_properties = ("curval", "failed", "running")
diff --git a/lib/_emerge/Package.py b/lib/_emerge/Package.py
index 1fb0bb20b..a7ce39719 100644
--- a/lib/_emerge/Package.py
+++ b/lib/_emerge/Package.py
@@ -528,7 +528,7 @@ class Package(Task):
s += ")"
return s
- class _use_class(object):
+ class _use_class:
__slots__ = ("enabled", "_expand", "_expand_hidden",
"_force", "_pkg", "_mask")
@@ -653,7 +653,7 @@ class Package(Task):
return use_str
- class _iuse(object):
+ class _iuse:
__slots__ = ("__weakref__", "_iuse_implicit_match", "_pkg", "alias_mapping",
"all", "all_aliases", "enabled", "disabled", "tokens")
diff --git a/lib/_emerge/PollScheduler.py b/lib/_emerge/PollScheduler.py
index e90830885..f51c5b005 100644
--- a/lib/_emerge/PollScheduler.py
+++ b/lib/_emerge/PollScheduler.py
@@ -14,7 +14,7 @@ from portage.util._eventloop.global_event_loop import global_event_loop
from _emerge.getloadavg import getloadavg
-class PollScheduler(object):
+class PollScheduler:
# max time between loadavg checks (milliseconds)
_loadavg_latency = None
diff --git a/lib/_emerge/ProgressHandler.py b/lib/_emerge/ProgressHandler.py
index f5afe6d87..89dacf48f 100644
--- a/lib/_emerge/ProgressHandler.py
+++ b/lib/_emerge/ProgressHandler.py
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
import time
-class ProgressHandler(object):
+class ProgressHandler:
def __init__(self):
self.curval = 0
self.maxval = 0
diff --git a/lib/_emerge/RootConfig.py b/lib/_emerge/RootConfig.py
index 3648d01d7..9dc9636da 100644
--- a/lib/_emerge/RootConfig.py
+++ b/lib/_emerge/RootConfig.py
@@ -1,7 +1,7 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-class RootConfig(object):
+class RootConfig:
"""This is used internally by depgraph to track information about a
particular $ROOT."""
__slots__ = ("mtimedb", "root", "setconfig", "sets", "settings", "trees")
diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py
index 7ae9cd4d4..7906c30c8 100644
--- a/lib/_emerge/Scheduler.py
+++ b/lib/_emerge/Scheduler.py
@@ -120,7 +120,7 @@ class Scheduler(PollScheduler):
__slots__ = ("build_dir", "build_log", "pkg",
"postinst_failure", "returncode")
- class _ConfigPool(object):
+ class _ConfigPool:
"""Interface for a task to temporarily allocate a config
instance from a pool. This allows a task to be constructed
long before the config instance actually becomes needed, like
diff --git a/lib/_emerge/UseFlagDisplay.py b/lib/_emerge/UseFlagDisplay.py
index 275397fea..61358cf7b 100644
--- a/lib/_emerge/UseFlagDisplay.py
+++ b/lib/_emerge/UseFlagDisplay.py
@@ -10,7 +10,7 @@ from portage.output import red
from portage.util import cmp_sort_key
from portage.output import blue
-class UseFlagDisplay(object):
+class UseFlagDisplay:
__slots__ = ('name', 'enabled', 'forced')
diff --git a/lib/_emerge/UserQuery.py b/lib/_emerge/UserQuery.py
index 96cac4649..d5273e4ee 100644
--- a/lib/_emerge/UserQuery.py
+++ b/lib/_emerge/UserQuery.py
@@ -10,7 +10,7 @@ from portage import _unicode_decode
from portage.output import bold, create_color_func
-class UserQuery(object):
+class UserQuery:
"""The UserQuery class is used to prompt the user with a set of responses,
as well as accepting and handling the responses."""
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py
index e717bc828..bbd21f5a2 100644
--- a/lib/_emerge/actions.py
+++ b/lib/_emerge/actions.py
@@ -1557,7 +1557,7 @@ def action_deselect(settings, trees, opts, atoms):
world_set.unlock()
return os.EX_OK
-class _info_pkgs_ver(object):
+class _info_pkgs_ver:
def __init__(self, ver, repo_suffix, provide_suffix):
self.ver = ver
self.repo_suffix = repo_suffix
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index dbfb8b0ee..127dbe88f 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -96,7 +96,7 @@ _dep_check_graph_interface = collections.namedtuple('_dep_check_graph_interface'
'want_update_pkg',
))
-class _scheduler_graph_config(object):
+class _scheduler_graph_config:
def __init__(self, trees, pkg_cache, graph, mergelist):
self.trees = trees
self.pkg_cache = pkg_cache
@@ -113,7 +113,7 @@ def _wildcard_set(atoms):
pkgs.add(x)
return pkgs
-class _frozen_depgraph_config(object):
+class _frozen_depgraph_config:
def __init__(self, settings, trees, myopts, params, spinner):
self.settings = settings
@@ -187,7 +187,7 @@ class _frozen_depgraph_config(object):
self.rebuild_if_new_ver = "--rebuild-if-new-ver" in myopts
self.rebuild_if_unbuilt = "--rebuild-if-unbuilt" in myopts
-class _depgraph_sets(object):
+class _depgraph_sets:
def __init__(self):
# contains all sets added to the graph
self.sets = {}
@@ -198,7 +198,7 @@ class _depgraph_sets(object):
self.atoms = InternalPackageSet(allow_repo=True)
self.atom_arg_map = {}
-class _rebuild_config(object):
+class _rebuild_config:
def __init__(self, frozen_config, backtrack_parameters):
self._graph = digraph()
self._frozen_config = frozen_config
@@ -367,7 +367,7 @@ class _use_changes(tuple):
return obj
-class _dynamic_depgraph_config(object):
+class _dynamic_depgraph_config:
"""
``dynamic_depgraph_config`` is an object that is used to collect settings and important data structures that are
@@ -591,7 +591,7 @@ class _dynamic_depgraph_config(object):
dbs.append((vardb, "installed", True, True, db_keys))
self._filtered_trees[myroot]["dbs"] = dbs
-class depgraph(object):
+class depgraph:
# Represents the depth of a node that is unreachable from explicit
# user arguments (or their deep dependencies). Such nodes are pulled
@@ -703,7 +703,7 @@ class depgraph(object):
self._dynamic_deps_proc_exit(pkg, fake_vartree))
yield proc
- class _dynamic_deps_proc_exit(object):
+ class _dynamic_deps_proc_exit:
__slots__ = ('_pkg', '_fake_vartree')
@@ -5934,7 +5934,7 @@ class depgraph(object):
return build_time == inst_pkg.build_time
- class _AutounmaskLevel(object):
+ class _AutounmaskLevel:
__slots__ = ("allow_use_changes", "allow_unstable_keywords", "allow_license_changes", \
"allow_missing_keywords", "allow_unmasks")
diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py
index 727e6d368..69d93f846 100644
--- a/lib/_emerge/main.py
+++ b/lib/_emerge/main.py
@@ -99,7 +99,7 @@ def insert_optional_args(args):
this feature natively.
"""
- class valid_integers(object):
+ class valid_integers:
def __contains__(self, s):
try:
return int(s) >= 0
@@ -108,7 +108,7 @@ def insert_optional_args(args):
valid_integers = valid_integers()
- class valid_floats(object):
+ class valid_floats:
def __contains__(self, s):
try:
return float(s) >= 0
diff --git a/lib/_emerge/resolver/DbapiProvidesIndex.py b/lib/_emerge/resolver/DbapiProvidesIndex.py
index 140c8256b..5a71d9e11 100644
--- a/lib/_emerge/resolver/DbapiProvidesIndex.py
+++ b/lib/_emerge/resolver/DbapiProvidesIndex.py
@@ -5,7 +5,7 @@ import bisect
import collections
import sys
-class DbapiProvidesIndex(object):
+class DbapiProvidesIndex:
"""
The DbapiProvidesIndex class is used to wrap existing dbapi
interfaces, index packages by the sonames that they provide, and
diff --git a/lib/_emerge/resolver/backtracking.py b/lib/_emerge/resolver/backtracking.py
index 430c81186..370b6b851 100644
--- a/lib/_emerge/resolver/backtracking.py
+++ b/lib/_emerge/resolver/backtracking.py
@@ -3,7 +3,7 @@
import copy
-class BacktrackParameter(object):
+class BacktrackParameter:
__slots__ = (
"circular_dependency",
@@ -65,7 +65,7 @@ class BacktrackParameter(object):
self.prune_rebuilds == other.prune_rebuilds
-class _BacktrackNode(object):
+class _BacktrackNode:
__slots__ = (
"parameter", "depth", "mask_steps", "terminal",
@@ -81,7 +81,7 @@ class _BacktrackNode(object):
return self.parameter == other.parameter
-class Backtracker(object):
+class Backtracker:
__slots__ = (
"_max_depth", "_unexplored_nodes", "_current_node", "_nodes", "_root",
diff --git a/lib/_emerge/resolver/circular_dependency.py b/lib/_emerge/resolver/circular_dependency.py
index 866e278dd..d0c026dad 100644
--- a/lib/_emerge/resolver/circular_dependency.py
+++ b/lib/_emerge/resolver/circular_dependency.py
@@ -13,7 +13,7 @@ from portage.util import writemsg_level
from _emerge.DepPrioritySatisfiedRange import DepPrioritySatisfiedRange
from _emerge.Package import Package
-class circular_dependency_handler(object):
+class circular_dependency_handler:
MAX_AFFECTING_USE = 10
diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py
index 0dace853e..3ba197846 100644
--- a/lib/_emerge/resolver/output.py
+++ b/lib/_emerge/resolver/output.py
@@ -32,7 +32,7 @@ from _emerge.resolver.output_helpers import ( _DisplayConfig, _tree_display,
_PackageCounters, _create_use_string, _calc_changelog, PkgInfo)
from _emerge.show_invalid_depstring_notice import show_invalid_depstring_notice
-class Display(object):
+class Display:
"""Formats and outputs the depgrah supplied it for merge/re-merge, etc.
__call__()
diff --git a/lib/_emerge/resolver/output_helpers.py b/lib/_emerge/resolver/output_helpers.py
index 0616bb6ac..a4a7d50cf 100644
--- a/lib/_emerge/resolver/output_helpers.py
+++ b/lib/_emerge/resolver/output_helpers.py
@@ -28,7 +28,7 @@ from _emerge.Blocker import Blocker
from _emerge.Package import Package
-class _RepoDisplay(object):
+class _RepoDisplay:
def __init__(self, roots):
self._shown_repos = {}
self._unknown_repo = False
@@ -77,7 +77,7 @@ class _RepoDisplay(object):
return "".join(output)
-class _PackageCounters(object):
+class _PackageCounters:
def __init__(self):
self.upgrades = 0
@@ -155,7 +155,7 @@ class _PackageCounters(object):
return "".join(myoutput)
-class _DisplayConfig(object):
+class _DisplayConfig:
def __init__(self, depgraph, mylist, favorites, verbosity):
frozen_config = depgraph._frozen_config
@@ -585,7 +585,7 @@ def _find_changelog_tags(changelog):
_strip_header_comments(changelog[release_end:].splitlines())))
return divs
-class PkgInfo(object):
+class PkgInfo:
"""Simple class to hold instance attributes for current
information about the pkg being printed.
"""
diff --git a/lib/_emerge/resolver/package_tracker.py b/lib/_emerge/resolver/package_tracker.py
index ccb0b11cf..2afa7923b 100644
--- a/lib/_emerge/resolver/package_tracker.py
+++ b/lib/_emerge/resolver/package_tracker.py
@@ -29,7 +29,7 @@ class PackageConflict(_PackageConflict):
return len(self.pkgs)
-class PackageTracker(object):
+class PackageTracker:
"""
**Behavior**
@@ -358,7 +358,7 @@ class PackageTracker(object):
return self.contains(pkg, installed=True)
-class PackageTrackerDbapiWrapper(object):
+class PackageTrackerDbapiWrapper:
"""
A wrpper class that provides parts of the legacy
dbapi interface. Remove it once all consumers have
diff --git a/lib/_emerge/resolver/slot_collision.py b/lib/_emerge/resolver/slot_collision.py
index e77433fb8..8375f030e 100644
--- a/lib/_emerge/resolver/slot_collision.py
+++ b/lib/_emerge/resolver/slot_collision.py
@@ -17,7 +17,7 @@ from portage.util import writemsg
from portage.versions import cpv_getversion, vercmp
-class slot_conflict_handler(object):
+class slot_conflict_handler:
"""This class keeps track of all slot conflicts and provides
an interface to get possible solutions.
@@ -1069,7 +1069,7 @@ class slot_conflict_handler(object):
else:
return None
-class _configuration_generator(object):
+class _configuration_generator:
def __init__(self, conflict_pkgs):
#reorder packages such that installed packages come last
self.conflict_pkgs = []
@@ -1118,8 +1118,8 @@ class _configuration_generator(object):
solution_ids[other_id] = 0
return True
-class _solution_candidate_generator(object):
- class _value_helper(object):
+class _solution_candidate_generator:
+ class _value_helper:
def __init__(self, value=None):
self.value = value
def __eq__(self, other):
diff --git a/lib/_emerge/search.py b/lib/_emerge/search.py
index d8050b46f..6cb69d3c1 100644
--- a/lib/_emerge/search.py
+++ b/lib/_emerge/search.py
@@ -15,7 +15,7 @@ from portage.util.iterators.MultiIterGroupBy import MultiIterGroupBy
from _emerge.Package import Package
-class search(object):
+class search:
#
# class constants
@@ -356,7 +356,7 @@ class search(object):
def output(self):
"""Outputs the results of the search."""
- class msg(object):
+ class msg:
@staticmethod
def append(msg):
writemsg_stdout(msg, noiselevel=-1)
diff --git a/lib/_emerge/stdout_spinner.py b/lib/_emerge/stdout_spinner.py
index 670686adf..26592b7b0 100644
--- a/lib/_emerge/stdout_spinner.py
+++ b/lib/_emerge/stdout_spinner.py
@@ -7,7 +7,7 @@ import time
from portage.output import darkgreen, green
-class stdout_spinner(object):
+class stdout_spinner:
scroll_msgs = [
"Gentoo Rocks ("+platform.system()+")",
"Thank you for using Gentoo. :)",