Skip to content

Commit

Permalink
plugins\lib\fileconv\dumpers.py unnecessary-pass
Browse files Browse the repository at this point in the history
The methods validate_data and write of DumperProto should be overridden by subclasses (as discussed with FichteFoll).
Instead of leaving with just pass changed to raise NotImplementedError to verify that they are not mistakenly used.
  • Loading branch information
evidencebp authored and FichteFoll committed Nov 24, 2024
1 parent 4703197 commit a28ddf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/lib/fileconv/dumpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def validate_data(self, data, *args, **kwargs):
(lambda x: x is None, False))
]
"""
pass
raise NotImplementedError

def _validate_data(self, data, funcs):
"""Check for incompatible data recursively.
Expand Down Expand Up @@ -178,7 +178,7 @@ def dump(self, data, *args, **kwargs):

def write(self, data, *args, **kwargs):
"""To be implemented."""
pass
raise NotImplementedError


class JSONDumper(DumperProto):
Expand Down

0 comments on commit a28ddf7

Please sign in to comment.