uranusjr commented on pull request #19886:
URL: https://github.com/apache/airflow/pull/19886#issuecomment-983087225


   I pushed a commit with a `context.pyi` file that defines Context as a 
TypedDict. This makes VSCore + Python extension trigger autocompletion on 
context keys (if the `context` argument is annotated as `Context`). I also 
moved some code to the module.
   
   One nice thing about Context being (faked as) a TypedDict is, all existing 
`def execute(self, context: Dict):` annotations now suddenly become correct, 
because a TypedDict is automatically `Dict[str, Any]`! Everything works out on 
their own.


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