amoghrajesh commented on code in PR #56270:
URL: https://github.com/apache/airflow/pull/56270#discussion_r2400814880
##########
task-sdk/src/airflow/sdk/io/path.py:
##########
@@ -413,5 +413,5 @@ def deserialize(cls, data: dict, version: int) ->
ObjectStoragePath:
def __str__(self):
conn_id = self.storage_options.get("conn_id")
if self._protocol and conn_id:
- return f"{self._protocol}://{conn_id}@{self.path}"
Review Comment:
Maybe try using `self._url.path` instead?
##########
task-sdk/src/airflow/sdk/io/path.py:
##########
@@ -294,7 +294,7 @@ def _cp_file(self, dst: ObjectStoragePath, **kwargs):
# make use of system dependent buffer size
shutil.copyfileobj(f1, f2, **kwargs)
- def copy(self, dst: str | ObjectStoragePath, recursive: bool = False,
**kwargs) -> None:
+ def copy(self, dst: str | ObjectStoragePath, recursive: bool = False,
**kwargs) -> None: # type: ignore[override]
Review Comment:
0.3.0 changes it to:
```
def copy(self, target: T, **kwargs: Any) -> T: ...
```
So could you instead try:
```
def copy(self, target: str | ObjectStoragePath, recursive: bool = False,
**kwargs) -> None:
```
--
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]