jason810496 commented on code in PR #62701:
URL: https://github.com/apache/airflow/pull/62701#discussion_r2876527600


##########
task-sdk/src/airflow/sdk/io/path.py:
##########
@@ -111,13 +111,33 @@ def __init__(
         # override conn_id if explicitly provided
         if conn_id is not None:
             storage_options["conn_id"] = conn_id
+
+        # pop conn_id before calling super to prevent it from being passed
+        # to the underlying fsspec filesystem, which doesn't understand it
+        self._conn_id = storage_options.pop("conn_id", None)
         super().__init__(*args, protocol=protocol, **storage_options)
 
+    @classmethod_or_method  # type: ignore[arg-type]

Review Comment:
   Or Mypy will raise the following warning:
   
   ```
    task-sdk/src/airflow/sdk/io/path.py:120: error: Argument 1 to
     "classmethod_or_method" has incompatible type
     "Callable[[ObjectStoragePath, Any], Any]"; expected
     "def (type[Any], /, *Any, **Any) -> Any"  [arg-type]
             @classmethod_or_method
   ```
   
   and there ins't a trivial way to fixing it. If we really need to be mypy 
compatible without the inline ignore, we need  to re-defining all the method of 
parent class.



-- 
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]

Reply via email to