Gentoo Archives: gentoo-portage-dev

From: Matt Turner <mattst88@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-portage-dev] [PATCH gentoolkit 4/4] Remove inherits from object
Date: Sun, 20 Dec 2020 22:11:05
Message-Id: 20201220221039.286828-4-mattst88@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__ by Matt Turner
1 Signed-off-by: Matt Turner <mattst88@g.o>
2 ---
3 pym/gentoolkit/cpv.py | 2 +-
4 pym/gentoolkit/eclean/clean.py | 2 +-
5 pym/gentoolkit/eclean/output.py | 2 +-
6 pym/gentoolkit/eclean/pkgindex.py | 2 +-
7 pym/gentoolkit/eclean/search.py | 2 +-
8 pym/gentoolkit/enalyze/lib.py | 4 ++--
9 pym/gentoolkit/equery/belongs.py | 2 +-
10 pym/gentoolkit/equery/check.py | 2 +-
11 pym/gentoolkit/equery/depends.py | 2 +-
12 pym/gentoolkit/formatters.py | 2 +-
13 pym/gentoolkit/helpers.py | 4 ++--
14 pym/gentoolkit/keyword.py | 2 +-
15 pym/gentoolkit/metadata.py | 8 ++++----
16 pym/gentoolkit/module_base.py | 2 +-
17 pym/gentoolkit/package.py | 2 +-
18 pym/gentoolkit/revdep_rebuild/analyse.py | 2 +-
19 pym/gentoolkit/revdep_rebuild/assign.py | 2 +-
20 pym/gentoolkit/test/eclean/creator.py | 2 +-
21 pym/gentoolkit/test/eclean/distsupport.py | 6 +++---
22 pym/gentoolkit/test/eclean/test_clean.py | 2 +-
23 pym/gentoolkit/versionmatch.py | 2 +-
24 21 files changed, 28 insertions(+), 28 deletions(-)
25
26 diff --git a/pym/gentoolkit/cpv.py b/pym/gentoolkit/cpv.py
27 index 563dab8..5238e24 100644
28 --- a/pym/gentoolkit/cpv.py
29 +++ b/pym/gentoolkit/cpv.py
30 @@ -37,7 +37,7 @@ isvalid_rev_re = re.compile(r'(\d+|0\d+\.\d+)')
31 # Classes
32 # =======
33
34 -class CPV(object):
35 +class CPV:
36 """Provides methods on a category/package-version string.
37
38 Will also correctly split just a package or package-version string.
39 diff --git a/pym/gentoolkit/eclean/clean.py b/pym/gentoolkit/eclean/clean.py
40 index 2b750e3..3f6fe45 100644
41 --- a/pym/gentoolkit/eclean/clean.py
42 +++ b/pym/gentoolkit/eclean/clean.py
43 @@ -11,7 +11,7 @@ import gentoolkit.pprinter as pp
44 from gentoolkit.eclean.pkgindex import PkgIndex
45
46
47 -class CleanUp(object):
48 +class CleanUp:
49 """Performs all cleaning actions to distfiles or package directories.
50
51 @param controller: a progress output/user interaction controller function
52 diff --git a/pym/gentoolkit/eclean/output.py b/pym/gentoolkit/eclean/output.py
53 index 122d550..e2ed221 100644
54 --- a/pym/gentoolkit/eclean/output.py
55 +++ b/pym/gentoolkit/eclean/output.py
56 @@ -9,7 +9,7 @@ from portage.output import blue, yellow, teal, green, red
57 from gentoolkit.pprinter import cpv, number
58
59
60 -class OutputControl(object):
61 +class OutputControl:
62 """Outputs data according to predetermined options and handles any user
63 interaction.
64
65 diff --git a/pym/gentoolkit/eclean/pkgindex.py b/pym/gentoolkit/eclean/pkgindex.py
66 index 6cf9000..46c734d 100644
67 --- a/pym/gentoolkit/eclean/pkgindex.py
68 +++ b/pym/gentoolkit/eclean/pkgindex.py
69 @@ -13,7 +13,7 @@ from gentoolkit.eprefix import EPREFIX
70 import portage
71
72
73 -class PkgIndex(object):
74 +class PkgIndex:
75 """Handle the cleaning of the binpkg Package
76 Index file
77
78 diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py
79 index 992949c..8f6e52f 100644
80 --- a/pym/gentoolkit/eclean/search.py
81 +++ b/pym/gentoolkit/eclean/search.py
82 @@ -50,7 +50,7 @@ def get_distdir():
83 distdir = get_distdir()
84
85
86 -class DistfilesSearch(object):
87 +class DistfilesSearch:
88 """
89
90 @param output: verbose output method or (lambda x: None) to turn off
91 diff --git a/pym/gentoolkit/enalyze/lib.py b/pym/gentoolkit/enalyze/lib.py
92 index 8580bb7..50c7d11 100644
93 --- a/pym/gentoolkit/enalyze/lib.py
94 +++ b/pym/gentoolkit/enalyze/lib.py
95 @@ -17,7 +17,7 @@ from gentoolkit.flag import (reduce_flags, get_flags, get_all_cpv_use,
96 import portage
97
98
99 -class FlagAnalyzer(object):
100 +class FlagAnalyzer:
101 """Specialty functions for analysing an installed package's
102 USE flags. Can be used for single or mulitple use without
103 needing to be reset unless the system USE flags are changed.
104 @@ -142,7 +142,7 @@ class FlagAnalyzer(object):
105 return _flags
106
107
108 -class KeywordAnalyser(object):
109 +class KeywordAnalyser:
110 """Specialty functions for analysing the installed package db for
111 keyword useage and the packages that used them.
112
113 diff --git a/pym/gentoolkit/equery/belongs.py b/pym/gentoolkit/equery/belongs.py
114 index 8289366..1c9ab13 100644
115 --- a/pym/gentoolkit/equery/belongs.py
116 +++ b/pym/gentoolkit/equery/belongs.py
117 @@ -36,7 +36,7 @@ QUERY_OPTS = {
118 # Classes
119 # =======
120
121 -class BelongsPrinter(object):
122 +class BelongsPrinter:
123 """Outputs a formatted list of packages that claim to own a files."""
124
125 def __init__(self, verbose=True, name_only=False):
126 diff --git a/pym/gentoolkit/equery/check.py b/pym/gentoolkit/equery/check.py
127 index e965164..47eba98 100644
128 --- a/pym/gentoolkit/equery/check.py
129 +++ b/pym/gentoolkit/equery/check.py
130 @@ -41,7 +41,7 @@ QUERY_OPTS = {
131 # Classes
132 # =======
133
134 -class VerifyContents(object):
135 +class VerifyContents:
136 """Verify installed packages' CONTENTS files.
137
138 The CONTENTS file contains timestamps and MD5 sums for each file owned
139 diff --git a/pym/gentoolkit/equery/depends.py b/pym/gentoolkit/equery/depends.py
140 index 7461ade..74c6933 100644
141 --- a/pym/gentoolkit/equery/depends.py
142 +++ b/pym/gentoolkit/equery/depends.py
143 @@ -33,7 +33,7 @@ QUERY_OPTS = {
144 # Classes
145 # =======
146
147 -class DependPrinter(object):
148 +class DependPrinter:
149 """Output L{gentoolkit.dependencies.Dependencies} objects."""
150 def __init__(self, verbose=True):
151 self.verbose = verbose
152 diff --git a/pym/gentoolkit/formatters.py b/pym/gentoolkit/formatters.py
153 index e8b1428..097c186 100644
154 --- a/pym/gentoolkit/formatters.py
155 +++ b/pym/gentoolkit/formatters.py
156 @@ -94,7 +94,7 @@ def format_timestamp(timestamp):
157
158 return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(int(timestamp)))
159
160 -class CpvValueWrapper(object):
161 +class CpvValueWrapper:
162 """Format a cpv and linewrap pre-formatted values"""
163
164 def __init__(self, cpv_width=None, width=None):
165 diff --git a/pym/gentoolkit/helpers.py b/pym/gentoolkit/helpers.py
166 index 02ac20e..a979ca7 100644
167 --- a/pym/gentoolkit/helpers.py
168 +++ b/pym/gentoolkit/helpers.py
169 @@ -44,7 +44,7 @@ from gentoolkit.versionmatch import VersionMatch
170 # Classes
171 # =======
172
173 -class ChangeLog(object):
174 +class ChangeLog:
175 """Provides methods for working with a Gentoo ChangeLog file.
176
177 Example usage:
178 @@ -216,7 +216,7 @@ class ChangeLog(object):
179 return result
180
181
182 -class FileOwner(object):
183 +class FileOwner:
184 """Creates a function for locating the owner of filename queries.
185
186 Example usage:
187 diff --git a/pym/gentoolkit/keyword.py b/pym/gentoolkit/keyword.py
188 index 9edf4aa..e997efe 100644
189 --- a/pym/gentoolkit/keyword.py
190 +++ b/pym/gentoolkit/keyword.py
191 @@ -23,7 +23,7 @@ __all__ = (
192 # Classes
193 # =======
194
195 -class Keyword(object):
196 +class Keyword:
197 """Provides common methods on a GLEP 53 keyword."""
198
199 def __init__(self, keyword):
200 diff --git a/pym/gentoolkit/metadata.py b/pym/gentoolkit/metadata.py
201 index ecf60c3..9dc9619 100644
202 --- a/pym/gentoolkit/metadata.py
203 +++ b/pym/gentoolkit/metadata.py
204 @@ -48,7 +48,7 @@ from portage import settings
205 # Classes
206 # =======
207
208 -class _Maintainer(object):
209 +class _Maintainer:
210 """An object for representing one maintainer.
211
212 @type email: str or None
213 @@ -78,7 +78,7 @@ class _Maintainer(object):
214 return "<%s %r>" % (self.__class__.__name__, self.email)
215
216
217 -class _Useflag(object):
218 +class _Useflag:
219 """An object for representing one USE flag.
220
221 @todo: Is there any way to have a keyword option to leave in
222 @@ -111,7 +111,7 @@ class _Useflag(object):
223 return "<%s %r>" % (self.__class__.__name__, self.name)
224
225
226 -class _Upstream(object):
227 +class _Upstream:
228 """An object for representing one package's upstream.
229
230 @type maintainers: list
231 @@ -167,7 +167,7 @@ class _Upstream(object):
232 return [(e.text, e.get('type')) for e in self.node.findall('remote-id')]
233
234
235 -class MetaData(object):
236 +class MetaData:
237 """Access metadata.xml"""
238
239 def __init__(self, metadata_path):
240 diff --git a/pym/gentoolkit/module_base.py b/pym/gentoolkit/module_base.py
241 index 322088d..0632469 100644
242 --- a/pym/gentoolkit/module_base.py
243 +++ b/pym/gentoolkit/module_base.py
244 @@ -17,7 +17,7 @@ import gentoolkit.pprinter as pp
245 from gentoolkit.formatters import format_options
246 from gentoolkit.base import mod_usage
247
248 -class ModuleBase(object):
249 +class ModuleBase:
250 """E-app base module class to parse module options print module help, etc.."""
251
252 def __init__(self):
253 diff --git a/pym/gentoolkit/package.py b/pym/gentoolkit/package.py
254 index 37209d5..4c851bc 100644
255 --- a/pym/gentoolkit/package.py
256 +++ b/pym/gentoolkit/package.py
257 @@ -423,7 +423,7 @@ class Package(CPV):
258 return self.cpv not in unmasked
259
260
261 -class PackageFormatter(object):
262 +class PackageFormatter:
263 """When applied to a L{gentoolkit.package.Package} object, determine the
264 location (Portage Tree vs. overlay), install status and masked status. That
265 information can then be easily formatted and displayed.
266 diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py
267 index 6ce1568..3e46a51 100644
268 --- a/pym/gentoolkit/revdep_rebuild/analyse.py
269 +++ b/pym/gentoolkit/revdep_rebuild/analyse.py
270 @@ -115,7 +115,7 @@ def extract_dependencies_from_la(la, libraries, to_check, logger):
271 return broken
272
273
274 -class LibCheck(object):
275 +class LibCheck:
276 def __init__(self, scanned_files, logger, searchlibs=None, searchbits=None,
277 all_masks=None, masked_dirs=None):
278 '''LibCheck init function.
279 diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py
280 index 3fa9299..570c114 100644
281 --- a/pym/gentoolkit/revdep_rebuild/assign.py
282 +++ b/pym/gentoolkit/revdep_rebuild/assign.py
283 @@ -16,7 +16,7 @@ from portage import portdb
284 from portage.output import bold, red, yellow, green
285
286
287 -class _file_matcher(object):
288 +class _file_matcher:
289 """
290 Compares files by basename and parent directory (device, inode),
291 so comparisons work regardless of directory symlinks. If a
292 diff --git a/pym/gentoolkit/test/eclean/creator.py b/pym/gentoolkit/test/eclean/creator.py
293 index 678c203..da5123e 100644
294 --- a/pym/gentoolkit/test/eclean/creator.py
295 +++ b/pym/gentoolkit/test/eclean/creator.py
296 @@ -94,7 +94,7 @@ def make_symlinks(path, links, targets):
297 os.path.join(path, links[i]))
298
299
300 -class TestDirCreation(object):
301 +class TestDirCreation:
302 """"""
303
304 distfile_list = ['ExtUtils-ParseXS-2.22.tar.gz',
305 diff --git a/pym/gentoolkit/test/eclean/distsupport.py b/pym/gentoolkit/test/eclean/distsupport.py
306 index fd858d4..0fc2db8 100644
307 --- a/pym/gentoolkit/test/eclean/distsupport.py
308 +++ b/pym/gentoolkit/test/eclean/distsupport.py
309 @@ -335,7 +335,7 @@ def get_props(cpvs):
310 props[cpv] = PROPS[cpv].copy()
311 return props
312
313 -class Dbapi(object):
314 +class Dbapi:
315 """Fake portage dbapi class used to return
316 pre-determined test data in place of a live system
317
318 @@ -397,7 +397,7 @@ class Dbapi(object):
319 return props
320
321
322 -class OutputSimulator(object):
323 +class OutputSimulator:
324 """Simple output accumulator used for testing.
325 Simulates eclean.output.OutputControl class """
326
327 @@ -432,7 +432,7 @@ class OutputSimulator(object):
328 self.callback('list_pkgs', pkgs)
329
330
331 -class TestDisfiles(object):
332 +class TestDisfiles:
333
334 def __init__(self):
335 self.workdir = None
336 diff --git a/pym/gentoolkit/test/eclean/test_clean.py b/pym/gentoolkit/test/eclean/test_clean.py
337 index 0c35e93..2f50e27 100755
338 --- a/pym/gentoolkit/test/eclean/test_clean.py
339 +++ b/pym/gentoolkit/test/eclean/test_clean.py
340 @@ -20,7 +20,7 @@ __email__ = "brian.dolbec@×××××.com"
341 # from gentoolkit.eclean.clean import CleanUp
342
343
344 -# class Controllers(object):
345 +# class Controllers:
346 # """Contains controller methods for use in testing
347 # the clean module methods"""
348
349 diff --git a/pym/gentoolkit/versionmatch.py b/pym/gentoolkit/versionmatch.py
350 index 0d1c6ab..9287c13 100644
351 --- a/pym/gentoolkit/versionmatch.py
352 +++ b/pym/gentoolkit/versionmatch.py
353 @@ -21,7 +21,7 @@ from gentoolkit.cpv import CPV
354 # Classes
355 # =======
356
357 -class VersionMatch(object):
358 +class VersionMatch:
359 """Gentoo version comparison object from pkgcore.ebuild.atom_restricts.
360
361 Any overriding of this class *must* maintain numerical order of
362 --
363 2.26.2