-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Lines 254 to 276 in 534a9d4
| def load(self, f): | |
| """ | |
| Load data from a file. | |
| :param f: file-like object or path to file | |
| :type f: file or str | |
| """ | |
| with open_file_obj(f) as f: | |
| parser = self.parse_file(f) | |
| self.deserialize(parser) | |
| def loads(self, s): | |
| """ | |
| Load data from a string. | |
| :param s: input data | |
| :type s: str | |
| """ | |
| io = six.StringIO() | |
| io.write(s) | |
| io.seek(0) | |
| self.load(io) | |
| self.validate() |
Why does MetadataBase.loads() call self.validate() but MetadataBase.load() does not?
I would kind of expect self.validate() to be called from MetadataBase.load() so that it would be inherited by MetadataBase.loads()`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels