comparison mercurial/cmdutil.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 f254fc73d956
children c80544aa4971
comparison
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
664 return recordfunc(ui, repo, message, match, opts) 664 return recordfunc(ui, repo, message, match, opts)
665 665
666 return commit(ui, repo, recordinwlock, pats, opts) 666 return commit(ui, repo, recordinwlock, pats, opts)
667 667
668 668
669 class dirnode(object): 669 class dirnode:
670 """ 670 """
671 Represent a directory in user working copy with information required for 671 Represent a directory in user working copy with information required for
672 the purpose of tersing its status. 672 the purpose of tersing its status.
673 673
674 path is the path to the directory, without a trailing '/' 674 path is the path to the directory, without a trailing '/'
830 commentedlines = [b'# %s' % line for line in lines] 830 commentedlines = [b'# %s' % line for line in lines]
831 return b'\n'.join(commentedlines) + b'\n' 831 return b'\n'.join(commentedlines) + b'\n'
832 832
833 833
834 @attr.s(frozen=True) 834 @attr.s(frozen=True)
835 class morestatus(object): 835 class morestatus:
836 reporoot = attr.ib() 836 reporoot = attr.ib()
837 unfinishedop = attr.ib() 837 unfinishedop = attr.ib()
838 unfinishedmsg = attr.ib() 838 unfinishedmsg = attr.ib()
839 activemerge = attr.ib() 839 activemerge = attr.ib()
840 unresolvedpaths = attr.ib() 840 unresolvedpaths = attr.ib()
1341 def isstdiofilename(pat): 1341 def isstdiofilename(pat):
1342 """True if the given pat looks like a filename denoting stdin/stdout""" 1342 """True if the given pat looks like a filename denoting stdin/stdout"""
1343 return not pat or pat == b'-' 1343 return not pat or pat == b'-'
1344 1344
1345 1345
1346 class _unclosablefile(object): 1346 class _unclosablefile:
1347 def __init__(self, fp): 1347 def __init__(self, fp):
1348 self._fp = fp 1348 self._fp = fp
1349 1349
1350 def close(self): 1350 def close(self):
1351 pass 1351 pass