Fix typos in comments, docstrings, and error messages - #10098
Fix typos in comments, docstrings, and error messages#10098maxtaran2010 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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.
| @@ -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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bpandola
left a comment
There was a problem hiding this comment.
Fix the additional typos/grammatical errors identified by CoPilot and I will merge. Thanks.
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.
moto/cloudwatch/models.pystaticsfor a liststatisticsfor a listmoto/cloudwatch/models.pyMinium, MaximumMinimum, Maximummoto/codebuild/models.pyhistroyhistorymoto/config/models.pyinstatiatingthe representativeinstantiatingthe representativemoto/config/models.pytriggedtriggeredmoto/ds/validations.pyelminatingthe needeliminatingthe needmoto/dynamodb/models/table.pywetherwe've reachedwhetherwe've reachedmoto/dynamodb/parsing/ast_nodes.pyexpresionexpressionmoto/glue/models.pyUnexpeectedstate found for crawlerUnexpectedstate found for crawlermoto/lakeformation/models.pyresouce(comments)resourcemoto/lakeformation/models.pyreaddre-addmoto/lakeformation/models.pyeventhoughit is valideven thoughit is validmoto/route53resolver/models.pyatleasttwo ip addressesat leasttwo ip addressesmoto/route53resolver/models.pydocumentiondocumentationmoto/route53resolver/responses.pyenpointendpointmoto/s3/responses.pyevalutionof Originevaluationof Originmoto/sns/responses.pythatsneededthat'sneededmoto/wafv2/utils.pyoverridenhereoverriddenheremoto/workspaces/models.pyproperitespropertiesmoto/workspaces/models.pydoesnotexistdoes notexistThe
equal_principal_and_resoucemethod name was intentionally left unchanged to avoid touching identifiers.