ruff: Fix B011 Do not `assert False` (`python -O` removes these calls).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-10-29 18:12:04 -04:00 committed by Tim Abbott
parent 9d2d6c8eb7
commit e1a2894af9
2 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ def get_ses_arn(session: boto3.session.Session, args: argparse.Namespace) -> str
return settings["ComplaintTopic"]
elif args.deliveries:
return settings["DeliveryTopic"]
assert False # Unreachable
raise AssertionError() # Unreachable
@contextmanager

View File

@ -51,7 +51,7 @@ class VersionTest(ZulipTestCase):
self.assertIsNone(version_lt(ver1, ver2), msg=msg)
self.assertIsNone(version_lt(ver2, ver1), msg=msg)
else:
assert False # nocoverage
raise AssertionError() # nocoverage
mobile_os_data = [
case.split(None, 1)
@ -110,7 +110,7 @@ class CompatibilityTest(ZulipTestCase):
elif expected == "old":
self.assert_json_error(result, "Client is too old")
else:
assert False # nocoverage
raise AssertionError() # nocoverage
@mock.patch("zerver.lib.compatibility.DESKTOP_MINIMUM_VERSION", "5.0.0")
@mock.patch("zerver.lib.compatibility.DESKTOP_WARNING_VERSION", "5.2.0")