From a07ebba860c1bd7b6f245f6e08932ea6c055041d Mon Sep 17 00:00:00 2001 From: Vector73 Date: Sun, 9 Jun 2024 09:31:03 +0530 Subject: [PATCH] zerver: Replace uri with url in local variables and comments. --- zerver/actions/create_realm.py | 4 ++-- zerver/lib/scim_filter.py | 2 +- zerver/views/auth.py | 8 ++++---- zerver/views/upload.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/zerver/actions/create_realm.py b/zerver/actions/create_realm.py index b0be99393d..c180773324 100644 --- a/zerver/actions/create_realm.py +++ b/zerver/actions/create_realm.py @@ -67,7 +67,7 @@ def do_change_realm_subdomain( experience for clients. """ old_subdomain = realm.subdomain - old_uri = realm.url + old_url = realm.url # If the realm had been a demo organization scheduled for # deleting, clear that state. realm.demo_organization_scheduled_deletion_date = None @@ -84,7 +84,7 @@ def do_change_realm_subdomain( # If a realm if being renamed multiple times, we should find all the placeholder # realms and reset their deactivated_redirect field to point to the new realm url - placeholder_realms = Realm.objects.filter(deactivated_redirect=old_uri, deactivated=True) + placeholder_realms = Realm.objects.filter(deactivated_redirect=old_url, deactivated=True) for placeholder_realm in placeholder_realms: do_add_deactivated_redirect(placeholder_realm, realm.url) diff --git a/zerver/lib/scim_filter.py b/zerver/lib/scim_filter.py index 6bd388316b..c60da50501 100644 --- a/zerver/lib/scim_filter.py +++ b/zerver/lib/scim_filter.py @@ -26,7 +26,7 @@ class ZulipUserFilterQuery(UserFilterQuery): # attr_map describes which table.column the given SCIM2 User # attributes refer to. attr_map = { - # attr, sub attr, uri + # attr, sub attr, url ("userName", None, None): "zerver_userprofile.delivery_email", # We can only reasonably support filtering by name.formatted # as UserProfile.full_name is its equivalent. We don't store diff --git a/zerver/views/auth.py b/zerver/views/auth.py index 2b8c93337c..52f3958b63 100644 --- a/zerver/views/auth.py +++ b/zerver/views/auth.py @@ -442,7 +442,7 @@ def finish_desktop_flow( def finish_mobile_flow(request: HttpRequest, user_profile: UserProfile, otp: str) -> HttpResponse: # For the mobile OAuth flow, we send the API key and other - # necessary details in a redirect to a zulip:// URI scheme. + # necessary details in a redirect to a zulip:// URL scheme. api_key = get_api_key(user_profile) response = create_response_for_otp_flow( api_key, otp, user_profile, encrypted_key_field_name="otp_encrypted_api_key" @@ -470,7 +470,7 @@ def create_response_for_otp_flow( ) -> HttpResponse: realm_url = user_profile.realm.url - # Check if the mobile URI is overridden in settings, if so, replace it + # Check if the mobile URL is overridden in settings, if so, replace it # This block should only apply to the mobile flow, so we if add others, this # needs to be conditional. if realm_url in settings.REALM_MOBILE_REMAP_URIS: @@ -755,8 +755,8 @@ def log_into_subdomain(request: HttpRequest, token: str) -> HttpResponse: def redirect_and_log_into_subdomain(result: ExternalAuthResult) -> HttpResponse: token = result.store_data() realm = get_realm(result.data_dict["subdomain"]) - subdomain_login_uri = realm.url + reverse(log_into_subdomain, args=[token]) - return redirect(subdomain_login_uri) + subdomain_login_url = realm.url + reverse(log_into_subdomain, args=[token]) + return redirect(subdomain_login_url) def redirect_to_misconfigured_ldap_notice(request: HttpRequest, error_type: int) -> HttpResponse: diff --git a/zerver/views/upload.py b/zerver/views/upload.py index d941b1f72a..31ea8419c4 100644 --- a/zerver/views/upload.py +++ b/zerver/views/upload.py @@ -83,7 +83,7 @@ def serve_s3(request: HttpRequest, path_id: str, force_download: bool = False) - return redirect(url) # We over-escape the path, to work around it being impossible to - # get the _unescaped_ new internal request URI in nginx. + # get the _unescaped_ new internal request URL in nginx. parsed_url = urlsplit(url) assert parsed_url.hostname is not None assert parsed_url.path is not None