benbuckman commented on issue #32384:
URL: https://github.com/apache/airflow/issues/32384#issuecomment-1623831755

   mypy needs `--strict` mode to see this:
   
   host:
   ```
   $ docker run -it --rm apache/airflow:2.6.2-python3.10 bash
   ```
   
   container:
   ```
   $ pip install 'mypy==1.0.0'
   
   $ printf 'from datetime import datetime
   from airflow.decorators import dag, task
   
   @task()
   def demo_type_error() -> None:
       ...
   
   @dag(schedule=None, start_date=datetime(2021, 1, 1), catchup=False)
   def demo_dag() -> None:
       demo_type_error()
   
   demo_dag()' > /opt/airflow/dags/t.py
   
   $ cd dags
   
   # (this takes a while to build the cache the first time)
   $ mypy --strict .
   ```
   
   I see:
   
   ```
   t.py:7: error: Untyped decorator makes function "demo_type_error" untyped  
[misc]
   Found 1 error in 1 file (checked 1 source file)
   ```


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