Tempfile mkstemp Fixer - Replaces uses of tempfile.mktemp with tempfile.mkstemp

Suggested By

Logic

Locates instances of tempfile.mktemp() and replaces them with tempfile.mkstemp()

Examples

import tempfile
tmp_f = tempfile.mktemp()

Will raise TMP100 and suggest the Tempfile mkstemp fixer. When executed the code will become:

import tempfile
tmp_f = tempfile.mkstemp()

Keyword and ordered arguments are preserved.