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