Skip to content

fix: rename TikTokSettings to TikTokPlatformData (fixes #12)#13

Merged
mikipalet merged 4 commits intodevelopfrom
fix/tiktok-settings-import
Mar 2, 2026
Merged

fix: rename TikTokSettings to TikTokPlatformData (fixes #12)#13
mikipalet merged 4 commits intodevelopfrom
fix/tiktok-settings-import

Conversation

@mikipalet
Copy link
Collaborator

Summary

  • TikTokSettings was renamed to TikTokPlatformData in the auto-generated models, but models/__init__.py and tests still imported the old name
  • This caused an ImportError on any from late import Late call, making the SDK completely unusable (reported in Bug leads to failing builds #12 and Crisp ticket GET-379)

Changes

  • Updated src/late/models/__init__.py: import + __all__ export
  • Updated tests/test_exhaustive.py: 3 references

Test plan

  • from late import Late no longer crashes
  • from late.models import TikTokPlatformData works
  • Existing tests pass

🤖 Generated with Claude Code

mikipalet and others added 4 commits March 2, 2026 11:25
…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>
@mikipalet mikipalet merged commit afdba0b into develop Mar 2, 2026
4 checks passed
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.

1 participant