---
source: crates/ruff_linter/src/rules/airflow/mod.rs
---
AIR303 `create_asset` signature is changed in Airflow 3.0
 --> AIR303.py:7:5
  |
5 | # airflow.lineage.hook
6 | hlc = HookLineageCollector()
7 | hlc.create_asset("there")
  |     ^^^^^^^^^^^^
8 | hlc.create_asset("should", "be", "no", "posarg")
9 | hlc.create_asset(name="but", uri="kwargs are ok")
  |
help: Pass positional arguments as keyword arguments (e.g., `create_asset(uri=...)`)

AIR303 `create_asset` signature is changed in Airflow 3.0
  --> AIR303.py:8:5
   |
 6 | hlc = HookLineageCollector()
 7 | hlc.create_asset("there")
 8 | hlc.create_asset("should", "be", "no", "posarg")
   |     ^^^^^^^^^^^^
 9 | hlc.create_asset(name="but", uri="kwargs are ok")
10 | hlc.create_asset()
   |
help: Pass positional arguments as keyword arguments (e.g., `create_asset(uri=...)`)

AIR303 `create_asset` signature is changed in Airflow 3.0
  --> AIR303.py:13:24
   |
12 | HookLineageCollector().create_asset(name="but", uri="kwargs are ok")
13 | HookLineageCollector().create_asset("there")
   |                        ^^^^^^^^^^^^
14 | HookLineageCollector().create_asset("should", "be", "no", "posarg")
   |
help: Pass positional arguments as keyword arguments (e.g., `create_asset(uri=...)`)

AIR303 `create_asset` signature is changed in Airflow 3.0
  --> AIR303.py:14:24
   |
12 | HookLineageCollector().create_asset(name="but", uri="kwargs are ok")
13 | HookLineageCollector().create_asset("there")
14 | HookLineageCollector().create_asset("should", "be", "no", "posarg")
   |                        ^^^^^^^^^^^^
15 |
16 | args = ["uri_value"]
   |
help: Pass positional arguments as keyword arguments (e.g., `create_asset(uri=...)`)

AIR303 `create_asset` signature is changed in Airflow 3.0
  --> AIR303.py:17:5
   |
16 | args = ["uri_value"]
17 | hlc.create_asset(*args)
   |     ^^^^^^^^^^^^
18 | HookLineageCollector().create_asset(*args)
   |
help: Pass positional arguments as keyword arguments (e.g., `create_asset(uri=...)`)

AIR303 `create_asset` signature is changed in Airflow 3.0
  --> AIR303.py:18:24
   |
16 | args = ["uri_value"]
17 | hlc.create_asset(*args)
18 | HookLineageCollector().create_asset(*args)
   |                        ^^^^^^^^^^^^
19 |
20 | # Literal unpacking
   |
help: Pass positional arguments as keyword arguments (e.g., `create_asset(uri=...)`)

AIR303 `create_asset` signature is changed in Airflow 3.0
  --> AIR303.py:21:5
   |
20 | # Literal unpacking
21 | hlc.create_asset(*["literal_uri"])
   |     ^^^^^^^^^^^^
22 | HookLineageCollector().create_asset(*["literal_uri"])
   |
help: Pass positional arguments as keyword arguments (e.g., `create_asset(uri=...)`)

AIR303 `create_asset` signature is changed in Airflow 3.0
  --> AIR303.py:22:24
   |
20 | # Literal unpacking
21 | hlc.create_asset(*["literal_uri"])
22 | HookLineageCollector().create_asset(*["literal_uri"])
   |                        ^^^^^^^^^^^^
23 |
24 | # starred args with keyword args
   |
help: Pass positional arguments as keyword arguments (e.g., `create_asset(uri=...)`)

AIR303 `create_asset` signature is changed in Airflow 3.0
  --> AIR303.py:25:5
   |
24 | # starred args with keyword args
25 | hlc.create_asset(*args, extra="value")
   |     ^^^^^^^^^^^^
26 | HookLineageCollector().create_asset(*args, extra="value")
   |
help: Pass positional arguments as keyword arguments (e.g., `create_asset(uri=...)`)

AIR303 `create_asset` signature is changed in Airflow 3.0
  --> AIR303.py:26:24
   |
24 | # starred args with keyword args
25 | hlc.create_asset(*args, extra="value")
26 | HookLineageCollector().create_asset(*args, extra="value")
   |                        ^^^^^^^^^^^^
27 |
28 | # Double-starred keyword arguments
   |
help: Pass positional arguments as keyword arguments (e.g., `create_asset(uri=...)`)

AIR303 `Dataset` signature is changed in Airflow 3.0
  --> AIR303.py:39:1
   |
38 | # second argument is of type dict, should raise diagnostic
39 | Dataset("ds1", {"extra": "metadata"})
   | ^^^^^^^
40 | Dataset("ds1", {})
41 | Dataset("ds1", dict())
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Dataset` signature is changed in Airflow 3.0
  --> AIR303.py:40:1
   |
38 | # second argument is of type dict, should raise diagnostic
39 | Dataset("ds1", {"extra": "metadata"})
40 | Dataset("ds1", {})
   | ^^^^^^^
41 | Dataset("ds1", dict())
42 | Dataset("ds1", extra_params)
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Dataset` signature is changed in Airflow 3.0
  --> AIR303.py:41:1
   |
39 | Dataset("ds1", {"extra": "metadata"})
40 | Dataset("ds1", {})
41 | Dataset("ds1", dict())
   | ^^^^^^^
42 | Dataset("ds1", extra_params)
43 | Dataset("ds1", {k: v for k, v in zip(["extra"], ["metadata"])})
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Dataset` signature is changed in Airflow 3.0
  --> AIR303.py:42:1
   |
40 | Dataset("ds1", {})
41 | Dataset("ds1", dict())
42 | Dataset("ds1", extra_params)
   | ^^^^^^^
43 | Dataset("ds1", {k: v for k, v in zip(["extra"], ["metadata"])})
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Dataset` signature is changed in Airflow 3.0
  --> AIR303.py:43:1
   |
41 | Dataset("ds1", dict())
42 | Dataset("ds1", extra_params)
43 | Dataset("ds1", {k: v for k, v in zip(["extra"], ["metadata"])})
   | ^^^^^^^
44 |
45 | # second argument is not of type dict, should not raise diagnostic
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Dataset` signature is changed in Airflow 3.0
  --> AIR303.py:53:1
   |
51 | from airflow.datasets import Dataset
52 |
53 | Dataset("ds2", {"extra": "metadata"})
   | ^^^^^^^
54 | Dataset("ds2", {})
55 | Dataset("ds2", dict())
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Dataset` signature is changed in Airflow 3.0
  --> AIR303.py:54:1
   |
53 | Dataset("ds2", {"extra": "metadata"})
54 | Dataset("ds2", {})
   | ^^^^^^^
55 | Dataset("ds2", dict())
56 | Dataset("ds2", extra_params)
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Dataset` signature is changed in Airflow 3.0
  --> AIR303.py:55:1
   |
53 | Dataset("ds2", {"extra": "metadata"})
54 | Dataset("ds2", {})
55 | Dataset("ds2", dict())
   | ^^^^^^^
56 | Dataset("ds2", extra_params)
57 | Dataset("ds2", {k: v for k, v in zip(["extra"], ["metadata"])})
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Dataset` signature is changed in Airflow 3.0
  --> AIR303.py:56:1
   |
54 | Dataset("ds2", {})
55 | Dataset("ds2", dict())
56 | Dataset("ds2", extra_params)
   | ^^^^^^^
57 | Dataset("ds2", {k: v for k, v in zip(["extra"], ["metadata"])})
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Dataset` signature is changed in Airflow 3.0
  --> AIR303.py:57:1
   |
55 | Dataset("ds2", dict())
56 | Dataset("ds2", extra_params)
57 | Dataset("ds2", {k: v for k, v in zip(["extra"], ["metadata"])})
   | ^^^^^^^
58 |
59 | Dataset("ds2")
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Asset` signature is changed in Airflow 3.0
  --> AIR303.py:66:1
   |
64 | from airflow.sdk import Asset
65 |
66 | Asset("asset1", {"extra": "metadata"})
   | ^^^^^
67 | Asset("asset1", {})
68 | Asset("asset1", dict())
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Asset` signature is changed in Airflow 3.0
  --> AIR303.py:67:1
   |
66 | Asset("asset1", {"extra": "metadata"})
67 | Asset("asset1", {})
   | ^^^^^
68 | Asset("asset1", dict())
69 | Asset("asset1", extra_params)
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Asset` signature is changed in Airflow 3.0
  --> AIR303.py:68:1
   |
66 | Asset("asset1", {"extra": "metadata"})
67 | Asset("asset1", {})
68 | Asset("asset1", dict())
   | ^^^^^
