title: Invalid syntax issue with mongodb update query
body: <p>I am using mongoDB as my project's database. Project is written in python and I am using the pymongo library. I am attempting to update certain fields in my documents, but keep getting the "invalid syntax error". To make it stranger, I can get the same query to run fine in mongo shell. However, the same line of code in my .py file throws the invalid error. </p>
  
  <p>Tried other queries, e.f. find() and generic update (not using the $set operator), and those work fine.  </p>
  
  <p>The following piece of code throws the invalid syntax error in VS code. However, this same exact code runs fine in mongo shell.   </p>
  
  <p><code>db.fearlessData.update({"Country":"Canada"},{$set: {"Type":"Canadian_Wedding_2"}}, {multi:true})</code></p>
  
  <p>---- when I run in mongo shell:</p>
  
  <pre><code>&gt; db.fearlessData.update({"Country":"Canada"},{$set: {"Type":"Canadian_Wedding_2"}}, {multi:true})
  
  WriteResult({ "nMatched" : 10, "nUpserted" : 0, "nModified" : 0 })
  </code></pre>
  
  <p>----The general update query also runs fine in the .py file (no syntax error)</p>
  
  <pre><code>db.fearlessData.update({"Name":"Test_Elena2"},{"Name":"Test_Elena_3"})
  </code></pre>
  
  <p>Expect the code to run without any syntax error.<a href="https://i.stack.imgur.com/WJL11.png" rel="nofollow noreferrer">enter image description here</a></p>