style: pyupgrade --py38-plus --keep-runtime-typing · nedbat/coveragepy@6205c9f (original) (raw)

3 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -521,10 +521,10 @@ def post_process(self) -> None:
521 521 self.data_file = self.post_process_file(self.data_file)
522 522 self.html_dir = self.post_process_file(self.html_dir)
523 523 self.xml_output = self.post_process_file(self.xml_output)
524 -self.paths = dict(
525 -(k, [self.post_process_file(f) for f in v])
524 +self.paths = {
525 +k: [self.post_process_file(f) for f in v]
526 526 for k, v in self.paths.items()
527 -)
527 +}
528 528 self.exclude_list += self.exclude_also
529 529
530 530 def debug_info(self) -> List[Tuple[str, Any]]:
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ def pytest_xdist_make_scheduler(self, config, log):
117 117 clumped = set()
118 118 clumps = config.getini("balanced_clumps")
119 119 for i, clump_word in enumerate(clumps):
120 -clump_nodes = set(nodeid for nodeid in self.times.keys() if clump_word in nodeid)
120 +clump_nodes = {nodeid for nodeid in self.times.keys() if clump_word in nodeid}
121 121 i %= nchunks
122 122 tests[i].update(clump_nodes)
123 123 totals[i] += sum(self.times[nodeid] for nodeid in clump_nodes)
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ def test_volume(self):
44 44
45 45 def get_lcov_report_content(self, filename: str = "coverage.lcov") -> str:
46 46 """Return the content of an LCOV report."""
47 -with open(filename, "r") as file:
47 +with open(filename) as file:
48 48 return file.read()
49 49
50 50 def test_lone_file(self) -> None: