Mercurial > public > mercurial-scm > hg-stable
diff mercurial/scmutil.py @ 52676:f066fc0bdc7a
pyupgrade: use set literals where possible
This was rewritten by the `set_literals` fixer in `pyupgrade`. I thought there
was a past change around using set literals, but I can't find it now.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 06 Jan 2025 01:33:08 -0500 |
parents | 4cb75772818d |
children | b3e68fd7864b |
line wrap: on
line diff
--- a/mercurial/scmutil.py Mon Jan 06 01:27:42 2025 -0500 +++ b/mercurial/scmutil.py Mon Jan 06 01:33:08 2025 -0500 @@ -454,8 +454,8 @@ obs_set = obs_set - cl.filteredrevs if max_rev < (len(cl) - 1): # there might be revision to filter out - filtered_set = set(r for r in filtered_set if r <= max_rev) - obs_set = set(r for r in obs_set if r <= max_rev) + filtered_set = {r for r in filtered_set if r <= max_rev} + obs_set = {r for r in obs_set if r <= max_rev} return (filtered_set, obs_set)