forked from platformio/platformio-core
Apply YAPF
This commit is contained in:
@ -591,8 +591,8 @@ def GetLibBuilders(env): # pylint: disable=too-many-branches
|
||||
if verbose:
|
||||
sys.stderr.write("Ignored library %s\n" % lb.path)
|
||||
return
|
||||
if compat_mode > 1 and not lb.is_platforms_compatible(env[
|
||||
'PIOPLATFORM']):
|
||||
if compat_mode > 1 and not lb.is_platforms_compatible(
|
||||
env['PIOPLATFORM']):
|
||||
if verbose:
|
||||
sys.stderr.write("Platform incompatible library %s\n" %
|
||||
lb.path)
|
||||
|
@ -390,17 +390,17 @@ def lib_stats(json_output):
|
||||
click.echo("-" * terminal_width)
|
||||
|
||||
def _print_lib_item(item):
|
||||
click.echo((printitemdate_tpl
|
||||
if "date" in item else printitem_tpl).format(
|
||||
name=click.style(
|
||||
item['name'], fg="cyan"),
|
||||
date=str(
|
||||
arrow.get(item['date']).humanize()
|
||||
if "date" in item else ""),
|
||||
url=click.style(
|
||||
"http://platformio.org/lib/show/%s/%s" % (item[
|
||||
'id'], quote(item['name'])),
|
||||
fg="blue")))
|
||||
click.echo((
|
||||
printitemdate_tpl if "date" in item else printitem_tpl
|
||||
).format(
|
||||
name=click.style(
|
||||
item['name'], fg="cyan"),
|
||||
date=str(
|
||||
arrow.get(item['date']).humanize() if "date" in item else ""),
|
||||
url=click.style(
|
||||
"http://platformio.org/lib/show/%s/%s" % (item['id'],
|
||||
quote(item['name'])),
|
||||
fg="blue")))
|
||||
|
||||
def _print_tag_item(name):
|
||||
click.echo(
|
||||
|
@ -34,8 +34,8 @@ def _print_platforms(platforms):
|
||||
click.echo("=" * (3 + len(platform['name'] + platform['title'])))
|
||||
click.echo(platform['description'])
|
||||
click.echo()
|
||||
click.echo("Home: %s" % "http://platformio.org/platforms/" + platform[
|
||||
'name'])
|
||||
click.echo("Home: %s" % "http://platformio.org/platforms/" +
|
||||
platform['name'])
|
||||
if platform['packages']:
|
||||
click.echo("Packages: %s" % ", ".join(platform['packages']))
|
||||
if "version" in platform:
|
||||
|
@ -83,8 +83,8 @@ WARNING! Don't use `sudo` for the rest PlatformIO commands.
|
||||
err=True)
|
||||
raise exception.ReturnErrorCode(1)
|
||||
else:
|
||||
raise exception.UpgradeError("\n".join(
|
||||
[str(cmd), r['out'], r['err']]))
|
||||
raise exception.UpgradeError(
|
||||
"\n".join([str(cmd), r['out'], r['err']]))
|
||||
|
||||
|
||||
def get_latest_version():
|
||||
|
@ -69,8 +69,8 @@ class ProjectGenerator(object):
|
||||
result = util.exec_command(cmd)
|
||||
|
||||
if result['returncode'] != 0 or '"includes":' not in result['out']:
|
||||
raise exception.PlatformioException("\n".join(
|
||||
[result['out'], result['err']]))
|
||||
raise exception.PlatformioException(
|
||||
"\n".join([result['out'], result['err']]))
|
||||
|
||||
for line in result['out'].split("\n"):
|
||||
line = line.strip()
|
||||
|
Reference in New Issue
Block a user