Skip to content

Fix typos in comments, docstrings, and error messages - #10098

Open
maxtaran2010 wants to merge 1 commit into
getmoto:masterfrom
maxtaran2010:fix-typos
Open

Fix typos in comments, docstrings, and error messages#10098
maxtaran2010 wants to merge 1 commit into
getmoto:masterfrom
maxtaran2010:fix-typos

Conversation

@maxtaran2010

Copy link
Copy Markdown

This PR fixes a set of genuine spelling typos found across comments, docstrings, and a couple of user-facing error message strings in the moto source. No code identifiers, public API names, test fixtures, or generated files were touched — only prose.

For the S3 CORS and Glue crawler error strings, the corrected spelling also better matches the wording AWS itself returns.

File Before After
moto/cloudwatch/models.py calculate statics for a list calculate statistics for a list
moto/cloudwatch/models.py Sum, Average, Minium, Maximum Sum, Average, Minimum, Maximum
moto/codebuild/models.py update build histroy update build history
moto/config/models.py when instatiating the representative when instantiating the representative
moto/config/models.py evaluations are trigged evaluations are triggered
moto/ds/validations.py elminating the need eliminating the need
moto/dynamodb/models/table.py Check wether we've reached Check whether we've reached
moto/dynamodb/parsing/ast_nodes.py in expresion in expression
moto/glue/models.py Unexpeected state found for crawler Unexpected state found for crawler
moto/lakeformation/models.py same principal and resouce (comments) same principal and resource
moto/lakeformation/models.py remove and readd remove and re-add
moto/lakeformation/models.py eventhough it is valid even though it is valid
moto/route53resolver/models.py requires atleast two ip addresses requires at least two ip addresses
moto/route53resolver/models.py as does the AWS documention as does the AWS documentation
moto/route53resolver/responses.py which Resolver enpoint which Resolver endpoint
moto/s3/responses.py because the evalution of Origin because the evaluation of Origin
moto/sns/responses.py all thats needed all that's needed
moto/wafv2/utils.py needs to be overriden here needs to be overridden here
moto/workspaces/models.py modify creation properites modify creation properties
moto/workspaces/models.py if Directory doesnot exist if Directory does not exist

The equal_principal_and_resouce method name was intentionally left unchanged to avoid touching identifiers.

Copilot AI review requested due to automatic review settings July 8, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects spelling/wording in comments, docstrings, and a small number of user-facing error message strings across Moto, aiming to improve clarity and better align a couple of messages with AWS wording.

Changes:

  • Fixed typos in inline comments and docstrings across multiple services (CloudWatch, CodeBuild, Config, DynamoDB, Directory Service, Lake Formation, Route 53 Resolver, WAFv2, WorkSpaces).
  • Corrected spelling in a few user-facing error strings (notably S3 CORS and Glue crawler error text).
  • Minor doc/comment wording normalization (e.g., “at least”, “even though”, “re-add”).

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
moto/cloudwatch/models.py Fixes typos in Statistics class docstrings/param documentation.
moto/codebuild/models.py Fixes typo in an inline comment about build history metadata.
moto/config/models.py Fixes typo in convert_to_class_args docstring and Scope docstring.
moto/ds/validations.py Fixes typo in a comment in validate_args.
moto/dynamodb/models/table.py Fixes typo in a query pagination/limit comment.
moto/dynamodb/parsing/ast_nodes.py Fixes typo in ExpressionSelector docstring.
moto/glue/models.py Fixes typo in a RuntimeError message for unexpected crawler state.
moto/lakeformation/models.py Fixes typos in permission-related comments and an AWS-CLI wording comment.
moto/route53resolver/models.py Fixes typos in subnet IP validation comment and documentation comment.
moto/route53resolver/responses.py Fixes typo in a Resolver rule docstring.
moto/s3/responses.py Fixes typo in the S3 CORS AccessForbidden error message string.
moto/sns/responses.py Fixes typo in a confirm_subscription explanatory comment.
moto/wafv2/utils.py Fixes typo in a comment explaining CloudFront ARN region handling.
moto/workspaces/models.py Fixes typos in comments related to workspace creation properties and directory existence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread moto/config/models.py
@@ -172,7 +172,7 @@ def convert_to_class_args(dict_arg: dict[str, Any]) -> dict[str, Any]:
"""Return dict that can be used to instantiate it's representative class.
for existing_permission in self.permissions:
if permission.equal_principal_and_resouce(existing_permission):
# Permission with same principal and resouce, only once of these can exist
# Permission with same principal and resource, only once of these can exist
if permission.equal_principal_and_resouce(existing_permission):
# Permission with same principal and resouce, only once of these can exist
# remove and readd to recalculate the hash value after the diff
# Permission with same principal and resource, only once of these can exist
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.24%. Comparing base (ae4d8f8) to head (fb56510).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10098      +/-   ##
==========================================
- Coverage   93.24%   93.24%   -0.01%     
==========================================
  Files        1326     1326              
  Lines      120987   120987              
==========================================
- Hits       112819   112818       -1     
- Misses       8168     8169       +1     
Flag Coverage Δ
servertests 27.96% <ø> (ø)
unittests 93.22% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bpandola bpandola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the additional typos/grammatical errors identified by CoPilot and I will merge. Thanks.

@bpandola bpandola added this to the 5.2.3 milestone Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants