diff --git a/plugfs/azure.py b/plugfs/azure.py index d82653a..1326294 100644 --- a/plugfs/azure.py +++ b/plugfs/azure.py @@ -1,5 +1,5 @@ import os -from typing import cast, final +from typing import final from azure.core.exceptions import ResourceNotFoundError from azure.storage.blob.aio import ContainerClient @@ -92,9 +92,7 @@ async def get_size(self, path: str) -> int: except ResourceNotFoundError as error: raise NotFoundException(f"Failed to find file '{path}'!") from error - size = cast(int, stream.size) - - return size + return stream.size async def makedirs(self, path: str) -> None: """Azure storage does not really have directories, so we don't need to do anything here. diff --git a/poetry.lock b/poetry.lock index a3db54c..31a9eef 100644 --- a/poetry.lock +++ b/poetry.lock @@ -189,13 +189,13 @@ aio = ["aiohttp (>=3.0)"] [[package]] name = "azure-storage-blob" -version = "12.21.0" +version = "12.22.0" description = "Microsoft Azure Blob Storage Client Library for Python" optional = false python-versions = ">=3.8" files = [ - {file = "azure-storage-blob-12.21.0.tar.gz", hash = "sha256:b9722725072f5b7373c0f4dd6d78fbae2bb37bffc5c3e01731ab8c750ee8dd7e"}, - {file = "azure_storage_blob-12.21.0-py3-none-any.whl", hash = "sha256:f9ede187dd5a0ef296b583a7c1861c6938ddd6708d6e70f4203a163c2ab42d43"}, + {file = "azure-storage-blob-12.22.0.tar.gz", hash = "sha256:b3804bb4fe8ab1c32771fa464053da772a682c2737b19da438a3f4e5e3b3736e"}, + {file = "azure_storage_blob-12.22.0-py3-none-any.whl", hash = "sha256:bb7d2d824ce3f11f14a27ee7d9281289f7e072ac8311c52e3652672455b7d5e8"}, ] [package.dependencies] @@ -1349,4 +1349,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "ad70056f674402ca857bbcf85e694e90a7fc8ccfb1eff740c8c292e1b0259ff1" +content-hash = "c0ea40c72b030e7f453046a6d9ccdc3801157bfdaf6764301f8387e496adbb40" diff --git a/pyproject.toml b/pyproject.toml index 962386a..42d2ddb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ readme = "README.md" python = "^3.12" aiofiles = "^24.1.0" aiohttp = {extras = ["speedups"], version = "^3.10.3"} -azure-storage-blob = "^12.20.0" +azure-storage-blob = "^12.22.0" [tool.poetry.group.dev.dependencies] black = "^24.8.0"