From 0d6449874cd4d3003ce908d66fa654b64bfea0c0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 12 Jul 2022 08:05:49 -0400 Subject: fix: 3.11.0b4 has 0-numbered lines. Fixes #1419 CPython added these lines in https://github.com/python/cpython/commit/1bfe83a114da3939c00746fc44dc5da7f56f525f --- coverage/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/parser.py') diff --git a/coverage/parser.py b/coverage/parser.py index dce4f937..7ef67d2c 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -377,7 +377,7 @@ class ByteParser: """ if hasattr(self.code, "co_lines"): for _, _, line in self.code.co_lines(): - if line is not None: + if line: yield line else: # Adapted from dis.py in the standard library. -- cgit v1.2.1