Cherry-pick #863: QuiltView import Surname (fork validation) - #15
Merged
eduralph merged 1 commit intoMay 17, 2026
Merged
Conversation
`QuiltView/QuiltView.py:1266` constructs a fresh `Surname()` to
attach to a new `Name` when adding a child via the editor, but
`Surname` is never imported. Ruff (F821) flags it:
F821 Undefined name `Surname`
--> QuiltView/QuiltView.py:1266:26
The file already imports `Person, Family, ChildRef, Name` from
`gramps.gen.lib` — extend that import to include `Surname`. Without
it, the add-child path raises `NameError` instead of opening the
editor.
This PR addresses only the `Surname` F821. Two other F821 sites in
the same file (`displayer` on lines 1239/1241, where the call should
likely be `name_displayer.display(...)` rather than a top-level
`displayer` reference) are real-bug fixes and are deliberately left
out of this surgical lint PR — they need a small behavioural review
of their own.
Verified via `ruff check --select=E9,F63,F7,F82 --no-fix
--exclude='*.gpr.py' QuiltView/` (Surname F821 removed; the two
unrelated `displayer` F821s remain) and `python3 -m py_compile`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picks the one-line
Surnameimport fix from upstream PR gramps-project#863 onto the fork'smaintenance/gramps60so the testbed CI (Ralphovi/gramps-testbed) can exercise the new QuiltView E2E regression against the fixed code before upstream lands gramps-project#863.Will be naturally superseded by the next
upstream-sync.ymlrun after gramps-project#863 merges upstream.🤖 Generated with Claude Code