Added utils path to pep8 checks

This commit is contained in:
2024-01-25 00:08:25 +00:00
parent 0358670071
commit b9dc10c99b
3 changed files with 7 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ def allowed_file(filename) -> bool:
return '.' in filename and \
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
def save_image(file) -> str | None:
""" Saves a given file to disk with a random UUID4 generated
filename. Returns the filename as a string.
@@ -28,6 +29,7 @@ def save_image(file) -> str | None:
file.save(os.path.join(path, filename))
return filename
def create_directory(dir: str):
""" Creates the given directory string is not alreay made """
try:
@@ -35,6 +37,7 @@ def create_directory(dir: str):
except FileExistsError:
pass
def remove_file(dir: str):
""" Removes a given file if it is present at the given dir """
try: