FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add appending to list in overrides by NoelJacob · Pull Request #774 · rendercv/rendercv · GitHub

Add appending to list in overrides - #774

Open
NoelJacob wants to merge 1 commit into
rendercv:mainfrom
NoelJacob:append-list
Open

Add appending to list in overrides#774
NoelJacob wants to merge 1 commit into
rendercv:mainfrom
NoelJacob:append-list

Conversation

Copy link
Copy Markdown

In ovverrides you cannot append to a list. This PR makes it possible. Tests also fixed. Minimal changes.

Copilot AI lite review requested due to automatic review settings August 25, 2026 17:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

This PR updates the schema override-path updater to support appending to lists when the override key targets an index equal to len(list), enabling CLI/YAML overrides to add new list items rather than only replacing existing ones.

Changes:

  • Allow list index == len(list) to mean “append” in update_value_by_location.
  • Add a property-based test to verify the new append behavior.
  • Adjust the out-of-bounds index test to reflect the new valid boundary (len(list) is now allowed).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/rendercv/schema/override_dictionary.py Updates list index validation and mutation logic to support append-at-end behavior during overrides.
tests/schema/test_override_dictionary.py Updates index bounds expectations and adds a test ensuring index-at-len appends to the list.
Suppressed comments (1)

tests/schema/test_override_dictionary.py:204

  • To validate appending works for an empty list as well as non-empty lists, consider setting min_size=0 so Hypothesis includes the empty-list case.
    @settings(deadline=None)
    @given(items=st.lists(st.text(max_size=10), min_size=1, max_size=5))
    def test_list_index_at_len_appends_to_list(self, items: list[str]) -> None:

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 194 to 196
@settings(deadline=None)
@given(items=st.lists(st.text(max_size=10), min_size=1, max_size=5))
def test_list_index_out_of_bounds_raises(self, items: list[str]) -> None:
NoelJacob force-pushed the append-list branch 2 times, most recently from 2f3ae8d to 52dacd1 Compare August 25, 2026 18:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL