forked from platformio/platformio-core
Format code with pep8 style
This commit is contained in:
@@ -55,19 +55,37 @@ def validate_path(ctx, param, value): # pylint: disable=W0613
|
||||
@click.argument("src", nargs=-1, callback=validate_path)
|
||||
@click.option("-l", "--lib", multiple=True, callback=validate_path)
|
||||
@click.option("--exclude", multiple=True)
|
||||
@click.option("-b", "--board", multiple=True, metavar="ID",
|
||||
callback=validate_boards)
|
||||
@click.option("--build-dir", default=mkdtemp,
|
||||
type=click.Path(exists=True, file_okay=False, dir_okay=True,
|
||||
writable=True, resolve_path=True))
|
||||
@click.option(
|
||||
"-b", "--board", multiple=True, metavar="ID", callback=validate_boards)
|
||||
@click.option(
|
||||
"--build-dir",
|
||||
default=mkdtemp,
|
||||
type=click.Path(
|
||||
exists=True,
|
||||
file_okay=False,
|
||||
dir_okay=True,
|
||||
writable=True,
|
||||
resolve_path=True))
|
||||
@click.option("--keep-build-dir", is_flag=True)
|
||||
@click.option("--project-conf",
|
||||
type=click.Path(exists=True, file_okay=True, dir_okay=False,
|
||||
readable=True, resolve_path=True))
|
||||
@click.option(
|
||||
"--project-conf",
|
||||
type=click.Path(
|
||||
exists=True,
|
||||
file_okay=True,
|
||||
dir_okay=False,
|
||||
readable=True,
|
||||
resolve_path=True))
|
||||
@click.option("-v", "--verbose", is_flag=True)
|
||||
@click.pass_context
|
||||
def cli(ctx, src, lib, exclude, board, # pylint: disable=R0913
|
||||
build_dir, keep_build_dir, project_conf, verbose):
|
||||
def cli(ctx, # pylint: disable=R0913
|
||||
src,
|
||||
lib,
|
||||
exclude,
|
||||
board,
|
||||
build_dir,
|
||||
keep_build_dir,
|
||||
project_conf,
|
||||
verbose):
|
||||
|
||||
if not src:
|
||||
src = getenv("PLATFORMIO_CI_SRC", "").split(":")
|
||||
@@ -102,9 +120,8 @@ def cli(ctx, src, lib, exclude, board, # pylint: disable=R0913
|
||||
finally:
|
||||
if not keep_build_dir:
|
||||
rmtree(
|
||||
build_dir, onerror=lambda action, name, exc:
|
||||
(chmod(name, stat.S_IWRITE), remove(name))
|
||||
)
|
||||
build_dir,
|
||||
onerror=lambda action, name, exc: (chmod(name, stat.S_IWRITE), remove(name)))
|
||||
|
||||
|
||||
def _clean_dir(dirpath):
|
||||
@@ -113,10 +130,7 @@ def _clean_dir(dirpath):
|
||||
|
||||
|
||||
def _copy_contents(dst_dir, contents):
|
||||
items = {
|
||||
"dirs": set(),
|
||||
"files": set()
|
||||
}
|
||||
items = {"dirs": set(), "files": set()}
|
||||
|
||||
for path in contents:
|
||||
if isdir(path):
|
||||
|
Reference in New Issue
Block a user