beetbox / beetbox/confuse

`Configuration.dump` raises `StopIteration` if the last line is empty.

Open
#148 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
424
Forks
57
PR merge metrics
No merged PRs in 30d

Description

`yaml_util.restore_yaml_comments` has an explicit call to `next` without catching `StopIteration`, which is raised if the last processed line is empty or a comment. This seems to happen in `Configuration.dump` if the last line of `config_default.yaml` is empty or a comment.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in yaml_util.restore_yaml_comments and trace how Configuration.dump processes config_default.yaml. Reproduce the failure with a final empty or comment line, then verify that dumping such a configuration completes without StopIteration.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, yaml
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.