Skip to content

Commit 169e4b1

Browse files
author
Matt Sokoloff
committed
add missing file
1 parent 94d43b2 commit 169e4b1

File tree

1 file changed

+9
-0
lines changed
  • labelbox/data/serialization/coco

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from pydantic import BaseModel
2+
from pathlib import Path
3+
4+
5+
class PathSerializerMixin(BaseModel):
6+
7+
def dict(self, *args, **kwargs):
8+
res = super().dict(*args, **kwargs)
9+
return {k: str(v) if isinstance(v, Path) else v for k, v in res.items()}

0 commit comments

Comments
 (0)