Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/state.py @ 49037: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 | 6000f5b25c9b |
children | 8ced4ca30ea1 |
comparison
equal
deleted
inserted
replaced
49036:55d132525155 | 49037:642e31cb55f0 |
---|---|
37 | 37 |
38 for t in (Any, Dict): | 38 for t in (Any, Dict): |
39 assert t | 39 assert t |
40 | 40 |
41 | 41 |
42 class cmdstate(object): | 42 class cmdstate: |
43 """a wrapper class to store the state of commands like `rebase`, `graft`, | 43 """a wrapper class to store the state of commands like `rebase`, `graft`, |
44 `histedit`, `shelve` etc. Extensions can also use this to write state files. | 44 `histedit`, `shelve` etc. Extensions can also use this to write state files. |
45 | 45 |
46 All the data for the state is stored in the form of key-value pairs in a | 46 All the data for the state is stored in the form of key-value pairs in a |
47 dictionary. | 47 dictionary. |
100 def exists(self): | 100 def exists(self): |
101 """check whether the state file exists or not""" | 101 """check whether the state file exists or not""" |
102 return self._repo.vfs.exists(self.fname) | 102 return self._repo.vfs.exists(self.fname) |
103 | 103 |
104 | 104 |
105 class _statecheck(object): | 105 class _statecheck: |
106 """a utility class that deals with multistep operations like graft, | 106 """a utility class that deals with multistep operations like graft, |
107 histedit, bisect, update etc and check whether such commands | 107 histedit, bisect, update etc and check whether such commands |
108 are in an unfinished conditition or not and return appropriate message | 108 are in an unfinished conditition or not and return appropriate message |
109 and hint. | 109 and hint. |
110 It also has the ability to register and determine the states of any new | 110 It also has the ability to register and determine the states of any new |