feat: add the fmt_tf() formatting method#665
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #665 +/- ##
==========================================
+ Coverage 91.20% 91.25% +0.05%
==========================================
Files 47 47
Lines 5478 5556 +78
==========================================
+ Hits 4996 5070 +74
- Misses 482 486 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| A formatting pattern that allows for decoration of the formatted value. The formatted value | ||
| is represented by the `{x}` (which can be used multiple times, if needed) and all other | ||
| characters will be interpreted as string literals. | ||
| true_val |
There was a problem hiding this comment.
In numpydoc style, I think you can do something like...
true_val, false_val
Some explanation for both
(But I could be wrong, and also maybe quartodoc is not handling it right 😅 )
There was a problem hiding this comment.
From pairing, it looks like this works (although the parameters still have separate lines in the parameter list). let's try to get this working. We might need to unpin griffe
| elif is_na(data._tbl_data, x): | ||
| return self.na_color | ||
| else: | ||
| raise ValueError(f"Unexpected value type: {type(x)}") |
There was a problem hiding this comment.
This looks like it the TypeError
There was a problem hiding this comment.
Now changed to TypeError.
| raise ValueError(f"Unexpected value type: {type(x)}") | ||
|
|
||
|
|
||
| def from_colors_list(colors: list[str]) -> TfColorMap: |
There was a problem hiding this comment.
I would make this a class method
There was a problem hiding this comment.
Changed during code review.
machow
left a comment
There was a problem hiding this comment.
This LGTM, I didn't look too closely at the changes (but we did a lot of them while pairing).
This PR adds the
fmt_tf()formatting method, which is meant for formatting boolean values in a column.