title: How to pass several list of arguments to @click.option
body: <p>I want to call a python script through the command line with this kind of parameter (list could be any size, eg with 3):</p>
  
  <pre><code>python test.py --option1 ["o11", "o12", "o13"] --option2 ["o21", "o22", "o23"]
  </code></pre>
  
  <p>using click. From the docs, it is not stated anywhere that we can use a list as parameter to <a href="http://click.pocoo.org/5/options/" rel="noreferrer">@click.option</a></p>
  
  <p>And when I try to do this:</p>
  
  <pre><code>#!/usr/bin/env python
  import click
  
  @click.command(context_settings=dict(help_option_names=['-h', '--help']))
  @click.option('--option', default=[])
  def do_stuff(option):
  
      return
  
  # do stuff
  if __name__ == '__main__':
      do_stuff()
  </code></pre>
  
  <p>in my <code>test.py</code>, by calling it from the command line:</p>
  
  <pre><code>python test.py --option ["some option", "some option 2"]
  </code></pre>
  
  <p>I get an error:</p>
  
  <blockquote>
    <p>Error: Got unexpected extra argument (some option 2])</p>
  </blockquote>
  
  <p>I can't really use variadic arguments as only 1 variadic arguments per command is allowed (<a href="http://click.pocoo.org/5/arguments/#variadic-arguments" rel="noreferrer">http://click.pocoo.org/5/arguments/#variadic-arguments</a>)</p>
  
  <p>So if anyone can point me to the right direction (using click preferably) it would be very much appreciated.</p>