From 655c8fdd079ca8bccfe2adb7587d4278439986dd Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 7 Oct 2025 11:44:41 +0200 Subject: [PATCH 1/2] Fix comments: co_lnotab to co_lines --- coverage/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coverage/parser.py b/coverage/parser.py index 2d255d943..a04b0ecb8 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -449,7 +449,7 @@ def child_parsers(self) -> Iterable[ByteParser]: def _line_numbers(self) -> Iterable[TLineNo]: """Yield the line numbers possible in this code object. - Uses co_lnotab described in Python/compile.c to find the + Uses co_lines described in Python/compile.c to find the line numbers. Produces a sequence: l0, l1, ... """ for _, _, line in self.code.co_lines(): From 4ec186a86feeed5b59c815886e5bd31147f9c1e1 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 7 Oct 2025 08:58:04 -0400 Subject: [PATCH 2/2] Update coverage/parser.py --- coverage/parser.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/coverage/parser.py b/coverage/parser.py index a04b0ecb8..401dfc217 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -449,8 +449,7 @@ def child_parsers(self) -> Iterable[ByteParser]: def _line_numbers(self) -> Iterable[TLineNo]: """Yield the line numbers possible in this code object. - Uses co_lines described in Python/compile.c to find the - line numbers. Produces a sequence: l0, l1, ... + Uses co_lines() to produce a sequence: l0, l1, ... """ for _, _, line in self.code.co_lines(): if line: