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.

cleanup: Fix doubled words and article typos in comments and docs.

Sairam Bisoyi3b1c4a8a73ee
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py
index c15c0feb378..f6278ff6660 100644
--- a/corporate/tests/test_stripe.py
+++ b/corporate/tests/test_stripe.py
@@ -1610,7 +1610,7 @@ class StripeTest(StripeTestCase):
def test_customer_minimum_licenses_for_plan(self, *mocks: Mock) -> None:
hamlet = self.example_user("hamlet")
self.login_user(hamlet)
- # We set set a 1 license minimum the initial upgrade.
+ # We set a 1 license minimum for the initial upgrade.
minimum_for_plan_tier = 1
with (
patch(
diff --git a/docs/processes/integration-review.md b/docs/processes/integration-review.md
index 7f2cebef8e5..abf3880023a 100644
--- a/docs/processes/integration-review.md
+++ b/docs/processes/integration-review.md
@@ -184,6 +184,6 @@ Some common mistakes to watch out for:
typically, we squash the `merge-api-changelogs` commit when there's
only one commit in a PR touching the API, to keep the history clean).
-- Merging a pull request with migrations without rebasing the the work
+- Merging a pull request with migrations without rebasing the work
and running `tools/renumber-migrations`. PRs older than a couple
weeks are very likely to have duplicate migration numbers.
diff --git a/docs/production/video-calls.md b/docs/production/video-calls.md
index 5d858944715..c74399ea8fb 100644
--- a/docs/production/video-calls.md
+++ b/docs/production/video-calls.md
@@ -54,7 +54,7 @@ This Zoom application type, introduced in Zulip 10.0, is easiest to
set up, and is ideal for most installations that self-host Zulip. To
[create Zoom meeting links in Zulip
messages](https://zulip.com/help/start-a-call#start-a-call) using this
-integration, users will will need to be members of your Zoom
+integration, users will need to be members of your Zoom
organization and use the same email address in Zulip that they have
registered with Zoom.
diff --git a/docs/subsystems/thumbnailing.md b/docs/subsystems/thumbnailing.md
index 20749c06398..dace5197b39 100644
--- a/docs/subsystems/thumbnailing.md
+++ b/docs/subsystems/thumbnailing.md
@@ -58,7 +58,7 @@ the first frame, as a 64x64 PNG image. This is currently mostly unused, but is
intended to be part of a user preference to disable emoji animations (see
[#13434](https://github.com/zulip/zulip/issues/13434)). Current use is limited
to [user status](https://zulip.com/help/status-and-availability) display in
-the the buddy list. When a user uses an animated emoji as their status, the
+the buddy list. When a user uses an animated emoji as their status, the
"still" version is used.
The original emoji is stored adjacent to the thumbnailed version, enabling later
diff --git a/docs/testing/testing-with-django.md b/docs/testing/testing-with-django.md
index b81179304f3..5d16bbc524c 100644
--- a/docs/testing/testing-with-django.md
+++ b/docs/testing/testing-with-django.md
@@ -236,7 +236,7 @@ More generally, you should only mock those functions you explicitly don't want t
Since Python 3.3, the standard mocking library is `unittest.mock`. `unittest.mock` implements the basic mocking class `Mock`.
It also implements `MagicMock`, which is the same as `Mock`, but contains many default magic methods (in Python,
-those are the ones starting with with a dunder `__`). From the docs:
+those are the ones starting with a dunder `__`). From the docs:
> In most of these examples the Mock and MagicMock classes are interchangeable. As the MagicMock is the more capable class
> it makes a sensible one to use by default.
diff --git a/docs/testing/testing-with-node.md b/docs/testing/testing-with-node.md
index b75130eb684..c605684afa7 100644
--- a/docs/testing/testing-with-node.md
+++ b/docs/testing/testing-with-node.md
@@ -174,7 +174,7 @@ result.
But often, one can write a more readable test by instead verifying
the values of parameters in the context passed into the template
rendering. The `mock_template` function in Zulip's testing library
-is designed to support this this.
+is designed to support this.
We use `mock_template` in our unit tests to verify that the JS code is
calling the template with the expected context data. And then we use
diff --git a/docs/tutorials/new-feature-tutorial.md b/docs/tutorials/new-feature-tutorial.md
index 88ab6cbd17a..6628c2a5bb9 100644
--- a/docs/tutorials/new-feature-tutorial.md
+++ b/docs/tutorials/new-feature-tutorial.md
@@ -744,7 +744,7 @@ and [OpenAPI configuration](../documentation/openapi.md).
In particular, if there is an API change, you should use the
`create-api-changelog` tool to create a file for the API changelog
-entry for your your new feature. The API feature level allows the
+entry for your new feature. The API feature level allows the
developers of mobile clients and other tools using the Zulip API to
programmatically determine whether the Zulip server they are
interacting with supports a given feature; see the
diff --git a/puppet/kandra/templates/uptrack/uptrack.conf.erb b/puppet/kandra/templates/uptrack/uptrack.conf.erb
index e6669ef747e..f37bdc4c554 100644
--- a/puppet/kandra/templates/uptrack/uptrack.conf.erb
+++ b/puppet/kandra/templates/uptrack/uptrack.conf.erb
@@ -53,7 +53,7 @@ install_on_reboot = yes
#upgrade_on_reboot = yes
# Uptrack runs in a cron job every few hours to check for and download
-# new updates. You can can configure this cron job to automatically
+# new updates. You can configure this cron job to automatically
# install new updates as they become available.
#
# Enable this option to make the cron job automatically install new
diff --git a/starlight_help/src/components/SettingsSteps.astro b/starlight_help/src/components/SettingsSteps.astro
index fd0a67ce8dc..7ea70f8316e 100644
--- a/starlight_help/src/components/SettingsSteps.astro
+++ b/starlight_help/src/components/SettingsSteps.astro
@@ -167,7 +167,7 @@ const {setting_type, setting_name, setting_link} = setting_link_mapping[setting_
// The "Bots" label appears in both Personal and
// Organization settings in the user interface, so we need special
// text for this setting.
- // As for the the case of "Users", it refers to the Users tab in
+ // As for the case of "Users", it refers to the Users tab in
// organization settings. Since the users tab has multiple sub tabs
// like active, deactivated etc., we need a way to point to them.
setting_name === "Bots" || setting_name === "Users" ? (
diff --git a/starlight_help/src/content/include/_FollowedTopicWorkflows.mdx b/starlight_help/src/content/include/_FollowedTopicWorkflows.mdx
index 8a7fd4b3cae..10dfc44803c 100644
--- a/starlight_help/src/content/include/_FollowedTopicWorkflows.mdx
+++ b/starlight_help/src/content/include/_FollowedTopicWorkflows.mdx
@@ -1,6 +1,6 @@
* [Catch up](/help/follow-a-topic#catch-up-on-followed-topics) on
followed topics at the start of the day, and whenever you want to
- spend a few minutes checking on on the conversations that need
+ spend a few minutes checking on the conversations that need
your attention.
* No more stressing about missing a reply to your message in channels
you don't regularly read. You can [automatically
diff --git a/templates/confirmation/redirect_to_post.html b/templates/confirmation/redirect_to_post.html
index 22f9ef4cb9e..29170efb8d1 100644
--- a/templates/confirmation/redirect_to_post.html
+++ b/templates/confirmation/redirect_to_post.html
@@ -17,7 +17,7 @@ This allows us to avoid triggering the action which is being confirmed via a mer
GET request.
This largely duplicates functionality and code with confirm_preregistrationuser.html.
-We should find a way to to unify these.
+We should find a way to unify these.
#}
<form id="redirect-to-post-form" class="redirect-to-post-form" action="{{ target_url }}" method="post">
diff --git a/templates/corporate/case-studies/university-of-cordoba-case-study.md b/templates/corporate/case-studies/university-of-cordoba-case-study.md
index ec3d4a883e1..a4d1516bc2c 100644
--- a/templates/corporate/case-studies/university-of-cordoba-case-study.md
+++ b/templates/corporate/case-studies/university-of-cordoba-case-study.md
@@ -16,7 +16,7 @@ free plan was a major frustration.
In search of an alternative, a faculty member reached out to request a sponsored
Zulip Cloud Standard plan. With the request approved the very next day, the
-department moved over to Zulip starting starting in Fall 2020.
+department moved over to Zulip starting in Fall 2020.
Looking back, being pushed off Slack by its search history limit ended up being
for the best: “I think Zulip is a great tool, much better than Slack,” says
diff --git a/tools/droplets/create.py b/tools/droplets/create.py
index 6d0d0c61bd1..de8bbf820f1 100644
--- a/tools/droplets/create.py
+++ b/tools/droplets/create.py
@@ -113,7 +113,7 @@ def generate_dev_droplet_user_data(username: str, subdomain: str, public_keys: l
setup_zulipdev_ssh_keys = f"printf '{ssh_keys_string}' > /home/zulipdev/.ssh/authorized_keys"
# We pass the hostname as username.zulipdev.org to the DigitalOcean API.
- # But some droplets (eg on 18.04) are created with with hostname set to just username.
+ # But some droplets (eg on 18.04) are created with hostname set to just username.
# So we fix the hostname using cloud-init.
hostname_setup = f"hostnamectl set-hostname {subdomain}.zulipdev.org"
diff --git a/tools/oneclickapps/README.md b/tools/oneclickapps/README.md
index 51094df467f..2fa03dedb88 100644
--- a/tools/oneclickapps/README.md
+++ b/tools/oneclickapps/README.md
@@ -65,7 +65,7 @@ Also pass the following as environment variables in `.github/workflows/update-on
by invoking the script.
- Delete the test droplet `oneclickapp-{release_version}-test` after you have completed testing
by going to the [DigitalOcean Zulip team account](https://cloud.digitalocean.com/droplets?i=0242e0).
- If there are other existing test droplets with the same name format but with with older release versions
+ If there are other existing test droplets with the same name format but with older release versions
feel free to delete them as well. These droplets are also tagged with the `github-action` and `temporary`
tags.
diff --git a/web/src/copy_messages.ts b/web/src/copy_messages.ts
index 6b38bd3072c..02f5c0a8782 100644
--- a/web/src/copy_messages.ts
+++ b/web/src/copy_messages.ts
@@ -71,7 +71,7 @@ function get_selected_message_content_elements(): NodeListOf<HTMLElement> | unde
.querySelectorAll(".message_content");
}
-// Returns the the inner HTML of the `.message_content` element
+// Returns the inner HTML of the `.message_content` element
// for the first or last message of a single range selection.
// The caller is expected to only pass the first or last message
// from a selection range, as the intermediate selected messages
diff --git a/web/src/echo.ts b/web/src/echo.ts
index 05154fd6523..fdcd470ab11 100644
--- a/web/src/echo.ts
+++ b/web/src/echo.ts
@@ -172,7 +172,7 @@ export function resend_message(
): void {
message_store.update_message_content(message, message.raw_content!);
if (show_retry_spinner($row)) {
- // retry already in in progress
+ // retry already in progress
return;
}
@@ -603,7 +603,7 @@ export function process_from_server(messages: ServerMessage[]): ServerMessage[]
if (!msg_list.data.filter.can_apply_locally()) {
// If this message list is a search filter that we
// cannot apply locally, we will not have locally
- // echoed echoed the message at all originally, and
+ // echoed the message at all originally, and
// must request the server now whether to add it to the view.
message_events_util.maybe_add_narrowed_messages(
msgs_to_rerender_or_add_to_narrow,
diff --git a/web/src/input_pill.ts b/web/src/input_pill.ts
index a74af80db07..902897cc1d2 100644
--- a/web/src/input_pill.ts
+++ b/web/src/input_pill.ts
@@ -397,7 +397,7 @@ export function create<ItemType extends {type: string}>(
) {
e.preventDefault();
const pill = store.pills.at(-1);
- // We focus the pill first first, as a signal that the pill
+ // We focus the pill first, as a signal that the pill
// is about to be deleted. The deletion will then happen through
// `removePill` from the event handler on the pill.
if (pill) {
diff --git a/web/src/search_pill.ts b/web/src/search_pill.ts
index 0ae39369453..79a4f6bf462 100644
--- a/web/src/search_pill.ts
+++ b/web/src/search_pill.ts
@@ -228,7 +228,7 @@ export function generate_pills_html(suggestion: Suggestion, text_query: string):
// (`text_query`), or is not the last term in the text input, and
// therefore the empty operand represents "general chat".
//
- // (2) The user has selected a topic operator, and and thus has
+ // (2) The user has selected a topic operator, and thus has
// exactly `topic:` or `-topic:` written out, and it's appropriate
// to suggest the "general chat" operand.
//
diff --git a/web/src/typing.ts b/web/src/typing.ts
index 07b4ca69bf1..7b1ea6e5fbb 100644
--- a/web/src/typing.ts
+++ b/web/src/typing.ts
@@ -85,7 +85,7 @@ function send_stream_typing_notification(
): void {
const stream = stream_data.get_sub_by_id(stream_id)!;
// If the user lost access to the stream while typing, stream might
- // be undefined for us, in which case, we need to to return early.
+ // be undefined for us, in which case, we need to return early.
if (stream === undefined) {
return;
}
diff --git a/web/styles/rendered_markdown.css b/web/styles/rendered_markdown.css
index 644df54d206..ba158432d0c 100644
--- a/web/styles/rendered_markdown.css
+++ b/web/styles/rendered_markdown.css
@@ -916,7 +916,7 @@
/* Hide the code buttons container when the user is
clicking on the code block other than the buttons.
- This allows the user to select part of the the code
+ This allows the user to select part of the code
without the buttons interfering with the selection. */
&:active .code-buttons-container:not(:hover) {
visibility: hidden;
diff --git a/web/styles/subscriptions.css b/web/styles/subscriptions.css
index 117219dcfb6..47347f18fb1 100644
--- a/web/styles/subscriptions.css
+++ b/web/styles/subscriptions.css
@@ -592,7 +592,7 @@
}
.icon-button {
- /* Equal to to font sizes for other icon buttons
+ /* Equal to font sizes for other icon buttons
in the channel and group settings UI. */
font-size: calc(1.2 * var(--base-font-size-px));
}
diff --git a/web/tests/compose_actions.test.cjs b/web/tests/compose_actions.test.cjs
index 2547240cc42..c4ccfcb0369 100644
--- a/web/tests/compose_actions.test.cjs
+++ b/web/tests/compose_actions.test.cjs
@@ -959,7 +959,7 @@ ${fence}`;
assert.ok(message_lists.current.selected_id() !== 50);
// If message text from some message is not highlighted(selected) when using the ">" hotkey
- // to quote, then message_id passed to `respond_to_message` will be same as as the
+ // to quote, then message_id passed to `respond_to_message` will be same as the
// id of the message having the pointer.
const message_with_pointer = highlighted_message;
override_rewire(compose_reply, "get_highlighted_message_ids", () => undefined);
diff --git a/web/tests/user_search.test.cjs b/web/tests/user_search.test.cjs
index 8e5b3325bf0..036421aad76 100644
--- a/web/tests/user_search.test.cjs
+++ b/web/tests/user_search.test.cjs
@@ -163,7 +163,7 @@ test("fetch on search", async ({override}) => {
assert.equal(populate_call_count, 1);
// Now try updating the narrow and starting a new search, before the old search
- // is resolved. We should make two requests but only only update populate the
+ // is resolved. We should make two requests but only populate the
// buddy list for the second fetch (the first fetch returns early).
get_call_count = 0;
populate_call_count = 0;
diff --git a/zerver/actions/message_edit.py b/zerver/actions/message_edit.py
index d98827e614c..443e1b40246 100644
--- a/zerver/actions/message_edit.py
+++ b/zerver/actions/message_edit.py
@@ -1221,7 +1221,7 @@ def do_update_message(
# TODO: Guest users don't see the new moved topic
# unless breadcrumb message for new stream is
# enabled. Excluding these users from receiving this
- # event helps us avoid a error traceback for our
+ # event helps us avoid an error traceback for our
# clients. We should figure out a way to inform the
# guest users of this new topic if sending a 'message'
# event for these messages is not an option.
diff --git a/zerver/actions/message_send.py b/zerver/actions/message_send.py
index c5643147f31..e0457502292 100644
--- a/zerver/actions/message_send.py
+++ b/zerver/actions/message_send.py
@@ -918,7 +918,7 @@ def filter_presence_idle_user_ids(user_ids: set[int]) -> list[int]:
# Given a set of user IDs (the recipients of a message), accesses
# the UserPresence table to determine which of these users are
# currently idle and should potentially get email notifications
- # (and push notifications with with
+ # (and push notifications with
# user_profile.enable_online_push_notifications=False).
if not user_ids:
diff --git a/zerver/actions/uploads.py b/zerver/actions/uploads.py
index 59a9cfab90d..a4703d6b9c9 100644
--- a/zerver/actions/uploads.py
+++ b/zerver/actions/uploads.py
@@ -114,7 +114,7 @@ def do_delete_old_unclaimed_attachments(weeks_ago: int) -> None:
def check_attachment_reference_change(
message: Message | ScheduledMessage, rendering_result: MessageRenderingResult
) -> AttachmentChangeResult:
- # For a unsaved message edit (message.* has been updated, but not
+ # For an unsaved message edit (message.* has been updated, but not
# saved to the database), adjusts Attachment data to correspond to
# the new content.
prev_attachments = {a.path_id for a in message.attachment_set.all()}
diff --git a/zerver/lib/message_cache.py b/zerver/lib/message_cache.py
index dea8d6c4bc5..22d32067df7 100644
--- a/zerver/lib/message_cache.py
+++ b/zerver/lib/message_cache.py
@@ -30,7 +30,7 @@ class RawReactionRow(TypedDict):
def sew_messages_and_reactions(
messages: list[dict[str, Any]], reactions: list[dict[str, Any]]
) -> list[dict[str, Any]]:
- """Given a iterable of messages and reactions stitch reactions
+ """Given an iterable of messages and reactions stitch reactions
into messages.
"""
# Add all messages with empty reaction item
diff --git a/zerver/lib/typed_endpoint.py b/zerver/lib/typed_endpoint.py
index d64107c66c6..a50cde53e0b 100644
--- a/zerver/lib/typed_endpoint.py
+++ b/zerver/lib/typed_endpoint.py
@@ -355,7 +355,7 @@ def parse_value_for_parameter(parameter: FuncParam[T], value: object) -> T:
error = exc.errors()[0]
# We require all Pydantic raised error types that we expect to be
# explicitly handled here. The end result should either be a 400
- # error with an translated message or an internal server error.
+ # error with a translated message or an internal server error.
error_template = ERROR_TEMPLATES.get(error["type"])
var_name = parameter.request_var_name + "".join(
f"[{json.dumps(loc)}]" for loc in error["loc"]
diff --git a/zerver/models/prereg_users.py b/zerver/models/prereg_users.py
index d5b0a607377..f65ad91e97d 100644
--- a/zerver/models/prereg_users.py
+++ b/zerver/models/prereg_users.py
@@ -120,7 +120,7 @@ class PreregistrationUser(models.Model):
# Used in realm import flow to allow importer (the person
# whose email is set as PreregistrationRealm.email) to create
- # a new user if a imported user with the matching
+ # a new user if an imported user with the matching
# email was not found.
is_realm_importer = models.BooleanField(default=False)
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index bda0692bdfc..0b2f33c0401 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -1453,7 +1453,7 @@ paths:
Not present for clients that support the `simplified_presence_events`
[client capability](/api/register-queue#parameter-client_capabilities).
- Object containing the presence data (legacy format) of of the modified
+ Object containing the presence data (legacy format) of the modified
user.
additionalProperties:
type: object
@@ -25096,7 +25096,7 @@ paths:
can_resolve_topics_group:
allOf:
- description: |
- The set of users who have permission to to resolve topics in this channel
+ The set of users who have permission to resolve topics in this channel
expressed as an [update to a group-setting value][update-group-setting].
[update-group-setting]: /api/group-setting-values#updating-group-setting-values
diff --git a/zerver/tests/test_audit_log.py b/zerver/tests/test_audit_log.py
index 044712ede5d..526d607a0be 100644
--- a/zerver/tests/test_audit_log.py
+++ b/zerver/tests/test_audit_log.py
@@ -1571,7 +1571,7 @@ class TestRealmAuditLog(ZulipTestCase):
othello = self.example_user("othello")
old_setting_api_value = get_group_setting_value_for_api(user_group.can_mention_group)
- # Since the old setting value was a anonymous group, we just update the
+ # Since the old setting value was an anonymous group, we just update the
# members and subgroups of the already existing UserGroup instead of creating
# a new UserGroup object to keep this consistent with the actual code.
new_group = self.create_or_update_anonymous_group_for_setting(
diff --git a/zerver/tests/test_import_export.py b/zerver/tests/test_import_export.py
index e148dae9371..fe831b7b05d 100644
--- a/zerver/tests/test_import_export.py
+++ b/zerver/tests/test_import_export.py
@@ -1138,7 +1138,7 @@ class RealmImportExportTest(ExportFile):
all(row["is_mirror_dummy"] is False for row in realm_data["zerver_userprofile"])
)
- # Verify that the deactivated_non_consented_user did not not become a mirror dummy.
+ # Verify that the deactivated_non_consented_user did not become a mirror dummy.
exported_deactivated_non_consented_user = next(
user
for user in realm_data["zerver_userprofile"]
@@ -1446,7 +1446,7 @@ class RealmImportExportTest(ExportFile):
original_sub = model_to_dict(sub)
exported_sub = non_consented_user_exported_subscriptions[sub.id]
self.assertNotEqual(original_sub, exported_sub)
- # Subscriptions of the non-consenting users get get scrubbed to replace
+ # Subscriptions of the non-consenting users get scrubbed to replace
# "user setting"-type attributes with default values, so the #foo color
# will be overwritten in the process.
self.assertNotEqual(exported_sub["color"], "#foo")
diff --git a/zerver/tests/test_message_edit.py b/zerver/tests/test_message_edit.py
index 81fa1fbde18..3447756f6dd 100644
--- a/zerver/tests/test_message_edit.py
+++ b/zerver/tests/test_message_edit.py
@@ -2394,7 +2394,7 @@ class EditMessageTest(ZulipTestCase):
self.assert_json_success(result)
def test_remove_attachment_while_editing(self) -> None:
- # Try editing a message and removing an linked attachment that's
+ # Try editing a message and removing a linked attachment that's
# uploaded by us. Users should be able to detach their own attachments
CONST_UPLOAD_PATH_PREFIX = "/user_uploads/"
user_profile = self.example_user("hamlet")
@@ -2466,7 +2466,7 @@ class EditMessageTest(ZulipTestCase):
self.assert_length(result_content["detached_uploads"], 0)
def test_remove_another_user_attachment_while_editing(self) -> None:
- # Try editing a message and removing an linked attachment that's
+ # Try editing a message and removing a linked attachment that's
# uploaded by another user. Users should not be able to detach another
# user's attachments.
@@ -2510,7 +2510,7 @@ class EditMessageTest(ZulipTestCase):
self.assert_length(result_content["detached_uploads"], 0)
def test_remove_another_user_deleted_attachment_while_editing(self) -> None:
- # Try editing a message and removing an linked attachment that's been
+ # Try editing a message and removing a linked attachment that's been
# uploaded and deleted by the original user. Users should not be able
# to detach another user's attachments.
diff --git a/zerver/tests/test_reactions.py b/zerver/tests/test_reactions.py
index ebf74ab815a..9a04710a487 100644
--- a/zerver/tests/test_reactions.py
+++ b/zerver/tests/test_reactions.py
@@ -270,7 +270,7 @@ class ReactionMessageIDTest(ZulipTestCase):
def test_inaccessible_message_id(self) -> None:
"""
- Reacting to a inaccessible (for instance, private) message fails
+ Reacting to an inaccessible (for instance, private) message fails
"""
pm_sender = self.example_user("hamlet")
pm_recipient = self.example_user("othello")
diff --git a/zerver/tests/test_read_receipts.py b/zerver/tests/test_read_receipts.py
index c4790e54eef..d51e2831f19 100644
--- a/zerver/tests/test_read_receipts.py
+++ b/zerver/tests/test_read_receipts.py
@@ -247,7 +247,7 @@ class TestReadReceipts(ZulipTestCase):
self.assertFalse(cordelia.id in response_dict["user_ids"])
self.assertTrue(othello.id in response_dict["user_ids"])
- # Login as Othello and make sure Cordelia is not in in read receipts.
+ # Login as Othello and make sure Cordelia is not in read receipts.
self.login("othello")
result = self.client_get(f"/json/messages/{message_id}/read_receipts")
response_dict = self.assert_json_success(result)
diff --git a/zerver/tests/test_soft_deactivation.py b/zerver/tests/test_soft_deactivation.py
index 107a0f7b6fe..e4de1b6e6d7 100644
--- a/zerver/tests/test_soft_deactivation.py
+++ b/zerver/tests/test_soft_deactivation.py
@@ -515,7 +515,7 @@ class SoftDeactivationMessageTest(ZulipTestCase):
self.subscribe(long_term_idle_user, stream_name)
sent_message_list.append(send_fake_message("Test message 7", stream))
# Again unsubscribe from stream and send a message.
- # This will make sure that if initially in a unsubscribed state
+ # This will make sure that if initially in an unsubscribed state
# a consecutive subscribe/unsubscribe doesn't misbehave.
self.unsubscribe(long_term_idle_user, stream_name)
send_fake_message("Test message 8", stream)
@@ -840,7 +840,7 @@ class SoftDeactivationMessageTest(ZulipTestCase):
)
# Test UserMessage row is created while user is deactivated if there
- # is a alert word in message.
+ # is an alert word in message.
do_add_alert_words(long_term_idle_user, ["test_alert_word"])
assert_stream_message_sent_to_idle_user("Testing test_alert_word")
diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py
index a7c2d399222..41d5df2c903 100644
--- a/zerver/tests/test_subs.py
+++ b/zerver/tests/test_subs.py
@@ -3644,7 +3644,7 @@ class SubscriptionRestApiTest(ZulipTestCase):
def test_patch_enforces_valid_stream_name_check(self) -> None:
"""
- Only way to force an error is with a empty string.
+ Only way to force an error is with an empty string.
"""
user = self.example_user("hamlet")
self.login_user(user)
diff --git a/zerver/tests/test_upload.py b/zerver/tests/test_upload.py
index 8f7fb599924..13429a913bd 100644
--- a/zerver/tests/test_upload.py
+++ b/zerver/tests/test_upload.py
@@ -1890,7 +1890,7 @@ class RealmIconTest(UploadSerializeMixin, ZulipTestCase):
def test_valid_icons(self) -> None:
"""
A PUT request to /json/realm/icon with a valid file should return a URL
- and actually create an realm icon.
+ and actually create a realm icon.
"""
for fname, rfname in self.correct_files:
with self.subTest(fname=fname):
@@ -2085,7 +2085,7 @@ class RealmLogoTest(UploadSerializeMixin, ZulipTestCase):
def test_valid_logos(self) -> None:
"""
A PUT request to /json/realm/logo with a valid file should return a URL
- and actually create an realm logo.
+ and actually create a realm logo.
"""
for fname, rfname in self.correct_files:
with self.subTest(fname=fname):
diff --git a/zerver/tests/test_users.py b/zerver/tests/test_users.py
index 16e37e9234c..e5f742eb761 100644
--- a/zerver/tests/test_users.py
+++ b/zerver/tests/test_users.py
@@ -1738,7 +1738,7 @@ class UserProfileTest(ZulipTestCase):
for onboarding_step in onboarding_steps_completed:
OnboardingStep.objects.create(user=cordelia, onboarding_step=onboarding_step)
- # Check that we didn't send an realm_user update events to
+ # Check that we didn't send any realm_user update events to
# users; this work is happening before the user account is
# created, so any changes will be reflected in the "add" event
# introducing the user to clients.
@@ -1796,7 +1796,7 @@ class UserProfileTest(ZulipTestCase):
realm_user_default.enter_sends = True
realm_user_default.save()
- # Check that we didn't send an realm_user update events to
+ # Check that we didn't send any realm_user update events to
# users; this work is happening before the user account is
# created, so any changes will be reflected in the "add" event
# introducing the user to clients.
@@ -1822,7 +1822,7 @@ class UserProfileTest(ZulipTestCase):
self.assertEqual(cross_realm_bot.email, bot.email)
self.assertEqual(cross_realm_bot.id, bot.id)
- # Pass in the ID of a cross-realm bot but with a invalid realm,
+ # Pass in the ID of a cross-realm bot but with an invalid realm,
# note that the realm should be irrelevant here
cross_realm_bot = get_user_by_id_in_realm_including_cross_realm(bot.id, None)
self.assertEqual(cross_realm_bot.email, bot.email)
diff --git a/zerver/tornado/event_queue.py b/zerver/tornado/event_queue.py
index f4430da8e99..5c9a4a5a29b 100644
--- a/zerver/tornado/event_queue.py
+++ b/zerver/tornado/event_queue.py
@@ -749,7 +749,7 @@ def send_restart_events() -> None:
def mark_clients_to_reload(queue_ids: Iterable[str]) -> None:
# Build web_reload_clients, which is a sorted-by-realm-id list of
- # website client queue-ids which were were loaded from old Tornado
+ # website client queue-ids which were loaded from old Tornado
# instances. We use an (ordered) dict to make removing one be
# O(1), as well as pulling an ordered N of them to be O(N). We
# sort by realm_id so that restarts are rolling by realm.
diff --git a/zerver/views/registration.py b/zerver/views/registration.py
index bdfeba3287b..a0ec5125128 100644
--- a/zerver/views/registration.py
+++ b/zerver/views/registration.py
@@ -1354,7 +1354,7 @@ def realm_import_post_process(
# Validate that this PreregistrationRealm object is in the
# expected state, with no user matching the email address,
- # and and having created this realm.
+ # and having created this realm.
assert preregistration_realm.data_import_metadata["need_select_realm_owner"]
assert preregistration_realm.created_realm_id == realm.id
assert preregistration_realm.status != confirmation_settings.STATUS_USED
diff --git a/zerver/worker/thumbnail.py b/zerver/worker/thumbnail.py
index cb96455a4ed..bd9ce0d6d54 100644
--- a/zerver/worker/thumbnail.py
+++ b/zerver/worker/thumbnail.py
@@ -101,7 +101,7 @@ def ensure_thumbnails(image_attachment: ImageAttachment) -> ThumbnailingResult:
uploading_seconds = 0.0
for thumbnail_format in needed_thumbnails:
# This will scale to fit within the given dimensions; it
- # may be smaller one one or more of them.
+ # may be smaller in one or more of them.
logger.debug(
"Resizing to %d x %d, from %d x %d",
thumbnail_format.max_width,
diff --git a/zproject/backends.py b/zproject/backends.py
index fbf07bfab9c..1ecdc04d5f8 100644
--- a/zproject/backends.py
+++ b/zproject/backends.py
@@ -2772,7 +2772,7 @@ def social_auth_finish(
use_dummy_backend=True,
)
if validated_user_profile is None or validated_user_profile != user_profile:
- # Log this as as a failure to authenticate via the social backend, since that's
+ # Log this as a failure to authenticate via the social backend, since that's
# the correct way to think about this. ZulipDummyBackend is just an implementation
# tool, not an actual backend a user could be authenticating through.
log_auth_attempt(