Commit dcc99a1
QuiltView: import Surname for child-add path (#15)
`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>1 parent 02cf1ef commit dcc99a1
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments