From 31e8596f736a16869a3941a0b454e64c44703ca6 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Fri, 18 Jul 2025 11:49:49 -0400 Subject: [PATCH] remove optional type --- backend/handler/filesystem/base_handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/handler/filesystem/base_handler.py b/backend/handler/filesystem/base_handler.py index 443bda907..9baeab9d7 100644 --- a/backend/handler/filesystem/base_handler.py +++ b/backend/handler/filesystem/base_handler.py @@ -7,7 +7,7 @@ from contextlib import asynccontextmanager from enum import Enum from io import BytesIO from pathlib import Path -from typing import BinaryIO, Optional +from typing import BinaryIO from anyio import open_file from config.config_manager import config_manager as cm @@ -177,7 +177,7 @@ class FSHandler: def exclude_single_files(self, files: list[str]) -> list[str]: excluded_extensions = cm.get_config().EXCLUDED_SINGLE_EXT excluded_names = cm.get_config().EXCLUDED_SINGLE_FILES - excluded_files: list = [] + excluded_files: list[str] = [] for file_name in files: # Split the file name to get the extension. @@ -270,7 +270,7 @@ class FSHandler: self, file: UploadFile | BinaryIO | BytesIO | bytes, path: str, - filename: Optional[str] = None, + filename: str | None = None, ) -> None: """ Securely write file to filesystem.