Zheaoli opened a new issue, #3773:
URL: https://github.com/apache/incubator-opendal/issues/3773
For now, we have different services. Each service has their own argument, it
a little bit had to use.
So I think maybe we can use the `overload` to help as solve this issue
```python
from typing import AsyncIterable, Iterable, Optional, Literal, overload
from opendal.layers import Layer
class Operator:
@overload
def __init__(self, scheme: Literal["fs"], root: str): ...
@overload
def __init__(
self,
scheme: Literal["s3"],
bucket: str,
endpoint: str,
region: str,
access_key_id: str,
secret_access_key: str,
security_token: str,
default_storage_class: str,
server_side_encryption: str,
server_side_encryption_aws_kms_key_id: str,
server_side_encryption_customer_algorithm: str,
server_side_encryption_customer_key: str,
server_side_encryption_customer_key_md5: str,
disable_config_load: str,
enable_virtual_host_style: str,
): ...
def __init__(self, scheme: str, **kwargs): ...
```
If we write the hint for the params which are depend by the service, the
developer can full use the IDE/Editor/LSP code completion function like


--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]