This fixes the warning/errors except for the C901 Function is
too complex in the ironic_inspector/rules.py's create method.
Bump's max-complexity to 18 in tox.ini to workaround the C901.
Story: 2001985
Task: 19604
Change-Id: I6c76a43353b1beb572dbde78dba4b4a839d45ea7