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

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-12-11 01:48:05 -08:00 committed by Tim Abbott
parent f7e97b1180
commit a6442288cf
2 changed files with 2 additions and 4 deletions

View File

@ -455,8 +455,7 @@ def get_tzdata_zi() -> IO[str]:
filename = os.path.join(path, "tzdata.zi") filename = os.path.join(path, "tzdata.zi")
if os.path.exists(filename): if os.path.exists(filename):
return open(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: def files_and_string_digest(filenames: Sequence[str], extra_strings: Sequence[str]) -> str:

View File

@ -823,8 +823,7 @@ Output:
[confirmation_url] = match.groups() [confirmation_url] = match.groups()
return confirmation_url 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: def encode_uuid(self, uuid: str) -> str:
""" """