Repository navigation
fix(parser): add IoT Core registry models to parser.models exports - #8746
leandrodamascena merged 2 commits into
Conversation
The six IoT Core registry models were listed as built-in models in the docs but missing from parser/models/__init__.py, so importing them from parser.models failed. Also fix the CloudWatchLogsModel spelling in the parser docs.
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks @Manishram-ai, confirmed: all six models import from parser.models now, the submodule path still works, and the docs table matches the class name. I'm approving now. This goes out in 3.39.0 in the next couple of days; no rebase needed, and you'll be credited in the release notes.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8746 +/- ##
========================================
Coverage 97.00% 97.00%
========================================
Files 321 321
Lines 16415 16415
Branches 1482 1482
========================================
Hits 15924 15924
Misses 350 350
Partials 141 141 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Issue number:
closes #8742
Summary
Changes
IoTCoreThingEvent,IoTCoreThingTypeEvent,IoTCoreThingTypeAssociationEvent,IoTCoreThingGroupEvent,IoTCoreAddOrRemoveFromThingGroupEvent,IoTCoreAddOrDeleteFromThingGroupEvent) fromparser/models/__init__.py, in theTYPE_CHECKINGimports,_MODEL_MODULESand__all__, like the other models.tests/functional/parser/test_model_imports.py.CloudwatchLogsModeltoCloudWatchLogsModelindocs/utilities/parser.md(the models table and theCloudWatchLogsEnveloperow).User experience
Before:
from aws_lambda_powertools.utilities.parser.models import IoTCoreThingEventfails, even though the docs list it as a built-in model. The only way in was theparser.models.iot_registry_eventssubmodule.After: all six import from
parser.modelslike the other built-in models, and the docs use the real class name.Verification
developand pass with this change.tests/functional/parser: 72 passed (Python 3.12).ruff format --checkandruff checkon the changed files are clean.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.