Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

zerver: Replace uri with url in local variables and comments.

Vector73a07ebba860c1
diff --git a/zerver/actions/create_realm.py b/zerver/actions/create_realm.py
index b0be99393d0..c1807733246 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 6bd388316b9..c60da50501e 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 2b8c93337c0..52f3958b633 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 d941b1f72ab..31ea8419c43 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