forked from platformio/platformio-core
Pass a list iterator directly to "any" or "all" functions
This commit is contained in:
@@ -111,7 +111,7 @@ def cli(ctx, environment, target, upload_port, project_dir, silent, verbose,
|
||||
"nobuild" not in ep.get_build_targets():
|
||||
ctx.invoke(cmd_device_monitor)
|
||||
|
||||
found_error = any([status is False for (_, status) in results])
|
||||
found_error = any(status is False for (_, status) in results)
|
||||
|
||||
if (found_error or not silent) and len(results) > 1:
|
||||
click.echo()
|
||||
@@ -411,6 +411,6 @@ def calculate_project_hash():
|
||||
for root, _, files in walk(d):
|
||||
for f in files:
|
||||
path = join(root, f)
|
||||
if not any([s in path for s in (".git", ".svn", ".pioenvs")]):
|
||||
if not any(s in path for s in (".git", ".svn", ".pioenvs")):
|
||||
structure.append(path)
|
||||
return sha1(",".join(sorted(structure))).hexdigest() if structure else ""
|
||||
|
||||
@@ -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(
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user