diff --git a/coverage/config.py b/coverage/config.py index 0b0cab30c..7c7dbe19f 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -521,10 +521,10 @@ def post_process(self) -> None: self.data_file = self.post_process_file(self.data_file) self.html_dir = self.post_process_file(self.html_dir) self.xml_output = self.post_process_file(self.xml_output) - self.paths = dict( - (k, [self.post_process_file(f) for f in v]) + self.paths = { + k: [self.post_process_file(f) for f in v] for k, v in self.paths.items() - ) + } self.exclude_list += self.exclude_also def debug_info(self) -> List[Tuple[str, Any]]: diff --git a/tests/balance_xdist_plugin.py b/tests/balance_xdist_plugin.py index aec7dc21c..17dd9c9e2 100644 --- a/tests/balance_xdist_plugin.py +++ b/tests/balance_xdist_plugin.py @@ -117,7 +117,7 @@ def pytest_xdist_make_scheduler(self, config, log): clumped = set() clumps = config.getini("balanced_clumps") for i, clump_word in enumerate(clumps): - clump_nodes = set(nodeid for nodeid in self.times.keys() if clump_word in nodeid) + clump_nodes = {nodeid for nodeid in self.times.keys() if clump_word in nodeid} i %= nchunks tests[i].update(clump_nodes) totals[i] += sum(self.times[nodeid] for nodeid in clump_nodes) diff --git a/tests/test_lcov.py b/tests/test_lcov.py index a3332081e..9d9ea8502 100644 --- a/tests/test_lcov.py +++ b/tests/test_lcov.py @@ -44,7 +44,7 @@ def test_volume(self): def get_lcov_report_content(self, filename: str = "coverage.lcov") -> str: """Return the content of an LCOV report.""" - with open(filename, "r") as file: + with open(filename) as file: return file.read() def test_lone_file(self) -> None: