omkar-foss commented on code in PR #42914:
URL: https://github.com/apache/airflow/pull/42914#discussion_r1800412509


##########
airflow/utils/api_migration.py:
##########
@@ -25,13 +25,10 @@
 
 from typing import Callable, TypeVar
 
-from airflow.typing_compat import ParamSpec
-
-PS = ParamSpec("PS")
 RT = TypeVar("RT")
 
 
-def mark_fastapi_migration_done(function: Callable[PS, RT]) -> Callable[PS, 
RT]:
+def mark_fastapi_migration_done(function: Callable[..., RT]) -> Callable[..., 
RT]:

Review Comment:
   Yes sure, have added `...` in place or `PS` to accept any param, as the mypy 
tests had been failing after `mark_fastapi_migration_done` was used 
[here](https://github.com/apache/airflow/pull/42914/files#diff-bf872a9f63486e4349959ddd97e607b9779221bd15a049fd1b94e9276d2d0bf5R219),
 with the error as given below.
   
   If there's a better way to fix this, please let me know, will update PR 
accordingly. Thanks!
   
   ```bash
   airflow/api_connexion/endpoints/dag_endpoint.py:217: error: Argument 1 to
   "mark_fastapi_migration_done" has incompatible type
   "Union[Callable[[str, Any], Union[Response, tuple[object, int], Mapping[str, 
Any]]], Callable[..., Any]]";
   expected "Callable[[VarArg(str), KwArg(Any)], Any]"  [arg-type]
       @mark_fastapi_migration_done
        ^
   Found 1 error in 1 file (checked 1046 source files)
   Error 1 returned
   ```



-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to