tirkarthi commented on PR #60274:
URL: https://github.com/apache/airflow/pull/60274#issuecomment-3738698324

   @uranusjr Thanks, I am able to reproduce it locally. I am adding cachetools 
dependency. I do see `ignore_missing_imports=True` in pyproject.yaml but see 
types added in devel-common/pyproject.toml for mypy. It seems adding 
`types-cachetools` in devel-common seems to help.
   
   
https://github.com/apache/airflow/blob/fb21525f83cc759d359419df52a36996dcf88f09/pyproject.toml#L1004-L1006
   
   
https://github.com/apache/airflow/blob/fb21525f83cc759d359419df52a36996dcf88f09/devel-common/pyproject.toml#L107-L130
   
   ```
   prek --color always --verbose --hook-stage manual "mypy-providers" 
--all-files
   Running hooks for `providers`:
   Run mypy for providers 
(manual)..........................................Failed
   - hook id: mypy-providers
   - duration: 282.93s
   - exit code: 1
   
     Running mypy with @/files/mypy_files.txt
     You cand check the list of files in: 
/home/karthikeyan/stuff/python/airflow/files/mypy_files.txt
     Running mypy with @/files/mypy_files.txt
     Regenerating provider dependencies file
     Refreshed 97 providers with 1983 Python files.
   
     Written 
/home/karthikeyan/stuff/python/airflow/generated/provider_dependencies.json
   
     Docker container engine detected.
     Attempting to generate provider dependencies. 2 pyproject.toml file(s) 
changed 
     since last check.
   
     Using 'uv' to install Airflow
   
     Using airflow version from current sources
   
     
providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:25: 
error:
     Library stubs not installed for "cachetools"  [import-untyped]
         from cachetools import TTLCache, cachedmethod
         ^
     
providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:25: 
note: Hint: "python3 -m pip install types-cachetools"
     
providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:25: 
note: (or run "mypy --install-types" to install all missing stub packages)
     
providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:25: 
note: See 
https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
     Found 1 error in 1 file (checked 4075 source files)
     Error 1 returned
     If you see strange stacktraces above, and can't reproduce it, please run 
this command and try again:
   
     breeze ci-image build --python 3.10
   
     You can also run `breeze down --cleanup-mypy-cache` to clean up the cache 
used.
   ```
   
   
   ```
   prek --color always --verbose --hook-stage manual "mypy-providers" 
--all-files
   Running hooks for `providers`:
   Run mypy for providers 
(manual)..........................................Passed
   - hook id: mypy-providers
   - duration: 261.46s
   
     Running mypy with @/files/mypy_files.txt
     You cand check the list of files in: 
/home/karthikeyan/stuff/python/airflow/files/mypy_files.txt
     Running mypy with @/files/mypy_files.txt
     Docker container engine detected.
   
     Using 'uv' to install Airflow
   
     Using airflow version from current sources
   
     Success: no issues found in 4075 source files
   ```


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