diff --git a/.github/workflows/cancel-previous-runs.yml b/.github/workflows/cancel-previous-runs.yml index 87f6ee79c3..6d05dfbff9 100644 --- a/.github/workflows/cancel-previous-runs.yml +++ b/.github/workflows/cancel-previous-runs.yml @@ -18,7 +18,7 @@ jobs: steps: # We get workflow IDs from GitHub API so we don't have to maintain # a hard-coded list of IDs which need to be updated when a workflow - # is added or removed. And, workflow IDs are diffrent for other forks + # is added or removed. And, workflow IDs are different for other forks # so this is required. - name: Get workflow IDs. id: workflow_ids diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py index 19e2ccac25..dedea107e5 100644 --- a/corporate/lib/stripe.py +++ b/corporate/lib/stripe.py @@ -617,7 +617,7 @@ def estimate_annual_recurring_revenue_by_realm() -> Dict[str, int]: # nocoverag # During realm deactivation we instantly downgrade the plan to Limited. # Extra users added in the final month are not charged. Also used -# for the cancelation of Free Trial. +# for the cancellation of Free Trial. def downgrade_now(realm: Realm) -> None: plan = get_current_plan_by_realm(realm) if plan is None: diff --git a/docs/testing/mypy.md b/docs/testing/mypy.md index b3b2acd6eb..3b00783168 100644 --- a/docs/testing/mypy.md +++ b/docs/testing/mypy.md @@ -151,7 +151,7 @@ So `{1: 'a', 2: 'b', 3: 'c'}` will be printed as `{int: str, ...}`. ## Using @overload to accurately describe variations Sometimes, a function's type is most precisely expressed as a few -possibilites, and which possibility can be determined by looking at +possibilities, and which possibility can be determined by looking at the arguments. You can express that idea in a way mypy understands using `@overload`. For example, `check_list` returns a `Validator` function that verifies that an object is a list, raising an exception diff --git a/frontend_tests/node_tests/compose_pm_pill.js b/frontend_tests/node_tests/compose_pm_pill.js index d13a954408..88e65f8c2d 100644 --- a/frontend_tests/node_tests/compose_pm_pill.js +++ b/frontend_tests/node_tests/compose_pm_pill.js @@ -169,7 +169,7 @@ run_test("has_unconverted_data", () => { items: () => [{user_id: 99}], }; - // Our pill is complete and all items containt user_id, so + // Our pill is complete and all items contain user_id, so // we do NOT have unconverted data. assert.equal(compose_pm_pill.has_unconverted_data(), false); diff --git a/frontend_tests/node_tests/filter.js b/frontend_tests/node_tests/filter.js index a77a828b5f..ea087505ab 100644 --- a/frontend_tests/node_tests/filter.js +++ b/frontend_tests/node_tests/filter.js @@ -467,7 +467,7 @@ run_test("redundancies", () => { assert(filter.can_bucket_by("is-private", "not-pm-with")); }); -run_test("canonicalizations", () => { +run_test("canonicalization", () => { assert.equal(Filter.canonicalize_operator("Is"), "is"); assert.equal(Filter.canonicalize_operator("Stream"), "stream"); assert.equal(Filter.canonicalize_operator("Subject"), "topic"); diff --git a/frontend_tests/node_tests/rendered_markdown.js b/frontend_tests/node_tests/rendered_markdown.js index 84ffa09fb5..c770d5f997 100644 --- a/frontend_tests/node_tests/rendered_markdown.js +++ b/frontend_tests/node_tests/rendered_markdown.js @@ -237,7 +237,7 @@ run_test("emoji", () => { assert(called); - // Set page paramaters back so that test run order is independent + // Set page parameters back so that test run order is independent page_params.emojiset = "apple"; }); diff --git a/frontend_tests/node_tests/zjquery.js b/frontend_tests/node_tests/zjquery.js index 33123a8970..0a2184316b 100644 --- a/frontend_tests/node_tests/zjquery.js +++ b/frontend_tests/node_tests/zjquery.js @@ -92,7 +92,7 @@ run_test("finding_related_objects", () => { update_message_emoji("foo.png"); assert.equal(emoji.attr("src"), "foo.png"); - // Sometimes you want to deliberatly test paths that do not find an + // Sometimes you want to deliberately test paths that do not find an // element. You can pass 'false' as the result for those cases. emoji.set_find_results(".random", false); assert.equal(emoji.find(".random").length, 0); diff --git a/frontend_tests/puppeteer_lib/common.js b/frontend_tests/puppeteer_lib/common.js index 93fde250a4..d6480d0a5f 100644 --- a/frontend_tests/puppeteer_lib/common.js +++ b/frontend_tests/puppeteer_lib/common.js @@ -22,7 +22,7 @@ class CommonUtils { // pseudo selector to actually wait for typeahead item that // is visible; there can be typeahead item with this selector // that is invisible because it is meant for something else - // e.g. private message input typeahead is diffrent from topic + // e.g. private message input typeahead is different from topic // input typeahead but both can be present in the dom. await page.waitForFunction(() => { const selector = ".typeahead-menu .active a:visible"; @@ -198,7 +198,7 @@ class CommonUtils { await page.goto(this.realm_url); const menu_selector = "#settings-dropdown"; const logout_selector = 'a[href="#logout"]'; - console.log("Loggin out"); + console.log("Logging out"); await page.waitForSelector(menu_selector, {visible: true}); await page.click(menu_selector); await page.waitForSelector(logout_selector); diff --git a/frontend_tests/puppeteer_tests/04-subscriptions.js b/frontend_tests/puppeteer_tests/04-subscriptions.js index 86f68db952..ec1b718b42 100644 --- a/frontend_tests/puppeteer_tests/04-subscriptions.js +++ b/frontend_tests/puppeteer_tests/04-subscriptions.js @@ -108,7 +108,7 @@ async function test_user_filter_ui( await page.waitForSelector(cordelia_checkbox, {hidden: true}); await page.waitForSelector(othello_checkbox, {visible: true}); - // Filter shouln't affect streams. + // Filter shouldn't affect streams. await page.waitForSelector(scotland_checkbox, {visible: true}); await page.waitForSelector(rome_checkbox, {visible: true}); diff --git a/scripts/setup/generate_secrets.py b/scripts/setup/generate_secrets.py index 07ad5be456..c63b8e34e5 100755 --- a/scripts/setup/generate_secrets.py +++ b/scripts/setup/generate_secrets.py @@ -87,7 +87,7 @@ def generate_secrets(development: bool = False) -> None: if need_secret(name): add_secret(name, random_token()) - # These secrets are exclusive to a Zulip develpment environment. + # These secrets are exclusive to a Zulip development environment. # We use postgres peer authentication by default in production, # and initial_password_salt is used to generate passwords for the # test/development database users. See `manage.py diff --git a/static/js/composebox_typeahead.js b/static/js/composebox_typeahead.js index 5d008cf8b6..2fb8aaccc4 100644 --- a/static/js/composebox_typeahead.js +++ b/static/js/composebox_typeahead.js @@ -517,7 +517,7 @@ exports.get_stream_topic_data = (hacky_this) => { const opts = {}; const message_row = hacky_this.$element.closest(".message_row"); if (message_row.length === 1) { - // we are editting a message so we try to use it's keys. + // we are editing a message so we try to use it's keys. const msg = message_store.get(rows.id(message_row)); if (msg.type === "stream") { opts.stream = msg.stream; diff --git a/static/js/dropdown_list_widget.js b/static/js/dropdown_list_widget.js index c0a357d540..f459443241 100644 --- a/static/js/dropdown_list_widget.js +++ b/static/js/dropdown_list_widget.js @@ -96,7 +96,7 @@ const DropdownListWidget = function (opts) { }); dropdown_toggle.on("focus", (e) => { - // On opening a Bootstrap Dropdown, the parent element recieves focus. + // On opening a Bootstrap Dropdown, the parent element receives focus. // Here, we want our search input to have focus instead. e.preventDefault(); search_input.trigger("focus"); diff --git a/static/js/list_render.js b/static/js/list_render.js index b282931285..077339b2a9 100644 --- a/static/js/list_render.js +++ b/static/js/list_render.js @@ -7,7 +7,7 @@ const DEFAULTS = { }; // ---------------------------------------------------- -// This function describes (programatically) how to use +// This function describes (programmatically) how to use // the list_render widget. // ---------------------------------------------------- diff --git a/static/js/recent_topics.js b/static/js/recent_topics.js index 2ec13c7f9f..5a27c2eca8 100644 --- a/static/js/recent_topics.js +++ b/static/js/recent_topics.js @@ -87,7 +87,7 @@ function get_topic_key(stream_id, topic) { } exports.process_messages = function (messages) { - // FIX: Currently, we do a complete_rerender everytime + // FIX: Currently, we do a complete_rerender every time // we process a new message. // While this is inexpensive and handles all the cases itself, // the UX can be bad if user wants to scroll down the list as @@ -516,7 +516,7 @@ exports.change_focused_element = function (e, input_key) { // Note: current_focus_elem can be different here, so we just // set current_focus_elem to the input box, we don't want .trigger("focus") on // it since it is already focused. - // We only do this for search beacuse we don't want the focus to + // We only do this for search because we don't want the focus to // go away from the input box when `revive_current_focus` is called // on rerender when user is typing. current_focus_elem = $("#recent_topics_search"); diff --git a/static/js/rendered_markdown.js b/static/js/rendered_markdown.js index ef688fbd33..2067417220 100644 --- a/static/js/rendered_markdown.js +++ b/static/js/rendered_markdown.js @@ -5,7 +5,7 @@ const moment = require("moment"); /* rendered_markdown - This module provies a single function 'update_elements' to + This module provides a single function 'update_elements' to update any renamed users/streams/groups etc. and other dynamic parts of our rendered messages. diff --git a/static/js/settings_panel_menu.js b/static/js/settings_panel_menu.js index 9fb19bc296..07ab9e147d 100644 --- a/static/js/settings_panel_menu.js +++ b/static/js/settings_panel_menu.js @@ -32,7 +32,7 @@ class SettingsPanelMenu { this.main_elem.show(); const section = this.current_tab(); if (two_column_mode()) { - // In one colum mode want to show the settings list, not the first settings section. + // In one column mode want to show the settings list, not the first settings section. this.activate_section_or_default(section); } this.curr_li.trigger("focus"); diff --git a/templates/zerver/api/changelog.md b/templates/zerver/api/changelog.md index 703884e8b5..d549b3c880 100644 --- a/templates/zerver/api/changelog.md +++ b/templates/zerver/api/changelog.md @@ -146,7 +146,7 @@ No changes; feature level used for Zulip 3.0 release. * [`GET users/me`](/api/get-own-user): Added `avatar_version`, `is_guest`, `is_active`, `timezone`, and `date_joined` fields to the User objects. * [`GET users/me`](/api/get-own-user): Removed `client_id` and `short_name` - from the reponse to this endpoint. These fields had no purpose and + from the response to this endpoint. These fields had no purpose and were inconsistent with other API responses describing users. **Feature level 9** diff --git a/templates/zerver/help/night-mode.md b/templates/zerver/help/night-mode.md index 7001568929..119dd2ace7 100644 --- a/templates/zerver/help/night-mode.md +++ b/templates/zerver/help/night-mode.md @@ -16,6 +16,6 @@ for working in a dark space. The default is **Automatic**, which detects which theme to use based on the color scheme used by your operating system. -You can also specifc **Night mode** or **Day mode** if you'd like +You can also specify **Night mode** or **Day mode** if you'd like Zulip to use the same color scheme regardless of your operating system configuration. diff --git a/zerver/data_import/gitter.py b/zerver/data_import/gitter.py index 0ca081c3fc..19387a4dd1 100644 --- a/zerver/data_import/gitter.py +++ b/zerver/data_import/gitter.py @@ -164,7 +164,7 @@ def build_recipient_and_subscription( # For streams - # Initial recipients correspond to intitial streams + # Initial recipients correspond to initial streams # We enumerate all streams, and build a recipient for each # Hence 'recipient_id'=n corresponds to 'stream_id'=n for stream in zerver_stream: diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 4c94d8f8f6..72af553d39 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -4192,7 +4192,7 @@ def do_update_mobile_push_notification(message: Message, # # A perfect implementation would also support updating the message # in a sent notification if a message was edited to mention a - # group rather than a user (or vise versa), though it is likely + # group rather than a user (or vice versa), though it is likely # not worth the effort to do such a change. if not message.is_stream_message(): return diff --git a/zerver/lib/export.py b/zerver/lib/export.py index 81bf2c2030..32cc2f26ee 100644 --- a/zerver/lib/export.py +++ b/zerver/lib/export.py @@ -229,7 +229,7 @@ NON_EXPORTED_TABLES = { # Fillstate will require some cleverness to do the right partial export. 'analytics_fillstate', - # These are for unfinished features; we'll want to add them ot the + # These are for unfinished features; we'll want to add them to the # export before they reach full production status. 'zerver_defaultstreamgroup', 'zerver_defaultstreamgroup_streams', diff --git a/zerver/lib/generate_test_data.py b/zerver/lib/generate_test_data.py index a1432535ab..450bc36c06 100644 --- a/zerver/lib/generate_test_data.py +++ b/zerver/lib/generate_test_data.py @@ -130,7 +130,7 @@ def add_flair(paragraphs: List[str], gens: Dict[str, Any]) -> List[str]: def add_md(mode: str, text: str) -> str: # mode means: bold, italic, etc. - # to add a list at the end of a paragraph, * iterm one\n * item two + # to add a list at the end of a paragraph, * item one\n * item two # find out how long the line is, then insert the mode before the end diff --git a/zerver/lib/markdown/api_return_values_table_generator.py b/zerver/lib/markdown/api_return_values_table_generator.py index 44d4095386..4fc3128886 100644 --- a/zerver/lib/markdown/api_return_values_table_generator.py +++ b/zerver/lib/markdown/api_return_values_table_generator.py @@ -73,7 +73,7 @@ class APIReturnValuesTablePreprocessor(Preprocessor): continue if 'oneOf' in return_values[return_value]: # For elements using oneOf there are two descriptions. The first description - # should be at level with the oneOf and should containg the basic non-specific + # should be at level with the oneOf and should contain the basic non-specific # description of the endpoint. Then for each element of oneOf there is a # specialized description for that particular case. The description used # right below is the main description. @@ -115,7 +115,7 @@ class APIReturnValuesTablePreprocessor(Preprocessor): ' {event_type} {op}

