Conversation
updates: - [github.com/crate-ci/typos: v1.29.9 → v1.30.0](crate-ci/typos@v1.29.9...v1.30.0) - [github.com/astral-sh/ruff-pre-commit: v0.9.7 → v0.9.9](astral-sh/ruff-pre-commit@v0.9.7...v0.9.9)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #704 +/- ##
==========================================
+ Coverage 89.27% 89.32% +0.04%
==========================================
Files 40 40
Lines 4820 4889 +69
==========================================
+ Hits 4303 4367 +64
- Misses 517 522 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tlambert03
left a comment
There was a problem hiding this comment.
hey @ndxmrb
so sorry for the long delay. couple concerns about typing and error catching. we don't need to belabor them too much, if you can fix great, otherwise let me know.
|
@ndxmrb, I made some significant changes to this PR. The main thing that was holding me back here was the return type of create_widget (up here) ... it broke the clean pattern of having all UIFields returning a widget where you could be certain to query I know it's been so long so you might have forgotten/lost interest by now. So I'll give this a week or so before merging |
ndxmrb
left a comment
There was a problem hiding this comment.
Happy new year, @tlambert03!
although I forgot, I haven't lost interest in any of this. Creating the concrete class is indeed the missing piece. I remember I had hoped ValuedContainerWidget would be that already. I guess I bit off more than I could chew. Thanks for picking it up.
| vals = self._get_values(value) | ||
| if vals is None: | ||
| return | ||
| with self.changed.blocked(): |
There was a problem hiding this comment.
Should this be emitted once after all changes?
| yield field.parse_annotated() | ||
|
|
||
|
|
||
| def _is_dataclass_like(object: Any) -> bool: |
There was a problem hiding this comment.
| def _is_dataclass_like(object: Any) -> bool: | |
| def _is_dataclass_like(object: Any) -> bool: | |
| """Check if the object `object` is a dataclass-like object. | |
| Currently checks for pydantic1, pydantic2 and attrs models, as well as standard-lib dataclass. | |
| """ |
Hi @tlambert03,
restarting my work from #669 after the
ValuedContainerchanges.Still, some things are missing:
ValueWidgets andContainerWidgets. Does this belong totest_pydantic()intest_ui_field.py?Tried my best with the types again, hope it's okay that way.
Thanks for having a look!