From a022d17ddcb5e5c20f114167335bcfdcd4b24b00 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 27 Dec 2020 16:42:15 +0800 Subject: [PATCH] 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 --- src/pybind/mgr/mgr_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index aa4699cacca1a..85124d6d7183d 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')): -- 2.39.5