From 5baf176ff775d74bd9e81c820d6833751909521e Mon Sep 17 00:00:00 2001 From: jaimax0401 Date: Mon, 18 May 2026 12:22:21 +0530 Subject: [PATCH] fix: correct typos 'seperate', 'recieve', and 'occured' - seperate -> separate (5 occurrences) - recieve -> receive (2 occurrences) - occured -> occurred (8 occurrences across 10 files) --- docs/public/redis_vector_db.py | 2 +- sweepai/agents/question_answerer.py | 2 +- sweepai/core/context_pruning.py | 8 ++++---- sweepai/core/on_comment_prompts.py | 2 +- sweepai/core/planning_prompts.py | 2 +- sweepai/core/pull_request_bot.py | 2 +- sweepai/core/review_utils.py | 6 +++--- sweepai/core/vector_db.py | 2 +- sweepai/handlers/on_comment.py | 4 ++-- sweepai/handlers/review_pr.py | 2 +- sweepai/utils/str_utils.py | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/public/redis_vector_db.py b/docs/public/redis_vector_db.py index 140064f999..2068824b23 100644 --- a/docs/public/redis_vector_db.py +++ b/docs/public/redis_vector_db.py @@ -86,7 +86,7 @@ def openai_with_expo_backoff(batch: tuple[str]): try: new_embeddings = openai_call_embedding(batch) except requests.exceptions.Timeout as e: - logger.exception(f"Timeout error occured while embedding: {e}") + logger.exception(f"Timeout error occurred while embedding: {e}") except BadRequestError as e: try: # 4. If we get a BadRequestError, truncate the text and try again diff --git a/sweepai/agents/question_answerer.py b/sweepai/agents/question_answerer.py index 3de439cb2b..ca4c0eef8b 100644 --- a/sweepai/agents/question_answerer.py +++ b/sweepai/agents/question_answerer.py @@ -651,7 +651,7 @@ def done_file_search( # Guidelines -1. Analyze the user's request to understand the information they are seeking. This may involve breaking the request down into smaller sub requests to identify the specific information needed. You may need to search for these smaller sub requests seperately. +1. Analyze the user's request to understand the information they are seeking. This may involve breaking the request down into smaller sub requests to identify the specific information needed. You may need to search for these smaller sub requests separately. 2. Use the search tools available to search the codebase for relevant code files that can help answer all of the user's requests. 3. When you are confident a code file is relevant to the user request, use the `add_file_to_context` tool to add a file to context to indicate that the file is useful and will be needed to fully resolve the user request. 4. A relevant file is defined to be any file needed to answer the user request. This includes code files that contain relevant typing/struct/constant definitions, utility functions, or any other code that is needed to answer the user request. diff --git a/sweepai/core/context_pruning.py b/sweepai/core/context_pruning.py index d9cf1fff22..c6e1c95ecb 100644 --- a/sweepai/core/context_pruning.py +++ b/sweepai/core/context_pruning.py @@ -350,7 +350,7 @@ def build_full_hierarchy( if length == 1 } except Exception as e: - print("error occured while fetching successors:", e) + print("error occurred while fetching successors:", e) return hierarchy sorted_successors = sorted(successors) for idx, child in enumerate(sorted_successors): @@ -368,7 +368,7 @@ def build_full_hierarchy( if length == 1 } except Exception as e: - print("error occured while fetching predecessors:", e) + print("error occurred while fetching predecessors:", e) return hierarchy sorted_predecessors = sorted(predecessors) for idx, parent in enumerate(sorted_predecessors): @@ -543,7 +543,7 @@ def add_relevant_files_to_top_snippets(rcm: RepoContextManager) -> RepoContextMa rcm.boost_snippets_to_top(code_snippets, code_files_in_query) except Exception as e: logger.error( - f"Tried to add code file found in query but recieved error: {e}, skipping and continuing to next one." + f"Tried to add code file found in query but received error: {e}, skipping and continuing to next one." ) return rcm @@ -790,7 +790,7 @@ def handle_function_call( output = f"FAILURE: No results found for code_entity: {code_entity} in the entire codebase. Please try a new code_entity. Consider trying different whitespace or a truncated version of this code_entity." except Exception as e: logger.error( - f"FAILURE: An Error occured while trying to find the code_entity {code_entity}: {e}" + f"FAILURE: An Error occurred while trying to find the code_entity {code_entity}: {e}" ) output = f"FAILURE: No results found for code_entity: {code_entity} in the entire codebase. Please try a new code_entity. Consider trying different whitespace or a truncated version of this code_entity." elif function_name == "view_files": diff --git a/sweepai/core/on_comment_prompts.py b/sweepai/core/on_comment_prompts.py index 5e65f376ea..c14ec6c557 100644 --- a/sweepai/core/on_comment_prompts.py +++ b/sweepai/core/on_comment_prompts.py @@ -100,7 +100,7 @@ For each of the sub requests here, pinpoint the exact places to make changes. Describe exactly what to do, referencing specific code entities in the relevant files. -Break the above steps up into seperate actionable steps and number them. +Break the above steps up into separate actionable steps and number them. Double check the state of the code base. Example: 1. Step 1 diff --git a/sweepai/core/planning_prompts.py b/sweepai/core/planning_prompts.py index c9a22aa058..c929db1991 100644 --- a/sweepai/core/planning_prompts.py +++ b/sweepai/core/planning_prompts.py @@ -81,7 +81,7 @@ For each of the sub requests here, pinpoint the exact places to make changes. Describe exactly what to do, referencing specific code entities in the relevant files. -Break the above steps up into seperate actionable steps and number them. +Break the above steps up into separate actionable steps and number them. Example: 1. Step 1 - Step 1a diff --git a/sweepai/core/pull_request_bot.py b/sweepai/core/pull_request_bot.py index 95fb12ecf3..cca6b4dee2 100644 --- a/sweepai/core/pull_request_bot.py +++ b/sweepai/core/pull_request_bot.py @@ -19,7 +19,7 @@ 3. Group similar operations where applicable to avoid redundancy. Your message must be directly related to the file changes stated. Avoid additional interpretation or detail not present in the input. -You will recieve a series of file diffs that need to be described in a short commit message. +You will receive a series of file diffs that need to be described in a short commit message. Return your commit message in the following xml format: diff --git a/sweepai/core/review_utils.py b/sweepai/core/review_utils.py index a87a8acc0e..deb27f3c34 100644 --- a/sweepai/core/review_utils.py +++ b/sweepai/core/review_utils.py @@ -511,7 +511,7 @@ def review_code_changes_by_file( use_openai=True, seed=seed ) - # make a seperate call for the special rules + # make a separate call for the special rules # check if there are special rules we need to follow for this file by seeing if the files "SWEEP.md" exists special_rules = self.get_special_rules(cloned_repo, file_names) if special_rules: @@ -1012,7 +1012,7 @@ def get_code_reviews_for_file( ) return code_review_by_group -# run 5 seperate instances of review_pr and then group the resulting issues and only take the issues that appear the majority of the time (> 3) +# run 5 separate instances of review_pr and then group the resulting issues and only take the issues that appear the majority of the time (> 3) def group_vote_review_pr( username: str, pr_changes: dict[str, PRChange], @@ -1266,7 +1266,7 @@ def cluster_patches(pr_changes: dict[str, PRChange]): # group key is the label, value is the list of file names to review together groups_to_review_files_in: dict[str, list[str]] = {} - # split files into their groups -> -1 means create a seperate group -1x for that group + # split files into their groups -> -1 means create a separate group -1x for that group noise_groups = 0 for index, group in enumerate(labels): if group != -1: diff --git a/sweepai/core/vector_db.py b/sweepai/core/vector_db.py index 9ea43b40be..f7e8ffd5f8 100644 --- a/sweepai/core/vector_db.py +++ b/sweepai/core/vector_db.py @@ -223,7 +223,7 @@ def openai_with_expo_backoff(batch: tuple[str]): # make sure all token counts are within model params (max: 8192) new_embeddings = openai_call_embedding(batch) except requests.exceptions.Timeout as e: - logger.exception(f"Timeout error occured while embedding: {e}") + logger.exception(f"Timeout error occurred while embedding: {e}") except Exception as e: logger.exception(e) if any(tiktoken_client.count(text) > 8192 for text in batch): diff --git a/sweepai/handlers/on_comment.py b/sweepai/handlers/on_comment.py index 53f4094a05..c406e15cd1 100644 --- a/sweepai/handlers/on_comment.py +++ b/sweepai/handlers/on_comment.py @@ -291,13 +291,13 @@ def edit_comment(new_comment: str) -> None: "failed", properties={ "error": str(e), - "traceback": f"An error occured during the search! The stack trace is below:\n\n{stack_trace}", + "traceback": f"An error occurred during the search! The stack trace is below:\n\n{stack_trace}", "duration": elapsed_time, "tracking_id": tracking_id, **metadata, }, ) - edit_comment(ERROR_FORMAT.format(title=f"An error occured!\n\nThe exception message is:{str(e)}\n\nThe stack trace is:{stack_trace}")) + edit_comment(ERROR_FORMAT.format(title=f"An error occurred!\n\nThe exception message is:{str(e)}\n\nThe stack trace is:{stack_trace}")) raise e try: diff --git a/sweepai/handlers/review_pr.py b/sweepai/handlers/review_pr.py index d9fc3c2a51..04ab198849 100644 --- a/sweepai/handlers/review_pr.py +++ b/sweepai/handlers/review_pr.py @@ -128,7 +128,7 @@ def review_pr( pr_changes, dropped_files, unsuitable_files = get_pr_changes( repository, pr, cloned_repo ) - # -1 group key means review those seperately + # -1 group key means review those separately grouped_files: dict[str, list[str]] = cluster_patches(pr_changes) # build another dict so that all files are in their own group single_files = {file_name: [file_name] for file_name in pr_changes.keys()} diff --git a/sweepai/utils/str_utils.py b/sweepai/utils/str_utils.py index 381fad680a..694b2747fe 100644 --- a/sweepai/utils/str_utils.py +++ b/sweepai/utils/str_utils.py @@ -221,7 +221,7 @@ def extract_objects_from_string(text: str, object_tag: str, object_params: list[ extracted_objects.append(object_args) else: failed_extraction = True - logger.warning(f"Failure occured during extraction on the following param: {failed_param}\ntext:\n{text}") + logger.warning(f"Failure occurred during extraction on the following param: {failed_param}\ntext:\n{text}") posthog.capture("extract_objects_from_string", "extract_objects_from_string failed", properties={"failed_param": failed_param, "text": text, "object_tag": object_tag}) return extracted_objects, failed_extraction