\n{description}\n\n\n') for events in events_dict['oneOf']: # `id` is present in every event so it will be redundant to display - # it everytime. So remove it from the dictionary. + # it every time. So remove it from the dictionary. events['properties'].pop('id') event_type: Dict[str, Any] = events['properties'].pop('type') event_type_str: str = event_type['enum'][0] diff --git a/zerver/lib/test_classes.py b/zerver/lib/test_classes.py index 4324842c8c..cbb242c835 100644 --- a/zerver/lib/test_classes.py +++ b/zerver/lib/test_classes.py @@ -191,7 +191,7 @@ class ZulipTestCase(TestCase): url, query_data = self.extract_api_suffix_url(url) if len(query_data) != 0: # In some cases the query parameters are defined in the url itself. In such cases - # The `data` argument of our function is not used. Hence get `data` arguement + # The `data` argument of our function is not used. Hence get `data` argument # from url. data = query_data response_validated = validate_against_openapi_schema(content, url, method, str(result.status_code)) diff --git a/zerver/lib/users.py b/zerver/lib/users.py index b4a9419cf0..04280b7939 100644 --- a/zerver/lib/users.py +++ b/zerver/lib/users.py @@ -42,7 +42,7 @@ def check_full_name(full_name_raw: str) -> str: raise JsonableError(_("Invalid characters in name!")) # Names ending with e.g. `|15` could be ambiguous for # sloppily-written parsers of our markdown syntax for mentioning - # users with ambigious names, and likely have no real use, so we + # users with ambiguous names, and likely have no real use, so we # ban them. if re.search(r"\|\d+$", full_name_raw): raise JsonableError(_("Invalid format!")) diff --git a/zerver/lib/validator.py b/zerver/lib/validator.py index 4d5486fcb7..d62fb8cb82 100644 --- a/zerver/lib/validator.py +++ b/zerver/lib/validator.py @@ -378,14 +378,14 @@ def to_non_negative_int(s: str, max_int_size: int=2**32-1) -> int: return x def to_positive_or_allowed_int(allowed_integer: int) -> Callable[[str], int]: - def convertor(s: str) -> int: + def converter(s: str) -> int: x = int(s) if x == allowed_integer: return x if x == 0: raise ValueError("argument is 0") return to_non_negative_int(s) - return convertor + return converter def check_string_or_int_list(var_name: str, val: object) -> Union[str, List[int]]: if isinstance(val, str): diff --git a/zerver/management/commands/send_custom_email.py b/zerver/management/commands/send_custom_email.py index 27dfdd7b93..e8bb7e570e 100644 --- a/zerver/management/commands/send_custom_email.py +++ b/zerver/management/commands/send_custom_email.py @@ -25,10 +25,10 @@ class Command(ZulipBaseCommand): help='Path to a markdown-format body for the email.') parser.add_argument('--subject', type=str, - help='Subject for the email. It can be declarated in markdown file in headers') + help='Subject for the email. It can be declared in markdown file in headers') parser.add_argument('--from-name', type=str, - help='From line for the email. It can be declarated in markdown file in headers') + help='From line for the email. It can be declared in markdown file in headers') parser.add_argument('--reply-to', type=str, help='Optional reply-to line for the email') diff --git a/zerver/migrations/0285_remove_realm_google_hangouts_domain.py b/zerver/migrations/0285_remove_realm_google_hangouts_domain.py index ee0a09d84e..8ad0822ae7 100644 --- a/zerver/migrations/0285_remove_realm_google_hangouts_domain.py +++ b/zerver/migrations/0285_remove_realm_google_hangouts_domain.py @@ -18,7 +18,7 @@ VIDEO_CHAT_PROVIDERS = { def remove_google_hangouts_provider(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None: # We are removing the Google Hangout integration because Google has # removed the Hangouts brand. All the realms that used Hangouts as - # their video chat provided are now setted to the default, jitsi. + # their video chat provided are now set to the default, jitsi. Realm = apps.get_model('zerver', 'Realm') Realm.objects.filter(video_chat_provider=VIDEO_CHAT_PROVIDERS['google_hangouts']['id']).update( video_chat_provider=VIDEO_CHAT_PROVIDERS['jitsi_meet']['id'] diff --git a/zerver/models.py b/zerver/models.py index 203a112183..2e42a684f1 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -1131,7 +1131,7 @@ class UserProfile(AbstractBaseUser, PermissionsMixin): ROLE_ID_TO_NAME_MAP = { ROLE_REALM_OWNER: _("Organization owner"), - ROLE_REALM_ADMINISTRATOR: _("Organization adminstrator"), + ROLE_REALM_ADMINISTRATOR: _("Organization administrator"), ROLE_MEMBER: _("Member"), ROLE_GUEST: _("Guest"), } diff --git a/zerver/openapi/openapi.py b/zerver/openapi/openapi.py index 423c9902e9..8f26c485fb 100644 --- a/zerver/openapi/openapi.py +++ b/zerver/openapi/openapi.py @@ -49,7 +49,7 @@ class OpenAPISpec(): self.last_update = os.path.getmtime(self.path) def create_regex_dict(self) -> None: - # Alogrithm description: + # Algorithm description: # We have 2 types of endpoints # 1.with path arguments 2. without path arguments # In validate_against_openapi_schema we directly check @@ -200,7 +200,7 @@ def fix_events(content: Dict[str, Any]) -> None: only zulip.yaml changes and minimal other changes. It should be removed as soon as `/events` documentation is complete. """ - # 'user' is deprecated so remove its occurences from the events array + # 'user' is deprecated so remove its occurrences from the events array for event in content['events']: event.pop('user', None) diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml index 17fba29684..fd021d40f6 100644 --- a/zerver/openapi/zulip.yaml +++ b/zerver/openapi/zulip.yaml @@ -321,7 +321,7 @@ paths: The email of the user. **Deprecated**: This field will be removed in a future - release as it is redunant with the `user_id`. + release as it is redundant with the `user_id`. deprecated: true timezone: type: string @@ -883,7 +883,7 @@ paths: The email of the user. **Deprecated**: This field will be removed in a future - release as it is redunant with the `user_id`. + release as it is redundant with the `user_id`. deprecated: true server_timestamp: type: number @@ -894,7 +894,7 @@ paths: type: object description: | An object contatining a set of objects which describe the - the user's presence on various platfroms. + the user's presence on various platforms. additionalProperties: $ref: "#/components/schemas/Presence" additionalProperties: false @@ -2037,7 +2037,7 @@ paths: - update_message_flags operation: description: | - Whether the flags are added or rmeoved. + Whether the flags are added or removed. type: string enum: - add @@ -2082,7 +2082,7 @@ paths: operation: type: string description: | - Whether the flags are added or rmeoved. + Whether the flags are added or removed. enum: - remove flag: @@ -2144,7 +2144,7 @@ paths: additionalProperties: false description: | Event sent to all users in a Zulip organization - when a propety of a user group is changed. + when a property of a user group is changed. properties: id: type: integer @@ -5868,7 +5868,7 @@ paths: stream_id: type: integer description: | - The id of the stream to which the messsage was sent. + The id of the stream to which the message was sent. message_ids: type: array description: | @@ -5891,7 +5891,7 @@ paths: type: string description: | A string containing the ids of all users in the huddle(group PMs) - seperated by commas(,). Example: "1,2,3". + separated by commas(,). Example: "1,2,3". message_ids: type: array description: | @@ -7131,7 +7131,7 @@ paths: description: | A unique, table, machine-readable name for the authentication method, intended to be used by clients with special behavior for specific - authenatication methods to correctly identify the method. + authentication methods to correctly identify the method. display_name: type: string description: | diff --git a/zerver/tests/fixtures/email/subjects.json b/zerver/tests/fixtures/email/subjects.json index afcb2b5147..bb18cdf498 100644 --- a/zerver/tests/fixtures/email/subjects.json +++ b/zerver/tests/fixtures/email/subjects.json @@ -8,8 +8,8 @@ "stripped_subject": "" }, { - "original_subject": "Re: Fwd: Re: Sofware", - "stripped_subject": "Sofware" + "original_subject": "Re: Fwd: Re: Software", + "stripped_subject": "Software" }, { "original_subject": "Fwd : Re : Re: Many", diff --git a/zerver/tests/fixtures/mattermost_fixtures/direct_channel/export.json b/zerver/tests/fixtures/mattermost_fixtures/direct_channel/export.json index 38b412a4bd..c4b056c699 100644 --- a/zerver/tests/fixtures/mattermost_fixtures/direct_channel/export.json +++ b/zerver/tests/fixtures/mattermost_fixtures/direct_channel/export.json @@ -14,7 +14,7 @@ {"type":"direct_channel","direct_channel":{"members":["ron","harry"],"favorited_by":null,"header":""}} {"type":"direct_channel","direct_channel":{"members":["ron","harry", "ginny"],"favorited_by":null,"header":""}} {"type":"direct_post","direct_post":{"channel_members":["ron","harry"],"user":"ron","message":"hey harry","create_at":1566376137676,"flagged_by":null,"reactions":null,"replies":null,"attachments":null}} -{"type":"direct_post","direct_post":{"channel_members":["ron","harry"],"user":"harry","message":"whats up","create_at":1566376318568,"flagged_by":null,"reactions":null,"replies":null,"attachments":null}} +{"type":"direct_post","direct_post":{"channel_members":["ron","harry"],"user":"harry","message":"what's up","create_at":1566376318568,"flagged_by":null,"reactions":null,"replies":null,"attachments":null}} {"type":"direct_post","direct_post":{"channel_members":["ron","harry","ginny"],"user":"ginny","message":"Who is going to Hogesmead this weekend?","create_at":1566376226493,"flagged_by":null,"reactions":null,"replies":null,"attachments":null}} {"type":"direct_post","direct_post":{"channel_members":["ron","harry","ginny"],"user":"harry","message":"I am going.","create_at":1566376311350,"flagged_by":null,"reactions":null,"replies":null,"attachments":null}} {"type":"direct_post","direct_post":{"channel_members":["ron","harry","ginny"],"user":"ron","message":"I am going as well","create_at":1566376286363,"flagged_by":null,"reactions":null,"replies":null,"attachments":null}} diff --git a/zerver/tests/test_integrations_dev_panel.py b/zerver/tests/test_integrations_dev_panel.py index 4ff2b73f2b..1cb7984c9a 100644 --- a/zerver/tests/test_integrations_dev_panel.py +++ b/zerver/tests/test_integrations_dev_panel.py @@ -30,7 +30,7 @@ class TestIntegrationsDevPanel(ZulipTestCase): self.assertEqual(ujson.loads(response.content), expected_response) # Intention of this test looks like to trigger keyError - # so just testing KeyError is printed along wth Traceback in logs + # so just testing KeyError is printed along with Traceback in logs self.assertTrue("KeyError" in logs.output[0]) self.assertTrue("Traceback (most recent call last)" in logs.output[0]) self.assertEqual(logs.output[1], "ERROR:django.request:Internal Server Error: /api/v1/external/airbrake") diff --git a/zerver/tests/test_markdown.py b/zerver/tests/test_markdown.py index 75f9edcfaf..5a3c1039d8 100644 --- a/zerver/tests/test_markdown.py +++ b/zerver/tests/test_markdown.py @@ -1229,7 +1229,7 @@ class MarkdownTest(ZulipTestCase): content = """Hello, everyone. Prod deployment has been completed And this is a new line - to test out how markdown convert this into something line ending splitted array + to test out how markdown convert this into something line ending split array and this is a new line last""" render(msg, content) @@ -2156,7 +2156,7 @@ class MarkdownErrorTests(ZulipTestCase): self.send_stream_message(self.example_user("othello"), "Denmark", message) def test_ultra_long_rendering(self) -> None: - """A rendered message with an ultra-long lenght (> 10 * MAX_MESSAGE_LENGTH) + """A rendered message with an ultra-long length (> 10 * MAX_MESSAGE_LENGTH) throws an exception""" msg = 'mock rendered message\n' * MAX_MESSAGE_LENGTH diff --git a/zerver/tests/test_openapi.py b/zerver/tests/test_openapi.py index 28ec1d15de..bb282a82d4 100644 --- a/zerver/tests/test_openapi.py +++ b/zerver/tests/test_openapi.py @@ -150,7 +150,7 @@ class OpenAPIToolsTest(ZulipTestCase): # Check that validate_against_openapi_schema correctly # descends into 'deep' objects and arrays. Test 1 should # pass, Test 2 has a 'deep' extraneous key and Test 3 has a - # 'deep' opaque object. Also the parameters are a heterogenous + # 'deep' opaque object. Also the parameters are a heterogeneous # mix of arrays and objects to verify that our descent logic # correctly gets to the the deeply nested objects. with open(os.path.join(os.path.dirname(OPENAPI_SPEC_PATH), @@ -480,7 +480,7 @@ do not match the types declared in the implementation of {function.__name__}.\n" # checked in the view code. # # Meanwhile `profile_data` in /users/{user_id}: GET is - # taken as array of objects. So treat them seperately. + # taken as array of objects. So treat them separately. schema = element["content"]["application/json"]["schema"] json_params[name] = schema_type(schema) continue diff --git a/zerver/tests/test_retention.py b/zerver/tests/test_retention.py index 56cfee4605..a9ab14f967 100644 --- a/zerver/tests/test_retention.py +++ b/zerver/tests/test_retention.py @@ -817,7 +817,7 @@ class TestCleaningArchive(ArchiveMessagesTestingBase): class TestGetRealmAndStreamsForArchiving(ZulipTestCase): def fix_ordering_of_result(self, result: List[Tuple[Realm, List[Stream]]]) -> None: """ - This is a helper for giving the struture returned by get_realms_and_streams_for_archiving + This is a helper for giving the structure returned by get_realms_and_streams_for_archiving a consistent ordering. """ # Sort the list of tuples by realm id: diff --git a/zerver/views/development/registration.py b/zerver/views/development/registration.py index 9514d3d7b8..8f14bd03c6 100644 --- a/zerver/views/development/registration.py +++ b/zerver/views/development/registration.py @@ -34,7 +34,7 @@ def register_development_user(request: HttpRequest) -> HttpResponse: activation_url = create_confirmation_link(prereg, Confirmation.USER_REGISTRATION) key = activation_url.split('/')[-1] - # Need to add test data to POST request as it doesnt originally contain the required parameters + # Need to add test data to POST request as it doesn't originally contain the required parameters modify_postdata(request, key=key, full_name=name, password='test', terms='true') return accounts_register(request) @@ -50,7 +50,7 @@ def register_development_realm(request: HttpRequest) -> HttpResponse: activation_url = create_confirmation_link(prereg, Confirmation.REALM_CREATION) key = activation_url.split('/')[-1] - # Need to add test data to POST request as it doesnt originally contain the required parameters + # Need to add test data to POST request as it doesn't originally contain the required parameters modify_postdata(request, key=key, realm_name=realm_name, full_name=name, password='test', realm_subdomain=realm_name, terms='true') diff --git a/zerver/views/realm_icon.py b/zerver/views/realm_icon.py index 05dd686f09..2a4c270159 100644 --- a/zerver/views/realm_icon.py +++ b/zerver/views/realm_icon.py @@ -36,7 +36,7 @@ def upload_icon(request: HttpRequest, user_profile: UserProfile) -> HttpResponse @require_realm_admin def delete_icon_backend(request: HttpRequest, user_profile: UserProfile) -> HttpResponse: # We don't actually delete the icon because it might still - # be needed if the URL was cached and it is rewrited + # be needed if the URL was cached and it is rewritten # in any case after next update. do_change_icon_source(user_profile.realm, user_profile.realm.ICON_FROM_GRAVATAR, acting_user=user_profile) gravatar_url = realm_icon_url(user_profile.realm) diff --git a/zerver/views/realm_logo.py b/zerver/views/realm_logo.py index fa8e4cc063..de43224160 100644 --- a/zerver/views/realm_logo.py +++ b/zerver/views/realm_logo.py @@ -36,7 +36,7 @@ def upload_logo(request: HttpRequest, user_profile: UserProfile, def delete_logo_backend(request: HttpRequest, user_profile: UserProfile, night: bool=REQ(validator=check_bool)) -> HttpResponse: # We don't actually delete the logo because it might still - # be needed if the URL was cached and it is rewrited + # be needed if the URL was cached and it is rewritten # in any case after next update. do_change_logo_source(user_profile.realm, user_profile.realm.LOGO_DEFAULT, night, acting_user=user_profile) return json_success() diff --git a/zerver/views/video_calls.py b/zerver/views/video_calls.py index 5e7e98c9b2..ac5e4ff02e 100644 --- a/zerver/views/video_calls.py +++ b/zerver/views/video_calls.py @@ -64,7 +64,7 @@ def get_zoom_sid(request: HttpRequest) -> str: csrf.get_token(request) # Use 'mark_sanitized' to cause Pysa to ignore the flow of user controlled # data out of this function. 'request.META' is indeed user controlled, but - # post-HMAC ouptut is no longer meaningfully controllable. + # post-HMAC output is no longer meaningfully controllable. return mark_sanitized( "" if getattr(request, "_dont_enforce_csrf_checks", False) diff --git a/zerver/webhooks/bitbucket3/view.py b/zerver/webhooks/bitbucket3/view.py index a84f2b534b..15246d1c56 100644 --- a/zerver/webhooks/bitbucket3/view.py +++ b/zerver/webhooks/bitbucket3/view.py @@ -347,7 +347,7 @@ EVENT_HANDLER_MAP = { } # type Dict[str, Optional[Callable[..., List[Dict[str, str]]]]] def get_event_handler(eventkey: str) -> Callable[..., List[Dict[str, str]]]: - # The main reason for this function existance is because of mypy + # The main reason for this function existence is because of mypy handler: Any = EVENT_HANDLER_MAP.get(eventkey) if handler is None: raise UnexpectedWebhookEventType("BitBucket Server", eventkey) diff --git a/zerver/webhooks/stripe/view.py b/zerver/webhooks/stripe/view.py index 9abfa3da7e..527bd127bb 100644 --- a/zerver/webhooks/stripe/view.py +++ b/zerver/webhooks/stripe/view.py @@ -240,7 +240,7 @@ def linkified_id(object_id: str, lower: bool=False) -> str: # Undocumented :| 'py': ('Payment', 'payments'), - 'pyr': ('Refund', 'refunds'), # Psuedo refunds. Not fully tested. + 'pyr': ('Refund', 'refunds'), # Pseudo refunds. Not fully tested. # Connect, Fraud, Orders, etc not implemented } diff --git a/zerver/worker/queue_processors.py b/zerver/worker/queue_processors.py index a9852d6aec..41065e7cb2 100644 --- a/zerver/worker/queue_processors.py +++ b/zerver/worker/queue_processors.py @@ -369,7 +369,7 @@ class ConfirmationEmailWorker(QueueProcessingWorker): @assign_queue('user_activity', queue_type="loop") class UserActivityWorker(LoopQueueProcessingWorker): """The UserActivity queue is perhaps our highest-traffic queue, and - requires some care to ensure it performes adequately. + requires some care to ensure it performs adequately. We use a LoopQueueProcessingWorker as a performance optimization for managing the queue. The structure of UserActivity records is diff --git a/zproject/backends.py b/zproject/backends.py index cad8d397a0..1262b1dfe4 100644 --- a/zproject/backends.py +++ b/zproject/backends.py @@ -1197,7 +1197,7 @@ def social_associate_user_helper(backend: BaseAuth, return_data: Dict[str, Any], return_data["full_name"] = full_name else: # Some authentications methods like Apple and SAML send - # first name and last name as seperate attributes. In that case + # first name and last name as separate attributes. In that case # we construct the full name from them. return_data["full_name"] = f"{first_name or ''} {last_name or ''}".strip() # strip removes the unnecessary ' ' diff --git a/zproject/prod_settings_template.py b/zproject/prod_settings_template.py index bcb5a2a249..220d3d97c7 100644 --- a/zproject/prod_settings_template.py +++ b/zproject/prod_settings_template.py @@ -366,7 +366,7 @@ SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # 2 weeks # For frontend (JavaScript) tracebacks #BROWSER_ERROR_REPORTING = False -# Controls the DSN used to report erors to Sentry.io +# Controls the DSN used to report errors to Sentry.io #SENTRY_DSN = 'https://bbb@bbb.ingest.sentry.io/1235' # If True, each log message in the server logs will identify the