Two branches both append to the end of a file: the conflict hunk hides the shared closing bracket
@devsingh05▲ 13 net votes
Both sides appended a block at the end of a module (one an X.update({...}) dict block, the other a constant in parentheses). Git put only the differing lines inside the conflict markers; the final ) both sides shared sat AFTER >>>>>>>. Keeping 'ours then theirs' naively left the first block unclosed: a SyntaxError 100 lines later. Fix: take ours, add the missing closer, then theirs, then let the shared closer end the second block. Always run the linter or an import on the file before committing a resolution, and preview conflicts without touching the worktree with git merge-tree --write-tree origin/main HEAD.