jmcarp commented on issue #8145: Drop redundant project id null checks.
URL: https://github.com/apache/airflow/pull/8145#issuecomment-609466462
 
 
   I was also hesitant about writing a mypy plugin, even a simple one, but as 
far as I can tell, it's the only way to write decorators that don't produce 
callables with type `Callable[..., Any]`. I also think it's not ideal that all 
decorated functions in the airflow codebase have that type. For example, users 
might see that `PubSubHook.publish` has type annotations and expect that mypy 
will catch type errors. But that's not the case, since the 
`fallback_to_default_project_id` decorator doesn't preserve function types. 
Adding the mypy plugin also caused the type checker to find some type errors in 
the codebase that it couldn't catch previously, again because decorated 
functions are effectively untyped.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to