-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test case for RST302 Malformed table.
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"""Example with some RST tables. | ||
This file should fail RST validation: | ||
$ flake8 --select RST RST302/table.py | ||
RST302/table.py:18:1: RST302 Malformed table. | ||
RST302/table.py:36:1: RST302 Malformed table. | ||
See below. | ||
""" # noqa: E510 | ||
|
||
|
||
def simple_table(data): | ||
"""Print a simple RST table. | ||
Sample output: | ||
== ==== | ||
ID Name | ||
-- ---- | ||
01 Paul | ||
02 Peter | ||
-- ---- | ||
As you should spot, the table lines are too short | ||
for valid RST. | ||
""" | ||
pass | ||
|
||
|
||
def grid_table(data): | ||
"""Print an RST grid table. | ||
Sample output: | ||
+--+----+ | ||
|ID|Name| | ||
+==+====+ | ||
|01|Paul| | ||
|02|Peter| | ||
+--+----+ | ||
Again, not quite right. | ||
""" | ||
pass |