Skip to content

Commit 91ea5c7

Browse files
committed
Revert "Map also empty dictionaries to file"
This reverts commit f54428f (nedbat#1347), which was a big regression in performance and file sizes when using dynamic_context, and is no longer needed for nedbat#972 as of 4cc3292 (nedbat#1538). Fixes nedbat#1586. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
1 parent 9d4ac48 commit 91ea5c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coverage/collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def mapped_file_dict(self, d: Mapping[str, T]) -> Dict[str, T]:
456456
assert isinstance(runtime_err, Exception)
457457
raise runtime_err
458458

459-
return {self.cached_mapped_file(k): v for k, v in items}
459+
return {self.cached_mapped_file(k): v for k, v in items if v}
460460

461461
def plugin_was_disabled(self, plugin: CoveragePlugin) -> None:
462462
"""Record that `plugin` was disabled during the run."""

0 commit comments

Comments
 (0)