Cleanup click-based source code

This commit is contained in:
Ivan Kravets
2014-12-03 20:16:50 +02:00
parent affb47b82e
commit 8596d271a2
13 changed files with 139 additions and 130 deletions

View File

@@ -1,17 +1,17 @@
# Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
from click import argument, command, secho
import click
from platformio.platforms.base import PlatformFactory
@command("uninstall", short_help="Uninstall platforms")
@argument("platforms", nargs=-1)
@click.command("uninstall", short_help="Uninstall platforms")
@click.argument("platforms", nargs=-1)
def cli(platforms):
for platform in platforms:
p = PlatformFactory().newPlatform(platform)
p = PlatformFactory.newPlatform(platform)
if p.uninstall():
secho("The platform '%s' has been successfully "
"uninstalled!" % platform, fg="green")
click.secho("The platform '%s' has been successfully "
"uninstalled!" % platform, fg="green")