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.

ruff: Fix PLW0120 Else clause on loop without a break statement.

Anders Kaseorga6442288cf21
diff --git a/scripts/lib/zulip_tools.py b/scripts/lib/zulip_tools.py
index 77094d8e08b..357e0d15c29 100755
--- a/scripts/lib/zulip_tools.py
+++ b/scripts/lib/zulip_tools.py
@@ -455,8 +455,7 @@ def get_tzdata_zi() -> IO[str]:
filename = os.path.join(path, "tzdata.zi")
if os.path.exists(filename):
return open(filename)
- else:
- raise RuntimeError("Missing time zone data (tzdata.zi)")
+ raise RuntimeError("Missing time zone data (tzdata.zi)")
def files_and_string_digest(filenames: Sequence[str], extra_strings: Sequence[str]) -> str:
diff --git a/zerver/lib/test_classes.py b/zerver/lib/test_classes.py
index e7f48496c7f..eaca443f08a 100644
--- a/zerver/lib/test_classes.py
+++ b/zerver/lib/test_classes.py
@@ -823,8 +823,7 @@ Output:
[confirmation_url] = match.groups()
return confirmation_url
- else:
- raise AssertionError("Couldn't find a confirmation email.")
+ raise AssertionError("Couldn't find a confirmation email.")
def encode_uuid(self, uuid: str) -> str:
"""