Mercurial > public > mercurial-scm > hg
comparison mercurial/context.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 | 5b65721a75eb |
comparison
equal
deleted
inserted
replaced
48945:55d132525155 | 48946:642e31cb55f0 |
---|---|
49 ) | 49 ) |
50 | 50 |
51 propertycache = util.propertycache | 51 propertycache = util.propertycache |
52 | 52 |
53 | 53 |
54 class basectx(object): | 54 class basectx: |
55 """A basectx object represents the common logic for its children: | 55 """A basectx object represents the common logic for its children: |
56 changectx: read-only context that is already present in the repo, | 56 changectx: read-only context that is already present in the repo, |
57 workingctx: a context that represents the working directory and can | 57 workingctx: a context that represents the working directory and can |
58 be committed, | 58 be committed, |
59 memctx: a context that represents changes in-memory and can also | 59 memctx: a context that represents changes in-memory and can also |
794 | 794 |
795 def matches(self, match): | 795 def matches(self, match): |
796 return self.walk(match) | 796 return self.walk(match) |
797 | 797 |
798 | 798 |
799 class basefilectx(object): | 799 class basefilectx: |
800 """A filecontext object represents the common logic for its children: | 800 """A filecontext object represents the common logic for its children: |
801 filectx: read-only access to a filerevision that is already present | 801 filectx: read-only access to a filerevision that is already present |
802 in the repo, | 802 in the repo, |
803 workingfilectx: a filecontext that represents files from the working | 803 workingfilectx: a filecontext that represents files from the working |
804 directory, | 804 directory, |
3102 removed.append(f) | 3102 removed.append(f) |
3103 | 3103 |
3104 return scmutil.status(modified, added, removed, [], [], [], []) | 3104 return scmutil.status(modified, added, removed, [], [], [], []) |
3105 | 3105 |
3106 | 3106 |
3107 class arbitraryfilectx(object): | 3107 class arbitraryfilectx: |
3108 """Allows you to use filectx-like functions on a file in an arbitrary | 3108 """Allows you to use filectx-like functions on a file in an arbitrary |
3109 location on disk, possibly not in the working directory. | 3109 location on disk, possibly not in the working directory. |
3110 """ | 3110 """ |
3111 | 3111 |
3112 def __init__(self, path, repo=None): | 3112 def __init__(self, path, repo=None): |