Skip to content

Commit

Permalink
[skin] parseCoordinates, no need to force floats in python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Huevos authored Sep 17, 2024
1 parent 41d4c6e commit 6d1c323
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/python/skin.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,17 @@ def parseCoordinate(s, e, size=0, font=None):
return 0
# No test on "e" because it's already a variable
if "center" in s:
center = (e - size) / 2.0 # noqa: F841
center = (e - size) / 2 # noqa: F841
if "c" in s:
c = e / 2.0 # noqa: F841 do not remove c variable
c = e / 2 # noqa: F841 do not remove c variable
if "w" in s:
s = s.replace("w", "*w")
w = float(font in fonts and fonts[font][3] or 0) # noqa: F841
if "h" in s:
s = s.replace("h", "*h")
h = float(font in fonts and fonts[font][2] or 0) # noqa: F841
if "%" in s:
s = s.replace("%", "*e / 100.0") # noqa: F841
s = s.replace("%", "*e / 100") # noqa: F841
if "f" in s:
f = getSkinFactor() # noqa: F841
# Don't bother trying an int() conversion,
Expand Down

0 comments on commit 6d1c323

Please sign in to comment.