Add max-complexity in tox pep8

This patch changes it to raise error on 'tox -epep8' when added
function is too complex.

16 is currently the most complex thing we have:
  'ManagerService.update_lease' - blazar/manager/service.py

Change-Id: Ie839351cfe8cdbc4947c4c64513ccd067e3d1cc7
This commit is contained in:
Tetsuro Nakamura 2019-11-09 05:09:58 +00:00
parent 560c8158a2
commit b76daf1ff6
1 changed files with 5 additions and 0 deletions

View File

@ -68,6 +68,11 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,api-ref
ignore=H105,H238,E123
# [H904] Delay string interpolations at logging calls.
enable-extensions=H904
# To get a list of functions that have a complexity of 17 or more, set
# max-complexity to 17 and run 'tox -epep8'.
# 16 is currently the most complex thing we have:
# 'ManagerService.update_lease' - blazar/manager/service.py
max-complexity=17
[hacking]
local-check-factory = blazar.hacking.checks.factory