PY3.W0122
Exec used
Used when you use the exec statement (function for Python 3), to discourage its usage. That doesn't mean you cannot use it! It's dangerous to use this function for a user input.
Noncompliant Code:
Copy
program = input('Enter code to be executed: ')
exec(program)
Compliant Code:
Copy
programs = {'do_something': lambda: print("Do something")}
program = input('Enter a program code to be used: ')
if programs.get(program):
programs[program]()