Skip to content

Commit

Permalink
fix some of the issues reported by codacity
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Jul 3, 2017
1 parent f82bb72 commit e5dbebe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions tools/build-addon-index.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
import sexpr


def escape_str(str):
return "\"%s\"" % str.replace("\"", "\\\"")
def escape_str(string):
return "\"%s\"" % string.replace("\"", "\\\"")


class Addon:
class Addon(object):
def __init__(self, filename):
lst = sexpr.parse(filename)
if lst[0][0] != "supertux-addoninfo":
Expand Down
2 changes: 1 addition & 1 deletion tools/font-add-border.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def fix_font_file(filename, glyph_width, glyph_height):
print("Processing %s %dx%d" % (filename, glyph_width, glyph_height))
img = Image.open(filename)
w, h = img.size

assert w % glyph_width == 0, "image not multiple of glyph width"
assert h % glyph_height == 0, "image not multiple of glyph height"

Expand Down
2 changes: 1 addition & 1 deletion tools/font-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import math
import re

class FontGenerator:
class FontGenerator(object):

def __init__(self):
self.font_size = 24
Expand Down
6 changes: 3 additions & 3 deletions tools/levelconverter-0.0.6_0.0.7.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
['d', "cloud-00.png", 90],
['e', "cloud-00.png", 91],
['f', "cloud-00.png", 92],

['G', "bkgd-00.png", 93],
['H', "bkgd-01.png", 94],
['I', "bkgd-02.png", 95],
['J', "bkgd-03.png", 96],

['g', "bkgd-10.png", 97],
['h', "bkgd-11.png", 98],
['i', "bkgd-12.png", 99],
['j', "bkgd-13.png", 100],

['#', "solid0.png", 11],
['[', "solid1.png", 13],
['=', "solid2.png", 14],
Expand Down
6 changes: 3 additions & 3 deletions tools/upload_supertux_wiki.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ fi
# MD5SUM=`md5sum "$1" | cut -c "1-32"`
# echo "MD5Sum: $MD5SUM"

STEP1_FILE="`tempfile`"
STEP2_FILE="`tempfile`"
COOKIES_FILE="`tempfile`"
STEP1_FILE="$(tempfile)"
STEP2_FILE="$(tempfile)"
COOKIES_FILE="$(tempfile)"

curl \
-c "$COOKIES_FILE" \
Expand Down

0 comments on commit e5dbebe

Please sign in to comment.