Repository navigation
Allow to specify CSS classes for Table.pformat - #4131
Conversation
|
@taldcroft just in case you have some time to take a look a this, it could be useful for the jsviewer in notebook feature (though I'm not sure I will have the time to finalize this quick enough). |
There was a problem hiding this comment.
Can you move the new tableclass=None to the end? I know it makes more sense here, but in theory someone could be calling pformat with all positional arguments and so this will be an API break.
|
@saimn - sorry, things have been hectic and this fell off the radar. This generally looks good, and thanks for the docstring fixes. One request is to generally try to avoid pure-formatting changes (which don't change the code at all) so that all the diffs are are related the new functionality. I know it's annoying if they show up red in your editor, but it makes reviewing easier. Then one can go with a separate PR to do PEP8 or other formatting improvements. This just needs a changelog entry and could be good for merge. Not sure if it will be in time for 1.1 but we'll see. |
|
@taldcroft no problem, I saw there is a lot of PRs to review this week ! I have added the changelog entry.
Ah yeah sorry, I can't help myself doing this, as you said it makes less noise in my editor which is also useful because a static checker sometimes helps to find non-initialized variables or other issues (typos in variable names typically). But I will try to avoid doing this or at least put the style changes in a separate commit. |
|
OK, just a couple of minor non-code fixes. You can do these and |
|
@taldcroft done. |
Allow to specify CSS classes for Table.pformat
|
@taldcroft If you want you can just cherry pick it and push directly to the branch; no big deal. |
Currently it is possible to specify an ID when formatting a Table to HTML, this PR add a way to specify CSS classes which is more flexible and useful when integrating tables in an HTML page.
I have also updated several docstring in the pprint module. BTW the
outdict stuff in the Table.pprint module is pretty weird: for instanceshow_lengthis not passed to_pformat_colbut it is check in the out dict just after which seems quite useless.