fix: rename TikTokSettings to TikTokPlatformData (fixes #12)#13
Merged
fix: rename TikTokSettings to TikTokPlatformData (fixes #12)#13
Conversation
…odels The model was renamed to TikTokPlatformData in the generated code but the explicit imports in __init__.py and tests still referenced the old TikTokSettings name, causing an ImportError on any SDK import. Fixes #12 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two changes to stop this class of bug: 1. Remove `|| echo` from test step in generate.yml so test failures actually block the release pipeline instead of silently publishing a broken SDK to PyPI. 2. Add import validation to generate_models.py that checks every explicit import in models/__init__.py exists in the generated models. Fails the pipeline if the OpenAPI spec renamed/removed a model that __init__.py still references. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The generated models file uses runtime imports for `datetime.date` which triggers ruff's TCH003 rule. Since this file is auto-generated by datamodel-code-generator, we should ignore this rule like the other generated-code-specific ignores. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Status enum is success/failed (webhook log status), not draft/scheduled - TikTokPlatformData uses camelCase fields (allowComment, privacyLevel) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TikTokSettingswas renamed toTikTokPlatformDatain the auto-generated models, butmodels/__init__.pyand tests still imported the old nameImportErroron anyfrom late import Latecall, making the SDK completely unusable (reported in Bug leads to failing builds #12 and Crisp ticket GET-379)Changes
src/late/models/__init__.py: import +__all__exporttests/test_exhaustive.py: 3 referencesTest plan
from late import Lateno longer crashesfrom late.models import TikTokPlatformDataworks🤖 Generated with Claude Code