comparison mercurial/verify.py @ 47366:15f6887c9c68

verify: use some intermediate variables instead of a multi-liner This is shorter and easier to read as the indentation remains the same. Differential Revision: https://phab.mercurial-scm.org/D10818
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 01 Jun 2021 09:11:54 +0200
parents f39df5545cf2
children 34a92e84267e
comparison
equal deleted inserted replaced
47365:f39df5545cf2 47366:15f6887c9c68
512 linkrev = None 512 linkrev = None
513 513
514 if problem.warning: 514 if problem.warning:
515 self._warn(problem.warning) 515 self._warn(problem.warning)
516 elif problem.error: 516 elif problem.error:
517 self._err( 517 linkrev_msg = linkrev if linkrev is not None else lr
518 linkrev if linkrev is not None else lr, 518 self._err(linkrev_msg, problem.error, f)
519 problem.error,
520 f,
521 )
522 else: 519 else:
523 raise error.ProgrammingError( 520 raise error.ProgrammingError(
524 b'problem instance does not set warning or error ' 521 b'problem instance does not set warning or error '
525 b'attribute: %s' % problem.msg 522 b'attribute: %s' % problem.msg
526 ) 523 )