Introduce Black to automate code formatting

This commit is contained in:
Ivan Kravets committed 2019-09-23 23:13:48 +03:00
1 parent 5e144a2c98
commit 7c41c7c2f3
90 files changed
+4064 -3367

No files matched your search

+4 -7
View File
@@ -22,12 +22,9 @@ from platformio import util
@pytest.fixture(scope="session")
def validate_cliresult():
def decorator(result):
assert result.exit_code == 0, "{} => {}".format(
result.exception, result.output)
assert not result.exception, "{} => {}".format(result.exception,
result.output)
assert result.exit_code == 0, "{} => {}".format(result.exception, result.output)
assert not result.exception, "{} => {}".format(result.exception, result.output)
return decorator
@@ -40,10 +37,10 @@ def clirunner():
@pytest.fixture(scope="module")
def isolated_pio_home(request, tmpdir_factory):
home_dir = tmpdir_factory.mktemp(".platformio")
os.environ['PLATFORMIO_CORE_DIR'] = str(home_dir)
os.environ["PLATFORMIO_CORE_DIR"] = str(home_dir)
def fin():
del os.environ['PLATFORMIO_CORE_DIR']
del os.environ["PLATFORMIO_CORE_DIR"]
request.addfinalizer(fin)
return home_dir