diff options
author | Andrej Shadura <andrew@shadura.me> | 2022-03-05 12:13:51 +0100 |
---|---|---|
committer | Andrej Shadura <andrew@shadura.me> | 2022-03-06 15:24:32 +0100 |
commit | d5a3c8884aaa934f7a7dc783e4776e1ce40eec20 (patch) | |
tree | 7f819835cd0d060da3c3457899da76bf827fb159 /git_crecord | |
parent | 889ccb64f2ba2bd5e7fd8429846927cc035ff267 (diff) |
Drop useless inheritance from object
Diffstat (limited to 'git_crecord')
-rw-r--r-- | git_crecord/chunk_selector.py | 4 | ||||
-rw-r--r-- | git_crecord/crpatch.py | 6 | ||||
-rw-r--r-- | git_crecord/gitrepo.py | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/git_crecord/chunk_selector.py b/git_crecord/chunk_selector.py index 3f8266d..b150e92 100644 --- a/git_crecord/chunk_selector.py +++ b/git_crecord/chunk_selector.py @@ -67,7 +67,7 @@ def chunkselector(opts, headerlist, ui): import locale locale.setlocale(locale.LC_ALL, '') - class dummystdscr(object): + class dummystdscr: def clear(self): pass def refresh(self): @@ -94,7 +94,7 @@ _confirmmessages = { 'cunstage': _('Are you sure you want to unstage the unselected changes [Yn]?'), } -class CursesChunkSelector(object): +class CursesChunkSelector: def __init__(self, headerlist, ui): # put the headers into a patch object self.headerlist = patch(headerlist) diff --git a/git_crecord/crpatch.py b/git_crecord/crpatch.py index c63d2c5..cd53ff4 100644 --- a/git_crecord/crpatch.py +++ b/git_crecord/crpatch.py @@ -11,7 +11,7 @@ class PatchError(Exception): lines_re = re.compile(r'@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@\s*(.*)') -class linereader(object): +class linereader: # simple class to allow pushing lines back into the input stream def __init__(self, fp): self.fp = fp @@ -112,7 +112,7 @@ def scanpatch(fp): else: raise PatchError('unknown patch content: %r' % line) -class patchnode(object): +class patchnode: """Abstract Class for Patch Graph Nodes (i.e. PatchRoot, header, hunk, HunkLine) """ @@ -636,7 +636,7 @@ def parsepatch(fp): +9 """ - class parser(object): + class parser: """patch parsing state machine""" def __init__(self): self.fromline = 0 diff --git a/git_crecord/gitrepo.py b/git_crecord/gitrepo.py index 7b64326..c5f1843 100644 --- a/git_crecord/gitrepo.py +++ b/git_crecord/gitrepo.py @@ -4,7 +4,7 @@ from . import util INDEX_FILENAME = "index" -class GitTree(object): +class GitTree: def __init__(self, tree): self._tree = tree @@ -15,7 +15,7 @@ class GitTree(object): util.system(['git', 'read-tree', '--reset', self._tree], onerr=RuntimeError) -class GitIndex(object): +class GitIndex: def __init__(self, filename): self._filename = filename self.indextree = None @@ -36,7 +36,7 @@ class GitIndex(object): raise util.Abort('failed to read the index: %s' % inst) return self.indextree -class GitRepo(object): +class GitRepo: def __init__(self, path): try: self.path = util.systemcall(['git', 'rev-parse', '--show-toplevel'], |