You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/10 05:31:18 UTC
[GitHub] [airflow] uranusjr commented on a change in pull request #21442: Fix Resources __eq__ check
uranusjr commented on a change in pull request #21442:
URL: https://github.com/apache/airflow/pull/21442#discussion_r803313059
##########
File path: airflow/utils/operator_resources.py
##########
@@ -50,6 +50,8 @@ def __init__(self, name, units_str, qty):
self._qty = qty
def __eq__(self, other):
+ if not isinstance(other, self.__class__):
+ return False
Review comment:
Probably better to use `NotImplemented` instead. https://docs.python.org/3.6/library/constants.html#NotImplemented
--
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