Make docker inventory plugin more Pythonic

There's no need to check if kwargs is empty before iterating over it.
Make code more PEP8 compliant (if len(seq))

> For sequences, (strings, lists, tuples), use the fact that empty
> sequences are false.
>
>     Yes: if not seq:
>          if seq:
>
>     No: if len(seq)
>         if not len(seq)