stamixthereal commented on code in PR #28675:
URL: https://github.com/apache/airflow/pull/28675#discussion_r1062340073


##########
airflow/providers/mongo/hooks/mongo.py:
##########
@@ -74,12 +68,13 @@ def __exit__(
         exc_val: BaseException | None,
         exc_tb: TracebackType | None,
     ) -> None:
-        if self.client is not None:
-            self.close_conn()
+        if self.client:
+            self.client.close()
+            self.client = None
 
     def get_conn(self) -> MongoClient:
         """Fetches PyMongo Client"""
-        if self.client is not None:
+        if self.client:

Review Comment:
   I understand your desire to avoid conflicts and to work efficiently with the 
maintainer. It is important to approach discussions with a constructive 
attitude and to focus on finding solutions rather than trying to "win" the 
argument. If the maintainer has a preference for using one approach over the 
other, it may be more efficient to simply follow their preference, especially 
if the difference in approaches does not have a significant impact on the code. 
It is also important to consider the perspective of the maintainer and to be 
open to their suggestions and feedback. Ultimately, the goal should be to find 
a solution that works best for the project, rather than trying to prove one's 
own point of view.



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