Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle TOML parsing errors in config reader #3671

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fix TOML parsing errors in config reader

This PR fixes an issue where invalid TOML files would cause unhandled exceptions. Now, when a TOML file has parsing errors, the code will gracefully fall back to the default configuration.

Changes:

  • Add error handling for tomlkit.exceptions.TOMLKitError
  • Add tests for both valid and invalid TOML parsing cases
  • Return fallback value when TOML parsing fails

Fixes #3668

Link to Devin run: https://app.devin.ai/sessions/60a00d7d6a1c4b51b42a0acc2898c9b7
Requested by: Myles

Testing:

  • Added new test file with test cases for both valid and invalid TOML parsing
  • All tests passing, including new test cases
  • Linting and type checking pass

- Add error handling for tomlkit.exceptions.TOMLKitError
- Add tests for valid and invalid TOML parsing
- Fixes #3668

Co-Authored-By: Myles Scolnick <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

vercel bot commented Feb 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 2:14pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
marimo-storybook ⬜️ Ignored (Inspect) Visit Preview Feb 3, 2025 2:14pm

@mscolnick mscolnick merged commit 6c1791e into main Feb 3, 2025
33 of 34 checks passed
@mscolnick mscolnick deleted the devin/1738591950-fix-toml-parsing-error branch February 3, 2025 14:37
Copy link

github-actions bot commented Feb 3, 2025

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.10.20-dev19

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.

Parsing error of recent_files.toml
1 participant