eval-used / W0123#

Message emitted:

Use of eval

Description:

Used when you use the "eval" function, to discourage its usage. Consider using `ast.literal_eval` for safely evaluating strings containing Python expressions from untrusted sources.

Correct code:

from ast import literal_eval

literal_eval("[1, 2, 3]")

Problematic code:

eval("[1, 2, 3]")  # [eval-used]

Created by the basic checker.