We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a8af9c1 + 3f41e25 commit 79312faCopy full SHA for 79312fa
xarm/x3/parse.py
@@ -36,15 +36,15 @@ def __init__(self):
36
37
@staticmethod
38
def __get_value(string, ch, return_type, default=None):
39
- pattern = '{}(\-?\d+\.?\d*)'.format(ch)
+ pattern = r'{}(\-?\d+\.?\d*)'.format(ch)
40
data = re.findall(pattern, string)
41
if len(data) > 0:
42
return return_type(data[0])
43
return default
44
45
46
def __get_hex_value(string, ch, default=None):
47
- pattern = '{}(-?\w{{3,4}})'.format(ch)
+ pattern = r'{}(-?\w{{3,4}})'.format(ch)
48
49
50
return int(data[0], base=16)
0 commit comments