jscheffl commented on PR #66899:
URL: https://github.com/apache/airflow/pull/66899#issuecomment-4449419221

   Not sure if considered but besides making it static check at coding time, 
have we considered making this a runtime property handled by Pydantic?
   ```
   class BaseCommClass(BaseModel):
       """Base type class."""
   
       type: str = "__undefined__"
   
       def __init__(self):
           super().__init__()
           self.type = self.__class__.__name__
   
   class MyType1(BaseCommClass):
       """Another type."""
   
       pass
   
   class MyType2(BaseCommClass):
       """Another type."""
   
       pass
   
   
   print(MyType1().type)
   print(MyType2().type)
   ```


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