subkanthi commented on issue #19891:
URL: https://github.com/apache/airflow/issues/19891#issuecomment-1009387686


   > Hmmm, We've got a bunch of errors like this:
   > 
   > ```
   > Missing named argument "cluster_name" for "EksClusterStateSensor"
   > ```
   > 
   > Which is not an error at runtime, as we use the `default_args` to provide 
this value (which makes sense --it's the point of default_args). I don't think 
there's really a way of fixing this really without adding a bunch of type 
ignores :(
   
   
   Approach we followed was using .pyi files.
   
   
   We fixed similar problems by introducing .pyi definition for operator which 
has the field marked as optional/having default:
   
   Example: 
https://github.com/apache/airflow/pull/20422/files#diff-b203bbb3091d2f66173522a470009ba78c142564717c2168ad39d39ff7ed9a11R1
   
   Not ideal. But it will do for now. We will likely have to implement a custom 
mypy plugin to allow passing non-optional parameters by DAG's default_args and 
we can do that later.


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