khalidmammadov commented on issue #19891:
URL: https://github.com/apache/airflow/issues/19891#issuecomment-983519003


   As a reference/check, this is how I get the list of issues that needs fixing 
in test/* folder. 
   I first created requirement file to install required packages (inline with 
latest changes into repo)
   ```
   [venv_airflow] ~/dev/oss/airflow (main*)$ cat ../mypy_requirements.txt 
   mypy==0.910
   types-croniter
   types-docutils
   types-freezegun
   types-paramiko
   types-protobuf
   types-python-dateutil
   types-python-slugify
   types-pytz
   types-redis
   types-requests
   types-setuptools
   types-termcolor
   types-tabulate
   types-Markdown
   types-PyMySQL
   types-PyYAML
   
   pip install -r ../mypy_requirements.txt
   
   # and run below
   [venv_airflow] ~/dev/oss/airflow (main*)$ mypy tests/
   airflow/utils/weekday.py:62: error: Argument 1 to <set> has incompatible 
type "WeekDay"; expected "str"
                       week_day = {week_day}
                                   ^
   airflow/utils/edgemodifier.py:41: error: Incompatible default for argument 
"label" (default has type "None", argument has type "str")
           def __init__(self, label: str = None):
   ..........       
                      ^
   tests/plugins/test_plugins_manager.py:45: error: Incompatible types in 
assignment (expression has type "str", variable has type Module)
               importlib_metadata = 'importlib.metadata'
                                    ^
   Found 426 errors in 96 files (checked 1206 source files)
   ```
   
   @potiuk does it sound reasonable or shall I use pre-commit run mypy ...  
(which I did try but didnt get list and didnt look into it too much TBH)


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