How to update the dependencies of a driver via python script?
Here, an awesome guy gave me the solution!


  Looking at the source code, the button appears to be a direct function
  rather than a python operator:

but = uiDefIconTextBut(block, UI_BTYPE_BUT, B_IPO_DEPCHANGE, 
ICON_FILE_REFRESH, IFACE_("Update Dependencies"),
0, 0, 10 * UI_UNIT_X, UI_UNIT_Y,
NULL, 0.0, 0.0, 0, 0,
TIP_("Force updates of dependencies"));
UI_but_func_set(but, driver_update_flags_cb, fcu, NULL);

  
  The way I update a driver in my add-on is by adding and removing a
  space on the driver’s expression attribute. As far as I could tell, it
  acts the same way:

driver.expression += " "
driver.expression = driver.expression[:-1]