[diffoscope] 03/04: Raise NotImplementedError() instances over NotImplemented classes.

Chris Lamb chris at chris-lamb.co.uk
Tue Aug 9 12:32:54 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 bb4d562c537dce91fd43d645980325074d9392b5
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Aug 9 11:28:50 2016 +0100

    Raise NotImplementedError() instances over NotImplemented classes.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/comparators/binary.py |  8 ++++----
 diffoscope/comparators/utils.py  | 16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/diffoscope/comparators/binary.py b/diffoscope/comparators/binary.py
index d66205d..c6bdb5b 100644
--- a/diffoscope/comparators/binary.py
+++ b/diffoscope/comparators/binary.py
@@ -100,7 +100,7 @@ class File(object, metaclass=ABCMeta):
     @property
     @abstractmethod
     def path(self):
-        raise NotImplemented
+        raise NotImplementedError()
 
     # Remove any temporary data associated with the file. The function
     # should be idempotent and work during the destructor.
@@ -156,15 +156,15 @@ class File(object, metaclass=ABCMeta):
 
     @abstractmethod
     def is_directory():
-        raise NotImplemented
+        raise NotImplementedError()
 
     @abstractmethod
     def is_symlink():
-        raise NotImplemented
+        raise NotImplementedError()
 
     @abstractmethod
     def is_device():
-        raise NotImplemented
+        raise NotImplementedError()
 
     def compare_bytes(self, other, source=None):
         return compare_binary_files(self, other, source)
diff --git a/diffoscope/comparators/utils.py b/diffoscope/comparators/utils.py
index b6da716..e365144 100644
--- a/diffoscope/comparators/utils.py
+++ b/diffoscope/comparators/utils.py
@@ -61,7 +61,7 @@ class Command(object, metaclass=ABCMeta):
 
     @abstractmethod
     def cmdline(self):
-        raise NotImplemented
+        raise NotImplementedError()
 
     def env(self):
         return None # inherit parent environment by default
@@ -183,11 +183,11 @@ class Container(object, metaclass=ABCMeta):
 
     @abstractmethod
     def get_member_names(self):
-        raise NotImplemented
+        raise NotImplementedError()
 
     @abstractmethod
     def get_member(self, member_name):
-        raise NotImplemented
+        raise NotImplementedError()
 
     def comparisons(self, other):
         my_members = self.get_members()
@@ -276,19 +276,19 @@ class Archive(Container, metaclass=ABCMeta):
 
     @abstractmethod
     def open_archive(self):
-        raise NotImplemented
+        raise NotImplementedError()
 
     @abstractmethod
     def close_archive(self):
-        raise NotImplemented
+        raise NotImplementedError()
 
     @abstractmethod
     def get_member_names(self):
-        raise NotImplemented
+        raise NotImplementedError()
 
     @abstractmethod
     def extract(self, member_name, dest_dir):
-        raise NotImplemented
+        raise NotImplementedError()
 
     def get_member(self, member_name):
         return ArchiveMember(self, member_name)
@@ -321,7 +321,7 @@ class NonExistingArchive(Archive):
 
     def extract(self, member_name, dest_dir):
         # should never be called
-        raise NotImplemented
+        raise NotImplementedError()
 
     def get_member(self, member_name):
         return NonExistingFile('/dev/null')

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


More information about the diffoscope mailing list