DOC: Simplify some table markup - #24756
Conversation
| A path-like object which is a path to a style file. | ||
| list | ||
| A list of style specifiers (str, Path or dict) applied from first | ||
| to last in the list. |
There was a problem hiding this comment.
Should one use this for the use docstring as well?
oscargus
left a comment
There was a problem hiding this comment.
Makes sense. Only a single comment that should be quite easy to fix, but also can be postponed.
| +-----+ | ||
| | | | ||
| +-----+ | ||
| ┌─────┐ |
There was a problem hiding this comment.
I kind of like identifying the corners in some way. Are you able to change it to *---* or some other identifier to get a distinct point at the corner? Right now this is just a box in the render and somewhat hard to identify exactly what the quantity in the parentheses is referring to.
There was a problem hiding this comment.
I agree that this one and the other one is this file should as they were.
There was a problem hiding this comment.
Good point. It doesn't look like there are any characters with a diagonal and a box corner. I tried using a diagonal off the corner
(X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
╲ ╱
┌─────┐
│ │
└─────┘
╱ ╲
(X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
or an arrow pointing to it
(X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
↘ ↙
┌─────┐
│ │
└─────┘
↗ ↖
(X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
but I don't really like them. Also tried a dot:
(X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
●─────●
│ │
●─────●
(X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
There was a problem hiding this comment.
I sort of like the third one.
There was a problem hiding this comment.
I also like the circles. It could be a bit confusing with the connected bars at the top but not the vertical making me think I'm perhaps missing something, but not a major issue either.
There was a problem hiding this comment.
It's unfortunately due to the rectangular nature of the monospace characters with the circle being vertically centred, so not much can be done there.
There was a problem hiding this comment.
Unless, is there maybe a half horizontal line character so that we can stop the line early?
There was a problem hiding this comment.
Ah yes, there is such a thing:
(X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
●╶───╴●
│ │
●╶───╴●
(X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
e830dd8 to
3c9aadf
Compare
These are not so complicated that they can't use simple tables, though in one case, I thought a definition list looked better.
This also fixes some broken diagrams due to incorrect code block setup.
3c9aadf to
1ea9244
Compare
greglucas
left a comment
There was a problem hiding this comment.
Looks good like this to me!
PR Summary
Our style guide is only against
csv-table, but in these cases, there's no need to use a full grid table when a simple table works. Though in one case, I did replace with a definition list.I also replaced ASCII art "tables" with Unicode block characters. That commit also fixes some messed up display due to incorrect code blocks.
PR Checklist
Documentation and Tests
pytestpasses)Release Notes
.. versionadded::directive in the docstring and documented indoc/users/next_whats_new/.. versionchanged::directive in the docstring and documented indoc/api/next_api_changes/next_whats_new/README.rstornext_api_changes/README.rst