mirror of https://github.com/zulip/zulip.git
python: Use ‘not in’ for negated membership tests
Fixes “E713 Test for membership should be `not in`” found by ruff (https://github.com/charliermarsh/ruff). Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
83523328c9
commit
403837e52d
|
@ -129,7 +129,7 @@ def check_other_queues(queue_counts_dict: Dict[str, int]) -> List[Dict[str, Any]
|
|||
|
||||
def check_rabbitmq_queues() -> None:
|
||||
pattern = re.compile(r"(\w+)\t(\d+)\t(\d+)")
|
||||
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")
|
||||
|
||||
list_queues_output = subprocess.check_output(
|
||||
|
|
|
@ -1193,7 +1193,7 @@ def apply_event(
|
|||
state["starred_messages"] = [
|
||||
message
|
||||
for message in state["starred_messages"]
|
||||
if not (message in event["messages"])
|
||||
if message not in event["messages"]
|
||||
]
|
||||
elif event["type"] == "realm_domains":
|
||||
if event["op"] == "add":
|
||||
|
|
Loading…
Reference in New Issue