Mercurial > evolve
view .hgignore @ 5917:94aed9c7ce69 stable
next: refactor two if blocks into an if-elif block
We already checked the value of `needevolve and opts['evolve']` in the first if
block above. In the first one it need to be True, in the second it needs to be
False for the statements to execute. Since not(a or b) = not a and not b, we
can join the second if block to the first one with an elif while dropping the
explicit check.
For me, this works better, because we're doing the same thing in both of these
blocks (checking if working copy is dirty or not).
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 15 May 2021 20:40:19 +0800 |
parents | aad37ffd7d58 |
children | ba316ce15040 |
line wrap: on
line source
syntax: re /figures/[^/]+\.png$ ^html/ \.pyc$ ~$ \.swp$ \.orig$ \.rej$ ^tests/.*\.err$ ^tests/easy_run.sh$ ^build/ ^dist/ ^MANIFEST$ ^docs/tutorials/.*\.rst$ \.ico$ tests/\.testtimes ^docs/training/graphs/ ^docs/training/html/ ^docs/training/index.html ^docs/training/graphviz-images/ ^docs/training/img/ ^docs/training/output/ ^docs/training/pandocfilters/