Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8022314

Browse files
committed
Cleanup in packaging: super considered super
1 parent d139b99 commit 8022314

8 files changed

Lines changed: 15 additions & 16 deletions

File tree

Lib/packaging/command/bdist_msi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PyDialog(Dialog):
3535
def __init__(self, *args, **kw):
3636
"""Dialog(database, name, x, y, w, h, attributes, title, first,
3737
default, cancel, bitmap=true)"""
38-
Dialog.__init__(self, *args)
38+
super(PyDialog, self).__init__(*args)
3939
ruler = self.h - 36
4040
#if kw.get("bitmap", True):
4141
# self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin")

Lib/packaging/compiler/bcppcompiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class BCPPCompiler(CCompiler) :
4848

4949

5050
def __init__(self, verbose=0, dry_run=False, force=False):
51-
CCompiler.__init__(self, verbose, dry_run, force)
51+
super(BCPPCompiler, self).__init__(verbose, dry_run, force)
5252

5353
# These executables are assumed to all be in the path.
5454
# Borland doesn't seem to use any special registry settings to

Lib/packaging/compiler/cygwinccompiler.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ class CygwinCCompiler(UnixCCompiler):
9393
exe_extension = ".exe"
9494

9595
def __init__(self, verbose=0, dry_run=False, force=False):
96-
97-
UnixCCompiler.__init__(self, verbose, dry_run, force)
96+
super(CygwinCCompiler, self).__init__(verbose, dry_run, force)
9897

9998
status, details = check_config_h()
10099
logger.debug("Python's GCC status: %s (details: %s)", status, details)
@@ -255,14 +254,14 @@ def object_filenames(self, source_filenames, strip_dir=False,
255254
if ext not in (self.src_extensions + ['.rc','.res']):
256255
raise UnknownFileError("unknown file type '%s' (from '%s')" % (ext, src_name))
257256
if strip_dir:
258-
base = os.path.basename (base)
257+
base = os.path.basename(base)
259258
if ext in ('.res', '.rc'):
260259
# these need to be compiled to object files
261-
obj_names.append (os.path.join(output_dir,
260+
obj_names.append(os.path.join(output_dir,
262261
base + ext + self.obj_extension))
263262
else:
264-
obj_names.append (os.path.join(output_dir,
265-
base + self.obj_extension))
263+
obj_names.append(os.path.join(output_dir,
264+
base + self.obj_extension))
266265
return obj_names
267266

268267
# the same as cygwin plus some additional parameters
@@ -273,8 +272,7 @@ class Mingw32CCompiler(CygwinCCompiler):
273272
description = 'MinGW32 compiler'
274273

275274
def __init__(self, verbose=0, dry_run=False, force=False):
276-
277-
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
275+
super(Mingw32CCompiler, self).__init__(verbose, dry_run, force)
278276

279277
# ld_version >= "2.13" support -shared so use it instead of
280278
# -mdll -static

Lib/packaging/compiler/msvc9compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class MSVCCompiler(CCompiler) :
310310
exe_extension = '.exe'
311311

312312
def __init__(self, verbose=0, dry_run=False, force=False):
313-
CCompiler.__init__(self, verbose, dry_run, force)
313+
super(MSVCCompiler, self).__init__(verbose, dry_run, force)
314314
self.__version = VERSION
315315
self.__root = r"Software\Microsoft\VisualStudio"
316316
# self.__macros = MACROS

Lib/packaging/compiler/msvccompiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class MSVCCompiler(CCompiler):
237237
exe_extension = '.exe'
238238

239239
def __init__(self, verbose=0, dry_run=False, force=False):
240-
CCompiler.__init__(self, verbose, dry_run, force)
240+
super(MSVCCompiler, self).__init__(verbose, dry_run, force)
241241
self.__version = get_build_version()
242242
self.__arch = get_build_architecture()
243243
if self.__arch == "Intel":

Lib/packaging/metadata.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ class SilentReporter(Reporter):
2828
def __init__(self, source, report_level, halt_level, stream=None,
2929
debug=0, encoding='ascii', error_handler='replace'):
3030
self.messages = []
31-
Reporter.__init__(self, source, report_level, halt_level, stream,
32-
debug, encoding, error_handler)
31+
super(SilentReporter, self).__init__(
32+
source, report_level, halt_level, stream,
33+
debug, encoding, error_handler)
3334

3435
def system_message(self, level, message, *children, **kwargs):
3536
self.messages.append((level, message, children, kwargs))

Lib/packaging/tests/pypi_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def __init__(self, test_static_path=None,
103103
"""
104104
# we want to launch the server in a new dedicated thread, to not freeze
105105
# tests.
106-
threading.Thread.__init__(self)
106+
super(PyPIServer, self).__init__()
107107
self._run = True
108108
self._serve_xmlrpc = serve_xmlrpc
109109
if static_filesystem_paths is None:

Lib/packaging/tests/support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class _TestHandler(logging.handlers.BufferingHandler):
6565
# stolen and adapted from test.support
6666

6767
def __init__(self):
68-
logging.handlers.BufferingHandler.__init__(self, 0)
68+
super(_TestHandler, self).__init__(0)
6969
self.setLevel(logging.DEBUG)
7070

7171
def shouldFlush(self):

0 commit comments

Comments
 (0)