python: Use ‘not in’ for more negated membership tests.

Fixes “E713 Test for membership should be `not in`” found by ruff (now
that I’ve fixed it not to ignore scripts lacking a .py extension).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-09-25 16:56:42 -07:00
committed by Anders Kaseorg
parent 4ba9853481
commit b267b17677
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ states = {
3: "UNKNOWN",
}
if "USER" in os.environ and not os.environ["USER"] in ["root", "rabbitmq"]:
if "USER" in os.environ and os.environ["USER"] not in ["root", "rabbitmq"]:
print("This script must be run as the root or rabbitmq user")