eval
PYL-W0123259 left_part = text[:operator_pos]
260 right_part = text[operator_pos + 1 :]
261 return (
262 eval(263 "{left} {operator} {right}".format(
264 left=left_part, operator=operator, right=right_part
265 )
Use of possibly insecure function - consider using safer ast.literal_eval
. Read more on why should eval
be avoided here.