Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
dist/
**/__pycache__
credentials
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ build:
poetry build

publish:
poetry publish --build
poetry publish --build --username __token__ --password $(<credentials/pypi-token)


5 changes: 3 additions & 2 deletions latch_data_validation/data_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def explain(self, indent: str = ""):

pretty_msg = prettify(
self.msg,
add_colon=True
add_colon=True,
# add_colon=len(self.children) > 0 or len(self.details) > 0
)
res = f"{indent}{pretty_msg}\n"
Expand Down Expand Up @@ -405,6 +405,7 @@ def validate(x: JsonValue, cls: type[T]) -> T:
"code.namespace": validate.__module__,
},
) as s:
s.set_attribute("validation.target", cls.__qualname__)
# ayush: union types dont have a `__qualname__` attr
s.set_attribute("validation.target", getattr(cls, "__qualname__", repr(cls)))

return untraced_validate(x, cls)