(self, o)
| 231 | |
| 232 | class MyEncoder(json.JSONEncoder): |
| 233 | def default(self, o): |
| 234 | if isinstance(o, type): |
| 235 | return {'$class': o.__module__ + "." + o.__name__} |
| 236 | elif isinstance(o, Enum): |
| 237 | return { |
| 238 | '$enum': o.__module__ + "." + o.__class__.__name__ + '.' + o.name |
| 239 | } |
| 240 | elif callable(o): |
| 241 | return { |
| 242 | '$function': o.__module__ + "." + o.__name__ |
| 243 | } |
| 244 | return json.JSONEncoder.default(self, o) |
| 245 | |
| 246 | |
| 247 | def mkdir_p(path): |
nothing calls this directly
no outgoing calls
no test coverage detected