69 | Asset("asset1", extra_params)
70 | Asset("asset1", {k: v for k, v in zip(["extra"], ["metadata"])})
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Asset` signature is changed in Airflow 3.0
  --> AIR303.py:69:1
   |
67 | Asset("asset1", {})
68 | Asset("asset1", dict())
69 | Asset("asset1", extra_params)
   | ^^^^^
70 | Asset("asset1", {k: v for k, v in zip(["extra"], ["metadata"])})
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `Asset` signature is changed in Airflow 3.0
  --> AIR303.py:70:1
   |
68 | Asset("asset1", dict())
69 | Asset("asset1", extra_params)
70 | Asset("asset1", {k: v for k, v in zip(["extra"], ["metadata"])})
   | ^^^^^
71 |
72 | Asset("asset1")
   |
help: Use keyword argument `extra` instead of passing a dict as the second positional argument (e.g., `Asset(name=..., uri=..., extra=...)`)

AIR303 `get_link` signature is changed in Airflow 3.0
  --> AIR303.py:81:9
   |
79 | # 3 positional args, 3rd NOT named 'ti_key'
80 | class DeprecatedOperatorLink1(BaseOperatorLink):
81 |     def get_link(self, operator, dttm):
   |         ^^^^^^^^
82 |         pass
   |
help: Use `def get_link(self, operator, *, ti_key)` or `def get_link(self, operator, ti_key)` as the method signature.

AIR303 `get_link` signature is changed in Airflow 3.0
   --> AIR303.py:111:9
    |
109 | # not exactly 3 positional args
110 | class InvalidOperatorLink1(BaseOperatorLink):
111 |     def get_link(self, operator):
    |         ^^^^^^^^
112 |         pass
    |
help: Use `def get_link(self, operator, *, ti_key)` or `def get_link(self, operator, ti_key)` as the method signature.

AIR303 `get_link` signature is changed in Airflow 3.0
   --> AIR303.py:115:9
    |
114 | class InvalidOperatorLink2(BaseOperatorLink):
115 |     def get_link(self, operator, ti_key, extra):
    |         ^^^^^^^^
116 |         pass
    |
help: Use `def get_link(self, operator, *, ti_key)` or `def get_link(self, operator, ti_key)` as the method signature.

AIR303 `get_link` signature is changed in Airflow 3.0
   --> AIR303.py:119:9
    |
118 | class InvalidOperatorLink3(BaseOperatorLink):
119 |     def get_link(self, operator, *, something):
    |         ^^^^^^^^
120 |         pass
    |
help: Use `def get_link(self, operator, *, ti_key)` or `def get_link(self, operator, ti_key)` as the method signature.

AIR303 `get_link` signature is changed in Airflow 3.0
   --> AIR303.py:136:9
    |
134 | # 3 positional args, 3rd NOT named 'ti_key'
135 | class DeprecatedOperatorLink2(BaseOperatorLink):
136 |     def get_link(self, operator, dttm):
    |         ^^^^^^^^
137 |         pass
    |
help: Use `def get_link(self, operator, *, ti_key)` or `def get_link(self, operator, ti_key)` as the method signature.

AIR303 `get_link` signature is changed in Airflow 3.0
   --> AIR303.py:166:9
    |
164 | # not exactly 3 positional args
165 | class InvalidOperatorLink4(BaseOperatorLink):
166 |     def get_link(self, operator):
    |         ^^^^^^^^
167 |         pass
    |
help: Use `def get_link(self, operator, *, ti_key)` or `def get_link(self, operator, ti_key)` as the method signature.

AIR303 `get_link` signature is changed in Airflow 3.0
   --> AIR303.py:170:9
    |
169 | class InvalidOperatorLink5(BaseOperatorLink):
170 |     def get_link(self, operator, ti_key, extra):
    |         ^^^^^^^^
171 |         pass
    |
help: Use `def get_link(self, operator, *, ti_key)` or `def get_link(self, operator, ti_key)` as the method signature.

AIR303 `get_link` signature is changed in Airflow 3.0
   --> AIR303.py:174:9
    |
173 | class InvalidOperatorLink6(BaseOperatorLink):
174 |     def get_link(self, operator, *, something):
    |         ^^^^^^^^
175 |         pass
    |
help: Use `def get_link(self, operator, *, ti_key)` or `def get_link(self, operator, ti_key)` as the method signature.
