jscheffl opened a new pull request, #41715:
URL: https://github.com/apache/airflow/pull/41715

   This PR fixes the Mypy Errors I see on my PR since universal-pathlib 0.2.3 
has been released:
   
   Manual MyPy Airflow:
   ```
    airflow/io/path.py:201: error: Unexpected keyword argument "overwrite" for
   "rename" of "UPath"  [call-arg]
               return self.rename(target, overwrite=True)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ```
   Manual MyPy Providers:
   ```
   airflow/providers/common/io/xcom/backend.py:145: error: Argument 1 to
   "joinpath" of "UPath" has incompatible type "Optional[str]"; expected
   "Union[str, PathLike[str]]"  [arg-type]
                   p = base_path.joinpath(dag_id, run_id, task_id, f"{uuid.uu...
                                          ^~~~~~
   airflow/providers/common/io/xcom/backend.py:145: error: Argument 2 to
   "joinpath" of "UPath" has incompatible type "Optional[str]"; expected
   "Union[str, PathLike[str]]"  [arg-type]
                   p = base_path.joinpath(dag_id, run_id, task_id, f"{uuid.uu...
                                                  ^~~~~~
   airflow/providers/common/io/xcom/backend.py:145: error: Argument 3 to
   "joinpath" of "UPath" has incompatible type "Optional[str]"; expected
   "Union[str, PathLike[str]]"  [arg-type]
       ...          p = base_path.joinpath(dag_id, run_id, task_id, 
f"{uuid.uuid...
                                                           ^~~~~~~
   ```
   
   Where the interface for XCom only allows a pre-raising if params are 
missing, the error in core with `overwrite` is something where logic might need 
to be adjusted for a permanent fix. But as this turns all PRs red, proposing to 
just pin version to 0.2.2 for the moment.
   
   @bolkedebruin Do you have a better idea?


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