mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-01 02:54:25 +02:00
Use "super" when calling parent class // Issue #895
This commit is contained in:
@@ -39,11 +39,12 @@ PIOPLUS_AUTO_UPDATES_MAX = 100
|
||||
class CorePackageManager(PackageManager):
|
||||
|
||||
def __init__(self):
|
||||
PackageManager.__init__(self, join(util.get_home_dir(), "packages"), [
|
||||
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
|
||||
"http%s://dl.platformio.org/packages/manifest.json" %
|
||||
("" if sys.version_info < (2, 7, 9) else "s")
|
||||
])
|
||||
super(CorePackageManager, self).__init__(
|
||||
join(util.get_home_dir(), "packages"), [
|
||||
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
|
||||
"http%s://dl.platformio.org/packages/manifest.json" %
|
||||
("" if sys.version_info < (2, 7, 9) else "s")
|
||||
])
|
||||
|
||||
def install( # pylint: disable=keyword-arg-before-vararg
|
||||
self,
|
||||
|
@@ -32,7 +32,7 @@ class LibraryManager(BasePkgManager):
|
||||
def __init__(self, package_dir=None):
|
||||
if not package_dir:
|
||||
package_dir = join(util.get_home_dir(), "lib")
|
||||
BasePkgManager.__init__(self, package_dir)
|
||||
super(LibraryManager, self).__init__(package_dir)
|
||||
|
||||
@property
|
||||
def manifest_names(self):
|
||||
|
@@ -61,7 +61,7 @@ class MeasurementProtocol(TelemetryBase):
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
TelemetryBase.__init__(self)
|
||||
super(MeasurementProtocol, self).__init__()
|
||||
self['v'] = 1
|
||||
self['tid'] = self.TID
|
||||
self['cid'] = app.get_cid()
|
||||
|
@@ -48,7 +48,7 @@ class ArchiveBase(object):
|
||||
class TARArchive(ArchiveBase):
|
||||
|
||||
def __init__(self, archpath):
|
||||
ArchiveBase.__init__(self, tarfile_open(archpath))
|
||||
super(TARArchive, self).__init__(tarfile_open(archpath))
|
||||
|
||||
def get_items(self):
|
||||
return self._afo.getmembers()
|
||||
@@ -60,7 +60,7 @@ class TARArchive(ArchiveBase):
|
||||
class ZIPArchive(ArchiveBase):
|
||||
|
||||
def __init__(self, archpath):
|
||||
ArchiveBase.__init__(self, ZipFile(archpath))
|
||||
super(ZIPArchive, self).__init__(ZipFile(archpath))
|
||||
|
||||
@staticmethod
|
||||
def preserve_permissions(item, dest_dir):
|
||||
|
@@ -78,7 +78,7 @@ class ProjectConfig(ConfigParser.ConfigParser):
|
||||
class AsyncPipe(Thread):
|
||||
|
||||
def __init__(self, outcallback=None):
|
||||
Thread.__init__(self)
|
||||
super(AsyncPipe, self).__init__()
|
||||
self.outcallback = outcallback
|
||||
|
||||
self._fd_read, self._fd_write = os.pipe()
|
||||
|
Reference in New Issue
Block a user