comparison mercurial/wireprototypes.py @ 52643:5cc8deb96b48

pyupgrade: modernize calls to superclass methods This is the `legacy` fixer in `pyupgrade`, with the loop yielding the offset of `yield` statements commented out.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 05 Jan 2025 22:23:31 -0500
parents e08c878b5571
children
comparison
equal deleted inserted replaced
52642:73ab542565e0 52643:5cc8deb96b48
344 raise ValueError( 344 raise ValueError(
345 b'command entries must be commandentry instances ' 345 b'command entries must be commandentry instances '
346 b'or 2-tuples' 346 b'or 2-tuples'
347 ) 347 )
348 348
349 return super(commanddict, self).__setitem__(k, v) 349 return super().__setitem__(k, v)
350 350
351 def commandavailable(self, command, proto): 351 def commandavailable(self, command, proto):
352 """Determine if a command is available for the requested protocol.""" 352 """Determine if a command is available for the requested protocol."""
353 assert proto.name in TRANSPORTS 353 assert proto.name in TRANSPORTS
354 354