ashb commented on issue #26130:
URL: https://github.com/apache/airflow/issues/26130#issuecomment-1235592618
@Taragolis Attrs automatically works for subclasses, so those subclasses are
attrs classes:
```python shell
In [7]: @attr.define
...: class A:
...: x: int
In [8]: class B(A):
...: y: str
In [9]: attr.has(B())
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [9], in <module>
----> 1 attr.has(B())
TypeError: A.__init__() missing 1 required positional argument: 'x'
In [10]: attr.has(B(x=1))
Out[10]: True
```
--
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]