Skip to content

feat: allow empty external models file#5061

Merged
benfdking merged 1 commit intomainfrom
fix_empty_external_model
Jul 29, 2025
Merged

feat: allow empty external models file#5061
benfdking merged 1 commit intomainfrom
fix_empty_external_model

Conversation

@benfdking
Copy link
Contributor

  • before you would get an error saying None is non-iterable
  • was just slightly confusing when you first create the file
    in vscode and we show a confusing error

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an error that occurs when external models files are empty, allowing users to create empty YAML files without encountering a confusing "None is non-iterable" error. This improves the user experience when initially setting up external models in VS Code.

  • Adds handling for empty YAML files by checking if the parsed content is None
  • Returns an empty list instead of attempting to iterate over None
  • Refactors the YAML loading to avoid reading the file twice

@benfdking benfdking force-pushed the fix_empty_external_model branch from c3103b1 to b94a40e Compare July 29, 2025 20:16
@benfdking benfdking enabled auto-merge (squash) July 29, 2025 20:16
- before you would get an error saying None is non-iterable
- was just slightly confusing when you first create the file
in vscode and we show a confusing error
@benfdking benfdking force-pushed the fix_empty_external_model branch from b94a40e to 465e052 Compare July 29, 2025 23:10
@benfdking benfdking disabled auto-merge July 29, 2025 23:16
@benfdking benfdking enabled auto-merge (squash) July 29, 2025 23:16
@benfdking benfdking merged commit 036b75e into main Jul 29, 2025
26 of 27 checks passed
@benfdking benfdking deleted the fix_empty_external_model branch July 29, 2025 23:26
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.

3 participants