summaryrefslogtreecommitdiff
path: root/django/core/files/temp.py
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2022-02-03 20:24:19 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-07 20:37:05 +0100
commit9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch)
treef0506b668a013d0063e5fba3dbf4863b466713ba /django/core/files/temp.py
parentf68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff)
downloaddjango-9c19aff7c7561e3a82978a272ecdaad40dda5c00.tar.gz
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'django/core/files/temp.py')
-rw-r--r--django/core/files/temp.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/django/core/files/temp.py b/django/core/files/temp.py
index 57a8107b37..5bd31dd5f2 100644
--- a/django/core/files/temp.py
+++ b/django/core/files/temp.py
@@ -21,10 +21,14 @@ import tempfile
from django.core.files.utils import FileProxyMixin
-__all__ = ('NamedTemporaryFile', 'gettempdir',)
+__all__ = (
+ "NamedTemporaryFile",
+ "gettempdir",
+)
-if os.name == 'nt':
+if os.name == "nt":
+
class TemporaryFile(FileProxyMixin):
"""
Temporary file object constructor that supports reopening of the
@@ -34,7 +38,8 @@ if os.name == 'nt':
__init__() doesn't support the 'delete', 'buffering', 'encoding', or
'newline' keyword arguments.
"""
- def __init__(self, mode='w+b', bufsize=-1, suffix='', prefix='', dir=None):
+
+ def __init__(self, mode="w+b", bufsize=-1, suffix="", prefix="", dir=None):
fd, name = tempfile.mkstemp(suffix=suffix, prefix=prefix, dir=dir)
self.name = name
self.file = os.fdopen(fd, mode, bufsize)