forked from platformio/platformio-core
Apply black formatter
This commit is contained in:
@ -58,7 +58,7 @@ class __CompilationDbNode(SCons.Node.Python.Value):
|
|||||||
|
|
||||||
|
|
||||||
def changed_since_last_build_node(*args, **kwargs):
|
def changed_since_last_build_node(*args, **kwargs):
|
||||||
""" Dummy decider to force always building"""
|
"""Dummy decider to force always building"""
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ def _subst_cmd(env, cmd):
|
|||||||
|
|
||||||
|
|
||||||
def DumpIDEData(env, globalenv):
|
def DumpIDEData(env, globalenv):
|
||||||
""" env here is `projenv`"""
|
"""env here is `projenv`"""
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"env_name": env["PIOENV"],
|
"env_name": env["PIOENV"],
|
||||||
|
@ -92,7 +92,7 @@ class ContentCache(object):
|
|||||||
return self._unlock_dbindex()
|
return self._unlock_dbindex()
|
||||||
|
|
||||||
def delete(self, keys=None):
|
def delete(self, keys=None):
|
||||||
""" Keys=None, delete expired items """
|
"""Keys=None, delete expired items"""
|
||||||
if not os.path.isfile(self._db_path):
|
if not os.path.isfile(self._db_path):
|
||||||
return None
|
return None
|
||||||
if not keys:
|
if not keys:
|
||||||
|
@ -80,7 +80,7 @@ class EndpointSessionIterator(object):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def next(self):
|
def next(self):
|
||||||
""" For Python 2 compatibility """
|
"""For Python 2 compatibility"""
|
||||||
return self.__next__()
|
return self.__next__()
|
||||||
|
|
||||||
def __next__(self):
|
def __next__(self):
|
||||||
|
@ -19,7 +19,7 @@ from platformio.project.config import ProjectConfig
|
|||||||
|
|
||||||
class DeviceMonitorFilter(miniterm.Transform):
|
class DeviceMonitorFilter(miniterm.Transform):
|
||||||
def __init__(self, options=None):
|
def __init__(self, options=None):
|
||||||
""" Called by PlatformIO to pass context """
|
"""Called by PlatformIO to pass context"""
|
||||||
miniterm.Transform.__init__(self)
|
miniterm.Transform.__init__(self)
|
||||||
|
|
||||||
self.options = options or {}
|
self.options = options or {}
|
||||||
@ -35,7 +35,7 @@ class DeviceMonitorFilter(miniterm.Transform):
|
|||||||
self.environment = self.config.envs()[0]
|
self.environment = self.config.envs()[0]
|
||||||
|
|
||||||
def __call__(self):
|
def __call__(self):
|
||||||
""" Called by the miniterm library when the filter is actually used """
|
"""Called by the miniterm library when the filter is actually used"""
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -42,7 +42,7 @@ class RegistryFileMirrorIterator(object):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def next(self):
|
def next(self):
|
||||||
""" For Python 2 compatibility """
|
"""For Python 2 compatibility"""
|
||||||
return self.__next__()
|
return self.__next__()
|
||||||
|
|
||||||
def __next__(self):
|
def __next__(self):
|
||||||
|
@ -46,14 +46,14 @@ def find_project_dir_above(path):
|
|||||||
|
|
||||||
|
|
||||||
def get_project_core_dir():
|
def get_project_core_dir():
|
||||||
""" Deprecated, use ProjectConfig.get_optional_dir("core") instead """
|
"""Deprecated, use ProjectConfig.get_optional_dir("core") instead"""
|
||||||
return ProjectConfig.get_instance(
|
return ProjectConfig.get_instance(
|
||||||
join(get_project_dir(), "platformio.ini")
|
join(get_project_dir(), "platformio.ini")
|
||||||
).get_optional_dir("core", exists=True)
|
).get_optional_dir("core", exists=True)
|
||||||
|
|
||||||
|
|
||||||
def get_project_cache_dir():
|
def get_project_cache_dir():
|
||||||
""" Deprecated, use ProjectConfig.get_optional_dir("cache") instead """
|
"""Deprecated, use ProjectConfig.get_optional_dir("cache") instead"""
|
||||||
return ProjectConfig.get_instance(
|
return ProjectConfig.get_instance(
|
||||||
join(get_project_dir(), "platformio.ini")
|
join(get_project_dir(), "platformio.ini")
|
||||||
).get_optional_dir("cache")
|
).get_optional_dir("cache")
|
||||||
|
@ -77,7 +77,7 @@ class throttle(object):
|
|||||||
|
|
||||||
|
|
||||||
def singleton(cls):
|
def singleton(cls):
|
||||||
""" From PEP-318 http://www.python.org/dev/peps/pep-0318/#examples """
|
"""From PEP-318 http://www.python.org/dev/peps/pep-0318/#examples"""
|
||||||
_instances = {}
|
_instances = {}
|
||||||
|
|
||||||
def get_instance(*args, **kwargs):
|
def get_instance(*args, **kwargs):
|
||||||
@ -231,7 +231,7 @@ def get_mdns_services():
|
|||||||
|
|
||||||
|
|
||||||
def pioversion_to_intstr():
|
def pioversion_to_intstr():
|
||||||
""" Legacy for framework-zephyr/scripts/platformio/platformio-build-pre.py"""
|
"""Legacy for framework-zephyr/scripts/platformio/platformio-build-pre.py"""
|
||||||
vermatch = re.match(r"^([\d\.]+)", __version__)
|
vermatch = re.match(r"^([\d\.]+)", __version__)
|
||||||
assert vermatch
|
assert vermatch
|
||||||
return [int(i) for i in vermatch.group(1).split(".")[:3]]
|
return [int(i) for i in vermatch.group(1).split(".")[:3]]
|
||||||
|
Reference in New Issue
Block a user