Skip to content

Commit

Permalink
Revert "Map also empty dictionaries to file"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
andersk committed May 23, 2023
1 parent 9d4ac48 commit 91ea5c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coverage/collector.py
Expand Up @@ -456,7 +456,7 @@ def mapped_file_dict(self, d: Mapping[str, T]) -> Dict[str, T]:
assert isinstance(runtime_err, Exception)
raise runtime_err

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

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

0 comments on commit 91ea5c7

Please sign in to comment.