Skip to content

DiffHunk

Source code in docs_src/capo_codecommit/types/diff_hunk.py
class DiffHunk(TypedDict, closed=True):
    before_start_line: NotRequired["capo_codecommit.types.line_number.LineNumber"]
    """<p>The 1-based line number in the before blob where this hunk begins. When the hunk consists entirely of additions, <code>beforeLineCount</code> is <code>0</code>.</p>"""
    before_line_count: NotRequired["capo_codecommit.types.count.Count"]
    """<p>The number of lines from the before blob covered by this hunk, including any context lines.</p>"""
    after_start_line: NotRequired["capo_codecommit.types.line_number.LineNumber"]
    """<p>The 1-based line number in the after blob where this hunk begins. When the hunk consists entirely of deletions, <code>afterLineCount</code> is <code>0</code>.</p>"""
    after_line_count: NotRequired["capo_codecommit.types.count.Count"]
    """<p>The number of lines from the after blob covered by this hunk, including any context lines.</p>"""
    changes: NotRequired["capo_codecommit.types.diff_change_list.DiffChangeList"]
    """<p>An ordered list of line-level changes that make up this hunk. Each entry indicates whether the line is unchanged context, an addition, or a deletion.</p>"""

after_line_count instance-attribute

after_line_count: NotRequired[Count]

The number of lines from the after blob covered by this hunk, including any context lines.

after_start_line instance-attribute

after_start_line: NotRequired[LineNumber]

The 1-based line number in the after blob where this hunk begins. When the hunk consists entirely of deletions, afterLineCount is 0.

before_line_count instance-attribute

before_line_count: NotRequired[Count]

The number of lines from the before blob covered by this hunk, including any context lines.

before_start_line instance-attribute

before_start_line: NotRequired[LineNumber]

The 1-based line number in the before blob where this hunk begins. When the hunk consists entirely of additions, beforeLineCount is 0.

changes instance-attribute

changes: NotRequired[DiffChangeList]

An ordered list of line-level changes that make up this hunk. Each entry indicates whether the line is unchanged context, an addition, or a deletion.