Mercurial > public > mercurial-scm > hg-stable
diff tests/test-pathencode.py @ 52673:abc327f9628b
pyupgrade: replace unnecessary lambdas in `collections.defaultdict()` calls
This was rewritten by the `defaultdict_lambda` fixer in `pyupgrade`.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 06 Jan 2025 01:12:54 -0500 |
parents | 56f98406831b |
children |
line wrap: on
line diff
--- a/tests/test-pathencode.py Mon Jan 06 01:06:59 2025 -0500 +++ b/tests/test-pathencode.py Mon Jan 06 01:12:54 2025 -0500 @@ -51,7 +51,7 @@ """Construct and print a table of probabilities for path name components. The numbers are percentages.""" - counts = collections.defaultdict(lambda: 0) + counts = collections.defaultdict(int) for line in os.popen(cmd).read().splitlines(): if line[-2:] in ('.i', '.d'): line = line[:-2]