# HG changeset patch # User Matt Harbison # Date 1721775926 14400 # Node ID a65c2dddbf5d6eeb72d5d6e1f51e7affb98fe979 # Parent 587153c96fe3627d1b23da4f6ece21bc4123899c linelog: correct the default value of `annotateresult.lines` This was flagged by pytype once it was tricked into using the standard `attr` package instead of the vendored copy. diff -r 587153c96fe3 -r a65c2dddbf5d mercurial/linelog.py --- a/mercurial/linelog.py Tue Jul 23 19:01:16 2024 -0400 +++ b/mercurial/linelog.py Tue Jul 23 19:05:26 2024 -0400 @@ -21,6 +21,11 @@ import abc import struct +import typing + +from typing import ( + List, +) from .thirdparty import attr from . import pycompat @@ -45,7 +50,7 @@ @attr.s class annotateresult: rev = attr.ib() - lines = attr.ib(type=bytearray) + lines = attr.ib(type=List[lineinfo]) _eof = attr.ib() def __iter__(self): @@ -400,7 +405,7 @@ def annotate(self, rev): pc = 1 - lines = [] + lines: List[lineinfo] = [] executed = 0 # Sanity check: if instructions executed exceeds len(program), we # hit an infinite loop in the linelog program somehow and we