| 1 | import json |
| 2 | |
| 3 | from elpy.jedibackend import JEDISUP18 |
| 4 | if JEDISUP18: |
| 5 | import pathlib |
| 6 | |
| 7 | |
| 8 | class JSONEncoder(json.JSONEncoder): |
| 9 | def default(self, o): |
| 10 | if JEDISUP18: |
| 11 | if isinstance(o, pathlib.Path): |
| 12 | return str(o) |
| 13 | return super().default(o) |