amoghrajesh commented on PR #67118:
URL: https://github.com/apache/airflow/pull/67118#issuecomment-4542618767

   Running into: 
   
   ```
     
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:246:
 error: Argument 1 of "get_job_status" is incompatible with supertype
     "airflow.sdk.bases.resumablemixin.ResumableJobMixin"; supertype defines 
the argument type as "JsonValue"  [override]
             def get_job_status(self, external_id: str) -> str:
                                      ^~~~~~~~~~~~~~~~
     
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:246:
 note: This violates the Liskov substitution principle
     
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:246:
 note: See 
https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
     
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:318:
 error: Argument 1 of "poll_until_complete" is incompatible with supertype
     "airflow.sdk.bases.resumablemixin.ResumableJobMixin"; supertype defines 
the argument type as "JsonValue"  [override]
             def poll_until_complete(self, external_id: str, context: Context) 
-> None:
                                           ^~~~~~~~~~~~~~~~
     
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:318:
 note: This violates the Liskov substitution principle
     
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:318:
 note: See 
https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
     
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:337:
 error: Argument 1 of "get_job_result" is incompatible with supertype
     "airflow.sdk.bases.resumablemixin.ResumableJobMixin"; supertype defines 
the argument type as "JsonValue"  [override]
             def get_job_result(self, external_id: str, context: Context) -> 
None:
                                      ^~~~~~~~~~~~~~~~
     
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:337:
 note: This violates the Liskov substitution principle
     
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:337:
 note: See 
https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
     Found 3 errors in 1 file (checked 4478 source files)
   ```
   
   right now, the `external_id` can really be str, int (job id), or anything 
else. So i wonder if making the children classes / implementation use 
`JsonValue` in their functions is a good idea: `def get_job_status(self, 
external_id: JsonValue) `


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