Mercurial > public > mercurial-scm > hg
comparison mercurial/wireprototypes.py @ 44452:9d2b2df2c2ba
cleanup: run pyupgrade on our source tree to clean up varying things
Built with:
hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/**' | xargs pyupgrade --keep-percent-format --keep-extraneous-parens
and then blackened. pyupgrade comes from
https://github.com/asottile/pyupgrade with a patch to let me preserve
extraneous parens (which we use for marking strings that shouldn't be
translated), and lets us clean up a bunch of idioms that have cruftily
accumulated over the years.
# skip-blame no-op automated code cleanups
Differential Revision: https://phab.mercurial-scm.org/D8255
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 06 Mar 2020 13:27:41 -0500 |
parents | f5fcf7123a92 |
children | 89a2afe31e82 |
comparison
equal
deleted
inserted
replaced
44449:ff72bd52d56a | 44452:9d2b2df2c2ba |
---|---|
381 | 381 |
382 # If compression engines are listed in the config, assume there is a good | 382 # If compression engines are listed in the config, assume there is a good |
383 # reason for it (like server operators wanting to achieve specific | 383 # reason for it (like server operators wanting to achieve specific |
384 # performance characteristics). So fail fast if the config references | 384 # performance characteristics). So fail fast if the config references |
385 # unusable compression engines. | 385 # unusable compression engines. |
386 validnames = set(e.name() for e in compengines) | 386 validnames = {e.name() for e in compengines} |
387 invalidnames = set(e for e in configengines if e not in validnames) | 387 invalidnames = {e for e in configengines if e not in validnames} |
388 if invalidnames: | 388 if invalidnames: |
389 raise error.Abort( | 389 raise error.Abort( |
390 _(b'invalid compression engine defined in %s: %s') | 390 _(b'invalid compression engine defined in %s: %s') |
391 % (config, b', '.join(sorted(invalidnames))) | 391 % (config, b', '.join(sorted(invalidnames))) |
392 ) | 392 ) |