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 2021/12/10 15:38:20 UTC

[GitHub] [airflow] josh-fell edited a comment on issue #19891: Re-enable MyPy

josh-fell edited a comment on issue #19891:
URL: https://github.com/apache/airflow/issues/19891#issuecomment-991073962


   > A better fix is
   > 
   > ```python
   > if sys.version_info >= (3, 8):
   >     from functools import cached_property
   > else:
   >     from cached_property import cached_property
   > ```
   > 
   > This is the solution used in `airflow.compat.functools`, which should be used by “proper” Airflow code. But providers unfortunately cannot use it (yet). Since `cached_property` is a single-use decorator, simply ignoring the error is also considered acceptable.
   
   @uranusjr My recent mypy fix for Azure used that marker in `airflow/providers/microsoft/azure/log/wasb_task_handler.py`. Happy to implement your suggestion instead if you feel it's best. 


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