Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
scripts: use str.format() instead of concatenating in some places
  • Loading branch information
antonv6 committed Jul 28, 2018
1 parent 95a0430 commit 7ee81c9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SpriteEncoder/decode.py
Expand Up @@ -158,7 +158,7 @@ def save(self):
y = y + 1
continue

im.save("sprite_" + str(self.number) + ".png")
im.save("sprite_{}.png".format(self.number))


inf = Infile("x.out")
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_language_files_not_BOM.py
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_lua_classes.py
Expand Up @@ -24,7 +24,7 @@
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:")
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_trailing_whitespaces.py
Expand Up @@ -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:
Expand Down

0 comments on commit 7ee81c9

Please sign in to comment.