Skip to content

Commit

Permalink
style: pyupgrade --py38-plus --keep-runtime-typing
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Aug 31, 2023
1 parent 3b484e7 commit 6205c9f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions coverage/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]:
Expand Down
2 changes: 1 addition & 1 deletion tests/balance_xdist_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lcov.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6205c9f

Please sign in to comment.