utils: checkstyle.py: Derive Amendment from Commit
The Amendment commit class is derived from the StagedChanges class (which in turn derives from the Commit base class), however there is no code sharing between Amendment and StagedChanges other than the call to initalise through the base Commit class. Refactor the inheritance to make an Amendment derive directly from Commit. Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
37106ba02a
commit
e2f0ad27b1
1 changed files with 2 additions and 2 deletions
|
@ -269,9 +269,9 @@ class StagedChanges(Commit):
|
|||
return parse_diff(diff.splitlines(True))
|
||||
|
||||
|
||||
class Amendment(StagedChanges):
|
||||
class Amendment(Commit):
|
||||
def __init__(self):
|
||||
StagedChanges.__init__(self)
|
||||
Commit.__init__(self, '')
|
||||
|
||||
def _parse(self):
|
||||
# Create a title using HEAD commit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue