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):
|
||||
""" Dummy decider to force always building"""
|
||||
"""Dummy decider to force always building"""
|
||||
return True
|
||||
|
||||
|
||||
|
@ -157,7 +157,7 @@ def _subst_cmd(env, cmd):
|
||||
|
||||
|
||||
def DumpIDEData(env, globalenv):
|
||||
""" env here is `projenv`"""
|
||||
"""env here is `projenv`"""
|
||||
|
||||
data = {
|
||||
"env_name": env["PIOENV"],
|
||||
|
@ -92,7 +92,7 @@ class ContentCache(object):
|
||||
return self._unlock_dbindex()
|
||||
|
||||
def delete(self, keys=None):
|
||||
""" Keys=None, delete expired items """
|
||||
"""Keys=None, delete expired items"""
|
||||
if not os.path.isfile(self._db_path):
|
||||
return None
|
||||
if not keys:
|
||||
|
@ -80,7 +80,7 @@ class EndpointSessionIterator(object):
|
||||
return self
|
||||
|
||||
def next(self):
|
||||
""" For Python 2 compatibility """
|
||||
"""For Python 2 compatibility"""
|
||||
return self.__next__()
|
||||
|
||||
def __next__(self):
|
||||
|
@ -19,7 +19,7 @@ from platformio.project.config import ProjectConfig
|
||||
|
||||
class DeviceMonitorFilter(miniterm.Transform):
|
||||
def __init__(self, options=None):
|
||||
""" Called by PlatformIO to pass context """
|
||||
"""Called by PlatformIO to pass context"""
|
||||
miniterm.Transform.__init__(self)
|
||||
|
||||
self.options = options or {}
|
||||
@ -35,7 +35,7 @@ class DeviceMonitorFilter(miniterm.Transform):
|
||||
self.environment = self.config.envs()[0]
|
||||
|
||||
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
|
||||
|
||||
@property
|
||||
|
@ -42,7 +42,7 @@ class RegistryFileMirrorIterator(object):
|
||||
return self
|
||||
|
||||
def next(self):
|
||||
""" For Python 2 compatibility """
|
||||
"""For Python 2 compatibility"""
|
||||
return self.__next__()
|
||||
|
||||
def __next__(self):
|
||||
|
@ -46,14 +46,14 @@ def find_project_dir_above(path):
|
||||
|
||||
|
||||
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(
|
||||
join(get_project_dir(), "platformio.ini")
|
||||
).get_optional_dir("core", exists=True)
|
||||
|
||||
|
||||
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(
|
||||
join(get_project_dir(), "platformio.ini")
|
||||
).get_optional_dir("cache")
|
||||
|
@ -77,7 +77,7 @@ class throttle(object):
|
||||
|
||||
|
||||
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 = {}
|
||||
|
||||
def get_instance(*args, **kwargs):
|
||||
@ -231,7 +231,7 @@ def get_mdns_services():
|
||||
|
||||
|
||||
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__)
|
||||
assert vermatch
|
||||
return [int(i) for i in vermatch.group(1).split(".")[:3]]
|
||||
|
Reference in New Issue
Block a user