mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-14 16:34:46 +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 shutil
|
||||||
import stat
|
import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempdir
|
import tempfile
|
||||||
|
|
||||||
from flake8 import defaults
|
from flake8 import defaults
|
||||||
from flake8 import exceptions
|
from flake8 import exceptions
|
||||||
|
|
@ -144,7 +144,7 @@ def get_staged_contents_from(filename):
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def make_temporary_directory():
|
def make_temporary_directory():
|
||||||
temporary_directory = tempdir.mkdtemp()
|
temporary_directory = tempfile.mkdtemp()
|
||||||
yield temporary_directory
|
yield temporary_directory
|
||||||
shutil.rmtree(temporary_directory, ignore_errors=True)
|
shutil.rmtree(temporary_directory, ignore_errors=True)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue