You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/02/10 18:04:59 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #28926: Upgrade mypy to 0.991

uranusjr commented on code in PR #28926:
URL: https://github.com/apache/airflow/pull/28926#discussion_r1103066260


##########
airflow/timetables/simple.py:
##########
@@ -55,6 +55,9 @@ def serialize(self) -> dict[str, Any]:
     def infer_manual_data_interval(self, *, run_after: DateTime) -> DataInterval:
         return DataInterval.exact(run_after)
 
+    def validate(self):

Review Comment:
   I kind of figured out what’s going on. Mypy seems to treat a function with `pass` as “empty” and ignore its presence. It’s a bug, but easier to work around (by replacing `pass` with `return`).



##########
airflow/timetables/simple.py:
##########
@@ -55,6 +55,9 @@ def serialize(self) -> dict[str, Any]:
     def infer_manual_data_interval(self, *, run_after: DateTime) -> DataInterval:
         return DataInterval.exact(run_after)
 
+    def validate(self):

Review Comment:
   I kind of figured out what’s going on. Mypy seems to treat a function with `pass` as “empty” and ignore its presence. It’s a bug, but easier to work around (by replacing `pass` with `return` in the protocol).



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

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