mirror of https://github.com/zulip/zulip.git
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:
parent
9d2d6c8eb7
commit
e1a2894af9
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue