From: Kefu Chai Date: Sun, 27 Dec 2020 08:42:15 +0000 (+0800) Subject: pybind/mgr/mgr_module: use 'not in' for checking membership X-Git-Tag: v16.1.0~20^2~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a022d17ddcb5e5c20f114167335bcfdcd4b24b00;p=ceph.git pybind/mgr/mgr_module: use 'not in' for checking membership silences the warning from flake8 like test for membership should be 'not in' [E713] Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index aa4699cacca1..85124d6d7183 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -425,7 +425,7 @@ def CLIWriteCommand(prefix, args=""): def CLICheckNonemptyFileInput(func): @functools.wraps(func) def check(*args, **kwargs): - if not 'inbuf' in kwargs: + if 'inbuf' not in kwargs: return -errno.EINVAL, '', ERROR_MSG_NO_INPUT_FILE if not kwargs['inbuf'] or (isinstance(kwargs['inbuf'], str) and not kwargs['inbuf'].strip('\n')):