Skip to content

refactor: add @override decorators to storage backend subclasses (#36406) - #36755

Merged
asukaminato0721 merged 1 commit into
langgenius:mainfrom
NishchayMahor:refactor/storage-add-override-decorators
May 28, 2026
Merged

asukaminato0721 merged 1 commit into
langgenius:mainfrom
NishchayMahor:refactor/storage-add-override-decorators

Conversation

@NishchayMahor

Copy link
Copy Markdown
Contributor

Adds `@override` decorators (from `typing.override`, per Python 3.12 target) to the `BaseStorage` subclasses under `api/extensions/storage/`. This is one of the still-uncovered class hierarchies for #36406.

74 method overrides decorated across 12 backends:

  • `AliyunOssStorage`
  • `AwsS3Storage`
  • `AzureBlobStorage`
  • `BaiduObsStorage`
  • `ClickZettaVolumeStorage`
  • `GoogleCloudStorage`
  • `HuaweiObsStorage`
  • `OpenDALStorage` (includes the overridden `scan` method too)
  • `OracleOciStorage`
  • `SupabaseStorage`
  • `TencentCosStorage`
  • `VolcengineTosStorage`

Pure additive change — runtime behaviour is unchanged.

Closes part of #36406.

```
$ uvx ruff check api/extensions/storage/
All checks passed!

$ uvx ruff format --check api/extensions/storage/
17 files already formatted
```

…ggenius#36406)

Covers the 12 BaseStorage subclasses under extensions/storage/: aliyun, aws_s3,
azure_blob, baidu_obs, clickzetta_volume, google_cloud, huawei_obs, opendal,
oracle_oci, supabase, tencent_cos, volcengine_tos.
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. refactor labels May 28, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 28, 2026
@asukaminato0721
asukaminato0721 enabled auto-merge May 28, 2026 05:51
@github-actions

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-05-28 05:52:10.543710141 +0000
+++ /tmp/pyrefly_pr.txt	2026-05-28 05:51:57.051672084 +0000
@@ -85,9 +85,9 @@
 ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
    --> extensions/ext_celery.py:246:61
 ERROR Cannot index into `Literal['']` [bad-index]
-  --> extensions/storage/huawei_obs_storage.py:27:23
+  --> extensions/storage/huawei_obs_storage.py:30:23
 ERROR Cannot index into `Literal['']` [bad-index]
-  --> extensions/storage/huawei_obs_storage.py:31:20
+  --> extensions/storage/huawei_obs_storage.py:35:20
 ERROR Argument `Module[Crypto.Hash.SHA1] | Unknown` is not assignable to parameter with type `Hash | HashModule` [bad-argument-type]
   --> libs/gmpy2_pkcs10aep_cipher.py:73:49
 ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `dify_vdb_alibabacloud_mysql.alibabacloud_mysql_vector.AlibabaCloudMySQLVectorFactory.init_vector` [bad-argument-type]

@github-actions

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 45.81% 45.81% 0.00%
Strict coverage 45.33% 45.33% 0.00%
Typed symbols 24,552 24,552 0
Untyped symbols 29,352 29,352 0
Modules 2740 2740 0

@asukaminato0721
asukaminato0721 added this pull request to the merge queue May 28, 2026
Merged via the queue into langgenius:main with commit 57b02e3 May 28, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer refactor size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants