mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-02 11:56:52 +00:00
Correct usage of tempfile
The stdlib module is tempfile not tempdir ;-)
This commit is contained in:
parent
6f08d9d4a4
commit
de587a9ccb
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ import os
|
|||
import shutil
|
||||
import stat
|
||||
import subprocess
|
||||
import tempdir
|
||||
import tempfile
|
||||
|
||||
from flake8 import defaults
|
||||
from flake8 import exceptions
|
||||
|
|
@ -144,7 +144,7 @@ def get_staged_contents_from(filename):
|
|||
|
||||
@contextlib.contextmanager
|
||||
def make_temporary_directory():
|
||||
temporary_directory = tempdir.mkdtemp()
|
||||
temporary_directory = tempfile.mkdtemp()
|
||||
yield temporary_directory
|
||||
shutil.rmtree(temporary_directory, ignore_errors=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue