From 5b7c4206d75d58fa2c7bd3e9028a2b80638c603b Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 27 Jan 2023 15:59:59 -0800 Subject: [PATCH] ruff: Fix SIM300 Yoda conditions are discouraged. Signed-off-by: Anders Kaseorg --- zerver/lib/export.py | 2 +- zerver/views/auth.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/export.py b/zerver/lib/export.py index 51c5812cbf..6083a92d76 100644 --- a/zerver/lib/export.py +++ b/zerver/lib/export.py @@ -331,7 +331,7 @@ def sanity_check_output(data: TableData) -> None: in {__file__} for what to include in data exports. """ - assert ALL_ZULIP_TABLES == all_tables_db, error_message + assert all_tables_db == ALL_ZULIP_TABLES, error_message assert NON_EXPORTED_TABLES.issubset(ALL_ZULIP_TABLES), error_message assert IMPLICIT_TABLES.issubset(ALL_ZULIP_TABLES), error_message assert ATTACHMENT_TABLES.issubset(ALL_ZULIP_TABLES), error_message diff --git a/zerver/views/auth.py b/zerver/views/auth.py index 92bdd5bd3d..a23ef06fab 100644 --- a/zerver/views/auth.py +++ b/zerver/views/auth.py @@ -779,7 +779,7 @@ def login_page( next: str = REQ(default="/"), **kwargs: Any, ) -> HttpResponse: - if settings.SOCIAL_AUTH_SUBDOMAIN == get_subdomain(request): + if get_subdomain(request) == settings.SOCIAL_AUTH_SUBDOMAIN: return social_auth_subdomain_login_page(request) # To support previewing the Zulip login pages, we have a special option