uranusjr opened a new pull request, #70811:
URL: https://github.com/apache/airflow/pull/70811

   The previous code (introduced in #63986)
   
       "wtforms.StringField" not in sys.modules
   
   always evaluates to True because StringField is not a module, and is never 
present in sys.modules even if wtforms IS installed and imported.
   
   Judging from surrounding code, I think the original intention is to only 
patch if wtforms is not installed (and thuse a MagicMock was injected in the 
previous block). This changes the check to reflect my assumed intention.
   
   I also tightened the custom ModuleNotFoundError a bit to carry more useful 
information.
   
   cc @Subham-KRLX


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