uranusjr commented on code in PR #41325:
URL: https://github.com/apache/airflow/pull/41325#discussion_r1827540623


##########
airflow/decorators/assets.py:
##########
@@ -0,0 +1,159 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from __future__ import annotations
+
+import inspect
+import types
+from collections.abc import Callable
+from functools import wraps
+from typing import TYPE_CHECKING, Any, Iterator, Mapping, cast
+
+import attrs
+
+from airflow.assets import Asset, AssetRef, _validate_identifier
+from airflow.models.asset import _fetch_active_assets_by_name
+from airflow.models.dag import DAG, ScheduleArg
+from airflow.providers.standard.operators.python import PythonOperator
+
+if TYPE_CHECKING:
+    from typing import Sequence
+
+    from airflow.io.path import ObjectStoragePath
+
+
+class _AssetMainOperator(PythonOperator):
+    def __init__(self, *, definition_name: str, uri: str | None = None, 
**kwargs) -> None:
+        super().__init__(**kwargs)
+        self._definition_name = definition_name
+        self._uri = uri
+        self._active_assets: dict[str, Asset] = {}
+
+    def _iter_kwargs(self, context: Mapping[str, Any]) -> Iterator[tuple[str, 
Any]]:
+        value: Any
+        for key in inspect.signature(self.python_callable).parameters:
+            if key == "self":
+                key = "_self"

Review Comment:
   Wait what… do you have an example?



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