Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

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

Anders Kaseorgb267b17677d9
diff --git a/scripts/nagios/check-rabbitmq-consumers b/scripts/nagios/check-rabbitmq-consumers
index 1bd526b471d..03f346bb600 100755
--- a/scripts/nagios/check-rabbitmq-consumers
+++ b/scripts/nagios/check-rabbitmq-consumers
@@ -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")
diff --git a/tools/test-js-with-node b/tools/test-js-with-node
index 01b08b08b0e..55f1a93d13d 100755
--- a/tools/test-js-with-node
+++ b/tools/test-js-with-node
@@ -399,7 +399,7 @@ def enforce_proper_coverage(coverage_json: Any) -> bool:
coverage_lost = False
for relative_path in enforce_fully_covered:
path = ROOT_DIR + "/" + relative_path
- if not (path in coverage_json):
+ if path not in coverage_json:
coverage_lost = True
print_error(f"{relative_path} has no node test coverage")
continue