Q:

Why does PyCharm give me warnings for "Duplicate *arg"?

Using Python 3.5, I'm inserting multiple multi-dimensional lists into a MySQL Query that inserts multiple rows into a table. Here is my execution code snippet:
for x, y, z, i in zip(list1, list2, list3, list4):
    cursor.execute(add_related_accounts_query.format(x[0], *y, *z, *i))

The query works fine but PyCharm is giving me this warning: 

Duplicate *args
This inspection reports discrepancies between declared parameters and
  actual arguments, as well as incorrect arguments and incorrect
  argument order.

If I press Alt+Enter to fix the warning through PyCharm, it eliminates *z, *i and then the query no longer works.
Can someone please explain why this warning is issued if its solution breaks my script?

A:

PyCharm probably only expects you to pass one *args list into a function.  You could add x, y and i before expanding them and I imagine pycharm would stop complaining. 
cursor.execute(add_related_accounts_query.format(x[0], *(y+z+i))

You have to take the pycharm warnings with a grain of salt though.  It's not always perfect.  It has a set of comments you can place before lines like this to force it to ignore the warning.

