Fixed style issues which were throwing errors
The code was failing an automatic test because of style issues, which are hopefully fixed now
This commit is contained in:
@@ -43,6 +43,7 @@ import re
|
|||||||
|
|
||||||
pyfalog = Logger(__name__)
|
pyfalog = Logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def arabicOrRomanToInt(s):
|
def arabicOrRomanToInt(s):
|
||||||
m = re.match(r'\d+$', s)
|
m = re.match(r'\d+$', s)
|
||||||
if m:
|
if m:
|
||||||
@@ -51,6 +52,7 @@ def arabicOrRomanToInt(s):
|
|||||||
i = roman.fromRoman(s)
|
i = roman.fromRoman(s)
|
||||||
return i
|
return i
|
||||||
|
|
||||||
|
|
||||||
class CharacterTextValidor(BaseValidator):
|
class CharacterTextValidor(BaseValidator):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
BaseValidator.__init__(self)
|
BaseValidator.__init__(self)
|
||||||
@@ -418,7 +420,7 @@ class SkillTreeView(wx.Panel):
|
|||||||
|
|
||||||
for l in lines:
|
for l in lines:
|
||||||
s = l.strip()
|
s = l.strip()
|
||||||
skill, level = s.rsplit(None,1)[0], arabicOrRomanToInt(s.rsplit(None,1)[1])
|
skill, level = s.rsplit(None, 1)[0], arabicOrRomanToInt(s.rsplit(None, 1)[1])
|
||||||
skill = char.getSkill(skill)
|
skill = char.getSkill(skill)
|
||||||
if skill:
|
if skill:
|
||||||
skill.setLevel(level, ignoreRestrict=True)
|
skill.setLevel(level, ignoreRestrict=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user