flake8: apply E71x rule

This commit is contained in:
Yuming Zhu 2020-02-26 04:28:55 +08:00
parent fa69c4904e
commit 6ed30954b2
13 changed files with 114 additions and 114 deletions

View file

@ -184,7 +184,7 @@ def convert_datetime(f):
def register_callback(cbtype, func):
if not cbtype in callbacks:
if cbtype not in callbacks:
raise koji.PluginError('"%s" is not a valid callback type' % cbtype)
if not callable(func):
raise koji.PluginError('%s is not callable' % getattr(func, '__name__', 'function'))
@ -192,7 +192,7 @@ def register_callback(cbtype, func):
def run_callbacks(cbtype, *args, **kws):
if not cbtype in callbacks:
if cbtype not in callbacks:
raise koji.PluginError('"%s" is not a valid callback type' % cbtype)
cache = {}
for func in callbacks[cbtype]: