We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a21fbd8 commit 50ea551Copy full SHA for 50ea551
1 file changed
great_tables/_formats.py
@@ -143,12 +143,12 @@ def fmt(
143
144
# If a single function is supplied to `fns` then
145
# repackage that into a list as the `default` function
146
- if not isinstance(fns, Callable):
147
- raise TypeError("Input to fns= should be a callable.")
148
- elif isinstance(fns, FormatFns):
+ if isinstance(fns, FormatFns):
149
pass
+ elif isinstance(fns, Callable):
+ fns = FormatFns(default=fns)
150
else:
151
- fns: FormatFns = FormatFns(default=fns)
+ raise TypeError("Input to fns= should be a callable.")
152
153
row_res = resolve_rows_i(self, rows)
154
row_pos = [name_pos[1] for name_pos in row_res]
0 commit comments