You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/02 14:47:27 UTC

[GitHub] [airflow] ashb commented on issue #26130: Remove `cattrs` from project

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

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