Skip to content

Commit f7c3aa3

Browse files
committed
RST305 test case
1 parent b3df111 commit f7c3aa3

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

tests/RST305/subsitution.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Print 'Hello world' to the terminal.
2+
3+
Here's where the |foo| substitution is used - it is defined
4+
below.
5+
6+
.. |foo| replace:: Here's where it's defined.
7+
8+
So far so good, but what if the definition is not in the same
9+
docstring fragment - it could be in an included footer?
10+
11+
Here the |bar| substituion definition is missing, so this
12+
docstring in isolation should fail validation::
13+
14+
$ flake8 --select RST RST305/substitution.py
15+
RST305/subsitution.py:12:1: RST305 Undefined substitution referenced: "bar"
16+
17+
"""
18+
19+
print("Hello world")

0 commit comments

Comments
 (0)