[diffoscope] 01/03: Don't name first argument of Difference.from_command "cls" as it's not a classmethod.

Chris Lamb chris at chris-lamb.co.uk
Tue Aug 9 15:26:58 CEST 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit 0e06973d56518fe56887e9c46498b5dab1180fd9
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Aug 9 14:18:44 2016 +0100

    Don't name first argument of Difference.from_command "cls" as it's not a classmethod.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/difference.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/diffoscope/difference.py b/diffoscope/difference.py
index 6a39e1f..fed9381 100644
--- a/diffoscope/difference.py
+++ b/diffoscope/difference.py
@@ -328,7 +328,7 @@ class Difference(object):
                                       *args, **kwargs)
 
     @staticmethod
-    def from_command(cls, path1, path2, *args, **kwargs):
+    def from_command(klass, path1, path2, *args, **kwargs):
         command_args = []
         if 'command_args' in kwargs:
             command_args = kwargs['command_args']
@@ -337,13 +337,13 @@ class Difference(object):
         if path1 == '/dev/null':
             feeder1 = empty_file_feeder()
         else:
-            command1 = cls(path1, *command_args)
+            command1 = klass(path1, *command_args)
             feeder1 = make_feeder_from_command(command1)
         command2 = None
         if path2 == '/dev/null':
             feeder2 = empty_file_feeder()
         else:
-            command2 = cls(path2, *command_args)
+            command2 = klass(path2, *command_args)
             feeder2 = make_feeder_from_command(command2)
         if 'source' not in kwargs:
             source_cmd = command1 or command2

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list