comparison hgext/phabricator.py @ 48946:642e31cb55f0

py3: use class X: instead of class X(object): The inheritance from object is implied in Python 3. So this should be equivalent. This change was generated via an automated search and replace. So there may have been some accidental changes. Differential Revision: https://phab.mercurial-scm.org/D12352
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 13:08:28 -0700
parents 06de08b36c82
children de9ffb82ef4d
comparison
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
666 ): 666 ):
667 output.write(chunk) 667 output.write(chunk)
668 return output.getvalue() 668 return output.getvalue()
669 669
670 670
671 class DiffChangeType(object): 671 class DiffChangeType:
672 ADD = 1 672 ADD = 1
673 CHANGE = 2 673 CHANGE = 2
674 DELETE = 3 674 DELETE = 3
675 MOVE_AWAY = 4 675 MOVE_AWAY = 4
676 COPY_AWAY = 5 676 COPY_AWAY = 5
677 MOVE_HERE = 6 677 MOVE_HERE = 6
678 COPY_HERE = 7 678 COPY_HERE = 7
679 MULTICOPY = 8 679 MULTICOPY = 8
680 680
681 681
682 class DiffFileType(object): 682 class DiffFileType:
683 TEXT = 1 683 TEXT = 1
684 IMAGE = 2 684 IMAGE = 2
685 BINARY = 3 685 BINARY = 3
686 686
687 687
698 addLines = attr.ib(default=0) # camelcase-required 698 addLines = attr.ib(default=0) # camelcase-required
699 delLines = attr.ib(default=0) # camelcase-required 699 delLines = attr.ib(default=0) # camelcase-required
700 700
701 701
702 @attr.s 702 @attr.s
703 class phabchange(object): 703 class phabchange:
704 """Represents a Differential change, owns Differential hunks and owned by a 704 """Represents a Differential change, owns Differential hunks and owned by a
705 Differential diff. Each one represents one file in a diff. 705 Differential diff. Each one represents one file in a diff.
706 """ 706 """
707 707
708 currentPath = attr.ib(default=None) # camelcase-required 708 currentPath = attr.ib(default=None) # camelcase-required
739 self.addLines += hunk.addLines 739 self.addLines += hunk.addLines
740 self.delLines += hunk.delLines 740 self.delLines += hunk.delLines
741 741
742 742
743 @attr.s 743 @attr.s
744 class phabdiff(object): 744 class phabdiff:
745 """Represents a Differential diff, owns Differential changes. Corresponds 745 """Represents a Differential diff, owns Differential changes. Corresponds
746 to a commit. 746 to a commit.
747 """ 747 """
748 748
749 # Doesn't seem to be any reason to send this (output of uname -n) 749 # Doesn't seem to be any reason to send this (output of uname -n)