From 7610b88f8e486861fefb089bfd557fc636cd6dc3 Mon Sep 17 00:00:00 2001 From: Artur Barseghyan Date: Wed, 11 Sep 2024 21:06:23 +0200 Subject: [PATCH] Clean up (#6) --- fakepy/django_storage/base.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/fakepy/django_storage/base.py b/fakepy/django_storage/base.py index 2609325..88fd3cd 100644 --- a/fakepy/django_storage/base.py +++ b/fakepy/django_storage/base.py @@ -1,7 +1,6 @@ import os from abc import abstractmethod from pathlib import Path -from tempfile import NamedTemporaryFile from typing import Optional, Union from django.core.files.base import ContentFile @@ -79,16 +78,6 @@ def generate_filename( filename = f"{basename}.{extension}" - # if basename: - # filename = f"{basename}.{extension}" - # else: - # temp_file = NamedTemporaryFile( - # prefix=prefix, - # suffix=f".{extension}", - # delete=False, - # ) - # filename = Path(temp_file.name).name - return os.path.join(dir_path, filename) def write_text(