Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
diffoscope
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reproducible Builds
diffoscope
Commits
bb4d562c
Commit
bb4d562c
authored
8 years ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
Raise NotImplementedError() instances over NotImplemented classes.
Signed-off-by:
Chris Lamb
<
lamby@debian.org
>
parent
d2b859b9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
diffoscope/comparators/binary.py
+4
-4
4 additions, 4 deletions
diffoscope/comparators/binary.py
diffoscope/comparators/utils.py
+8
-8
8 additions, 8 deletions
diffoscope/comparators/utils.py
with
12 additions
and
12 deletions
diffoscope/comparators/binary.py
+
4
−
4
View file @
bb4d562c
...
...
@@ -100,7 +100,7 @@ class File(object, metaclass=ABCMeta):
@property
@abstractmethod
def
path
(
self
):
raise
NotImplemented
raise
NotImplemented
Error
()
# 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
NotImplemented
Error
()
@abstractmethod
def
is_symlink
():
raise
NotImplemented
raise
NotImplemented
Error
()
@abstractmethod
def
is_device
():
raise
NotImplemented
raise
NotImplemented
Error
()
def
compare_bytes
(
self
,
other
,
source
=
None
):
return
compare_binary_files
(
self
,
other
,
source
)
...
...
This diff is collapsed.
Click to expand it.
diffoscope/comparators/utils.py
+
8
−
8
View file @
bb4d562c
...
...
@@ -61,7 +61,7 @@ class Command(object, metaclass=ABCMeta):
@abstractmethod
def
cmdline
(
self
):
raise
NotImplemented
raise
NotImplemented
Error
()
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
NotImplemented
Error
()
@abstractmethod
def
get_member
(
self
,
member_name
):
raise
NotImplemented
raise
NotImplemented
Error
()
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
NotImplemented
Error
()
@abstractmethod
def
close_archive
(
self
):
raise
NotImplemented
raise
NotImplemented
Error
()
@abstractmethod
def
get_member_names
(
self
):
raise
NotImplemented
raise
NotImplemented
Error
()
@abstractmethod
def
extract
(
self
,
member_name
,
dest_dir
):
raise
NotImplemented
raise
NotImplemented
Error
()
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
NotImplemented
Error
()
def
get_member
(
self
,
member_name
):
return
NonExistingFile
(
'
/dev/null
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment