Skip to content

Commit a28ddf7

Browse files
evidencebpFichteFoll
authored andcommitted
plugins\lib\fileconv\dumpers.py unnecessary-pass
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.
1 parent 4703197 commit a28ddf7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/lib/fileconv/dumpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def validate_data(self, data, *args, **kwargs):
9797
(lambda x: x is None, False))
9898
]
9999
"""
100-
pass
100+
raise NotImplementedError
101101

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

179179
def write(self, data, *args, **kwargs):
180180
"""To be implemented."""
181-
pass
181+
raise NotImplementedError
182182

183183

184184
class JSONDumper(DumperProto):

0 commit comments

Comments
 (0)