Fix invalid escape syntax warnings

Additionally use rawstrings with all regex calls
This commit is contained in:
wereii
2024-09-10 15:15:24 +02:00
committed by Tomas
parent 1ea6136cb2
commit 954a164922
17 changed files with 43 additions and 43 deletions

View File

@@ -96,7 +96,7 @@ class FloatBox(wx.TextCtrl):
if currentValue == self._storedValue:
event.Skip()
return
if currentValue == '' or re.match('^\d*\.?\d*$', currentValue):
if currentValue == '' or re.match(r'^\d*\.?\d*$', currentValue):
self._storedValue = currentValue
self.updateColor()
event.Skip()
@@ -131,7 +131,7 @@ class FloatRangeBox(wx.TextCtrl):
if currentValue == self._storedValue:
event.Skip()
return
if currentValue == '' or re.match('^\d*\.?\d*-?\d*\.?\d*$', currentValue):
if currentValue == '' or re.match(r'^\d*\.?\d*-?\d*\.?\d*$', currentValue):
self._storedValue = currentValue
event.Skip()
else: