bolkedebruin commented on code in PR #35747:
URL: https://github.com/apache/airflow/pull/35747#discussion_r1398791878


##########
airflow/io/path.py:
##########
@@ -89,15 +83,18 @@ class ObjectStoragePath(CloudPath):
         "_hash",
     )
 
-    def __new__(cls: type[PT], *args: str | os.PathLike, **kwargs: typing.Any) 
-> PT:
+    def __new__(
+        cls: type[PT],
+        *args: str | os.PathLike,
+        scheme: str | None = None,

Review Comment:
   Again this overrides the original function spec. I'm not sure if we want to 
diverge.



##########
airflow/io/path.py:
##########
@@ -40,21 +40,15 @@
 
 PT = typing.TypeVar("PT", bound="ObjectStoragePath")
 
-default = "file"
-
 
 class _AirflowCloudAccessor(_CloudAccessor):
     __slots__ = ("_store",)
 
-    def __init__(self, parsed_url: SplitResult | None, **kwargs: typing.Any) 
-> None:
-        store = kwargs.pop("store", None)
-        conn_id = kwargs.pop("conn_id", None)
-        if store:
-            self._store = store
-        elif parsed_url and parsed_url.scheme:
+    def __init__(self, parsed_url: SplitResult | None, conn_id: str, **kwargs: 
typing.Any) -> None:

Review Comment:
   This overrides the __init__ constructor of the parent (CloudAccessor). While 
we are not using it in that way, I wanted to keep it the same so it is 
interchangeable. 



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to