Apply YAPF

This commit is contained in:
Ivan Kravets
2017-01-24 21:54:50 +02:00
parent 92b2782af8
commit a874db38be
5 changed files with 19 additions and 19 deletions

View File

@ -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)

View File

@ -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(

View File

@ -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:

View File

@ -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():

View File

@ -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()