diff --git a/SpriteEncoder/decode.py b/SpriteEncoder/decode.py index 5dc357da..22a38631 100644 --- a/SpriteEncoder/decode.py +++ b/SpriteEncoder/decode.py @@ -158,7 +158,7 @@ class Sprite: y = y + 1 continue - im.save("sprite_" + str(self.number) + ".png") + im.save("sprite_{}.png".format(self.number)) inf = Infile("x.out") diff --git a/scripts/check_language_files_not_BOM.py b/scripts/check_language_files_not_BOM.py index e41ee224..93c4c78c 100644 --- a/scripts/check_language_files_not_BOM.py +++ b/scripts/check_language_files_not_BOM.py @@ -21,7 +21,7 @@ def is_BOM_encoded_file(path): if len(sys.argv) > 2: - sys.exit('Usage: ' + sys.argv[0] + ' [root]') + sys.exit('Usage: {} [root]'.format(sys.argv[0])) top = os.getcwd() if len(sys.argv) == 2: diff --git a/scripts/check_lua_classes.py b/scripts/check_lua_classes.py index a8057505..d0ca896a 100644 --- a/scripts/check_lua_classes.py +++ b/scripts/check_lua_classes.py @@ -24,7 +24,7 @@ for root, _, files in os.walk(script_dir): problem_found = True print("Invalid/Improper Class Declarations Found:") path = print_root_regex.search(root).group(0) - print("*" + path + "\\" + script + ":" + found_class) + print("*{}:{}".format(os.path.join(path, script), found_class)) if problem_found: print("\nReason: The class declaration(s) didn't begin as follows:") diff --git a/scripts/check_trailing_whitespaces.py b/scripts/check_trailing_whitespaces.py index dbb69709..56a7bea6 100755 --- a/scripts/check_trailing_whitespaces.py +++ b/scripts/check_trailing_whitespaces.py @@ -28,7 +28,7 @@ def has_trailing_whitespaces(path): if len(sys.argv) > 2: - sys.exit('Usage: ' + sys.argv[0] + ' [root]') + sys.exit('Usage: {} [root]'.format(sys.argv[0])) top = os.getcwd() if len(sys.argv) == 2: