Pass a list iterator directly to "any" or "all" functions

This commit is contained in:
Ivan Kravets
2018-01-18 22:04:43 +02:00
parent 3caa2a9e8d
commit 2b4b2eb571
8 changed files with 14 additions and 15 deletions

View File

@ -36,7 +36,7 @@ def cli(dev):
# kill all PIO Home servers, they block `pioplus` binary
shutdown_servers()
to_develop = dev or not all([c.isdigit() for c in __version__ if c != "."])
to_develop = dev or not all(c.isdigit() for c in __version__ if c != ".")
cmds = ([
"pip", "install", "--upgrade",
"https://github.com/platformio/platformio-core/archive/develop.zip"
@ -69,7 +69,7 @@ def cli(dev):
if not r:
raise exception.UpgradeError("\n".join([str(cmd), str(e)]))
permission_errors = ("permission denied", "not permitted")
if (any([m in r['err'].lower() for m in permission_errors])
if (any(m in r['err'].lower() for m in permission_errors)
and "windows" not in util.get_systype()):
click.secho(
"""