Skip to content

Fix TOML parser selection for Python 3.14 lint - #4505

Merged
zackees merged 1 commit into
masterfrom
fix/wasm-flags-conditional-ty
Sep 23, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/wasm-flags-conditional-ty

Conversation

@zackees

@zackees zackees commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Select stdlib tomllib explicitly on Python 3.11+ and the declared tomli fallback on Python 3.10.
  • This resolves the ty unresolved-import error that currently breaks bash lint on Python 3.14.

Validation

  • bash lint passed (CPython 3.14.7)
  • git diff --check passed
  • clud-review: clean

Summary by CodeRabbit

  • Refactor
    • Improved compatibility handling for TOML parsing across supported Python versions without changing user-visible behavior.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: FastLED/FastLED/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3c52fb12-e064-4da1-bcdd-3fa0936bd582

📥 Commits

Reviewing files that changed from the base of the PR and between 399841e and dbb3ca8.

📒 Files selected for processing (1)
  • ci/wasm_flags.py

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The TOML import guard now checks sys.version_info directly. Python 3.11 and later use tomllib; earlier versions use tomli as tomllib. The selected parser remains unchanged.

Changes

TOML import guard

Layer / File(s) Summary
Version-checked TOML import
ci/wasm_flags.py
Replaces the ModuleNotFoundError handler with an explicit Python version check. The fallback remains tomli as tomllib for earlier Python versions.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to dbb3c

The parser selection is compatible with the supported Python range and introduces no actionable merge risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: fixing TOML parser selection for Python 3.14 linting.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Sep 23, 2026
@zackees
zackees merged commit 22a49fc into master Sep 23, 2026
25 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Sep 23, 2026
@zackees
zackees deleted the fix/wasm-flags-conditional-ty branch November 5, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant