Skip to content

Commit 1695641

Browse files
committed
Check CI
1 parent 838d8f2 commit 1695641

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

final_task/pycalc/calc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def correct_expression(expression):
148148
elif expression == '':
149149
raise CalcError('ERROR: empty expression')
150150
expression = insert_multiplication(match_negative_value(fix_missing_zero(fix_multi_operations(expression))))
151-
regex = re.compile(r'(<=|==|!=|>=|e|pi|tau|inf|nan|log1p|^-\d+\.\d+|^-\d+|(?<=\W\W)\-\d+\.\d+|(?<=\W\W)\-\d+|'
151+
regex = re.compile(r'(<=|==|!=|>=|(?<=[^a-z])e|e|pi|tau|inf|nan|log1p|^-\d+\.\d+|^-\d+|(?<=\W\W)\-\d+\.\d+|'
152+
r'(?<=\W\W)\-\d+|'
152153
r'(?<=\()\-\d+\.\d+|(?<=\()\-\d+|(?<=[a-z]\W)\-\d+\.\d+|(?<=[a-z]\W)\-\d+|(?<=\))\-|'
153154
r'\//|\/|\d+\.\d+|\d+|\W|\w+)')
154155
re_expr = re.split(regex, expression)

0 commit comments

Comments
 (0)