@@ -71,7 +71,7 @@ async def read_file(self, path: Path | str) -> bytes: # pyrit-async-suffix-exem
7171 Read a file from storage (deprecated alias of ``read_file_async``).
7272
7373 Args:
74- path (Union[ Path, str] ): The path to the file.
74+ path (Path | str): The path to the file.
7575
7676 Returns:
7777 bytes: The content of the file.
@@ -88,7 +88,7 @@ async def write_file(self, path: Path | str, data: bytes) -> None: # pyrit-asyn
8888 Write data to storage (deprecated alias of ``write_file_async``).
8989
9090 Args:
91- path (Union[ Path, str] ): The path to the file.
91+ path (Path | str): The path to the file.
9292 data (bytes): The content to write to the file.
9393 """
9494 print_deprecation_message (
@@ -103,7 +103,7 @@ async def path_exists(self, path: Path | str) -> bool: # pyrit-async-suffix-exe
103103 Check whether a path exists (deprecated alias of ``path_exists_async``).
104104
105105 Args:
106- path (Union[ Path, str] ): The path to check.
106+ path (Path | str): The path to check.
107107
108108 Returns:
109109 bool: True if the path exists, False otherwise.
@@ -120,7 +120,7 @@ async def is_file(self, path: Path | str) -> bool: # pyrit-async-suffix-exempt
120120 Check whether the given path is a file (deprecated alias of ``is_file_async``).
121121
122122 Args:
123- path (Union[ Path, str] ): The path to check.
123+ path (Path | str): The path to check.
124124
125125 Returns:
126126 bool: True if the path is a file, False otherwise.
@@ -137,7 +137,7 @@ async def create_directory_if_not_exists(self, path: Path | str) -> None: # pyr
137137 Create a directory if it does not exist (deprecated alias of ``create_directory_if_not_exists_async``).
138138
139139 Args:
140- path (Union[ Path, str] ): The directory path to create.
140+ path (Path | str): The directory path to create.
141141 """
142142 print_deprecation_message (
143143 old_item = "pyrit.memory.storage.storage.StorageIO.create_directory_if_not_exists" ,
@@ -157,7 +157,7 @@ async def read_file_async(self, path: Path | str) -> bytes:
157157 Asynchronously reads a file from the local disk.
158158
159159 Args:
160- path (Union[ Path, str] ): The path to the file.
160+ path (Path | str): The path to the file.
161161
162162 Returns:
163163 bytes: The content of the file.
@@ -225,7 +225,7 @@ def _convert_to_path(self, path: Path | str) -> Path:
225225 Convert an input path to a Path object.
226226
227227 Args:
228- path (Union[ Path, str] ): Input path value.
228+ path (Path | str): Input path value.
229229
230230 Returns:
231231 Path: Normalized Path instance.
@@ -250,8 +250,8 @@ def __init__(
250250 Initialize an Azure Blob Storage I/O adapter.
251251
252252 Args:
253- container_url (Optional[ str] ): Azure Blob container URL.
254- sas_token (Optional[ str] ): Optional SAS token.
253+ container_url (str | None ): Azure Blob container URL.
254+ sas_token (str | None ): Optional SAS token.
255255 blob_content_type (SupportedContentType): Blob content type for uploads.
256256
257257 Raises:
@@ -394,7 +394,7 @@ def _resolve_blob_name(self, path: Path | str) -> str:
394394 created on Windows still produce valid blob names.
395395
396396 Args:
397- path (Union[ Path, str] ): Blob URL or relative blob path.
397+ path (Path | str): Blob URL or relative blob path.
398398
399399 Returns:
400400 str: The resolved blob name.
@@ -458,7 +458,7 @@ async def write_file_async(self, path: Path | str, data: bytes) -> None:
458458 If a relative path is provided, it is used as the blob name directly.
459459
460460 Args:
461- path (Union[ Path, str] ): Full blob URL or relative blob path.
461+ path (Path | str): Full blob URL or relative blob path.
462462 data (bytes): The data to write.
463463 """
464464 if not self ._client_async :
@@ -477,7 +477,7 @@ async def path_exists_async(self, path: Path | str) -> bool:
477477 Check whether a given path exists in the Azure Blob Storage container.
478478
479479 Args:
480- path (Union[ Path, str] ): Blob URL or path to test.
480+ path (Path | str): Blob URL or path to test.
481481
482482 Returns:
483483 bool: True when the path exists.
@@ -501,7 +501,7 @@ async def is_file_async(self, path: Path | str) -> bool:
501501 Check whether the path refers to a file (blob) in Azure Blob Storage.
502502
503503 Args:
504- path (Union[ Path, str] ): Blob URL or path to test.
504+ path (Path | str): Blob URL or path to test.
505505
506506 Returns:
507507 bool: True when the blob exists and has non-zero content size.
@@ -525,7 +525,7 @@ async def create_directory_if_not_exists_async(self, directory_path: Path | str)
525525 Log a no-op directory creation for Azure Blob Storage.
526526
527527 Args:
528- directory_path (Union[ Path, str] ): Requested directory path.
528+ directory_path (Path | str): Requested directory path.
529529
530530 """
531531 logger .info (
0 commit comments