From 1b245491fe4436a472584a4a44f8cb4fb4add630 Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Tue, 1 May 2018 12:52:23 +0200 Subject: [PATCH] Fix style --- SConstruct | 14 ++++++++------ tools/multi_platform_release.py | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/SConstruct b/SConstruct index b7555243..66dddc63 100644 --- a/SConstruct +++ b/SConstruct @@ -121,7 +121,7 @@ if env["gdnative_include_dir"]: if env["gdnative_wrapper_lib"]: env["gdnative_wrapper_lib"] = File(env["gdnative_wrapper_lib"]) -env["build_name"] = '%s-%s' % (env['platform'], env["backend"]) +env["build_name"] = "%s-%s" % (env["platform"], env["backend"]) env["build_dir"] = Dir("#build/%s" % env["build_name"]) @@ -240,9 +240,13 @@ def extract_version(): def generate_build_dir_hook(path): with open("misc/single_build_pythonscript.gdnlib") as fd: - gdnlib = fd.read().replace(env['build_name'], '') + gdnlib = fd.read().replace(env["build_name"], "") # Single platform vs multi-platform one have not the same layout - gdnlib = re.sub(r'(res://pythonscript/)(x11|windows|osx)-(64|32)-(cpython|pypy)/', r'\1', gdnlib) + gdnlib = re.sub( + r"(res://pythonscript/)(x11|windows|osx)-(64|32)-(cpython|pypy)/", + r"\1", + gdnlib, + ) with open(os.path.join(path, "pythonscript.gdnlib"), "w") as fd: fd.write(gdnlib) @@ -346,9 +350,7 @@ env.AlwaysBuild("example") def generate_release(target, source, env): base_name, format = target[0].abspath.rsplit(".", 1) - shutil.make_archive( - base_name, format, root_dir=source[0].abspath - ) + shutil.make_archive(base_name, format, root_dir=source[0].abspath) release = env.Command( diff --git a/tools/multi_platform_release.py b/tools/multi_platform_release.py index c845e77c..eed3afc4 100755 --- a/tools/multi_platform_release.py +++ b/tools/multi_platform_release.py @@ -80,7 +80,7 @@ def orchestrator(targets, version, src, dst, buildzip): readme = fd.read().format( version=version, date=datetime.utcnow().strftime("%Y-%m-%d") ) - with open("%s/README.txt" % dst, 'w') as fd: + with open("%s/README.txt" % dst, "w") as fd: fd.write(readme) if buildzip: