File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ RST304 Unknown interpreted text role "XXX".
125125RST305 Undefined substitution referenced: "XXX".
126126RST306 Unknown target name: "XXX".
127127RST307 Error in "XXX" directive:
128+ RST308 Duplicate target name, cannot be used as a unique reference: "XXX".
128129RST399 Previously unseen major error, not yet assigned a unique code.
129130====== =======================================================================
130131
@@ -246,7 +247,9 @@ Version History
246247======= ========== ===========================================================
247248Version Released Changes
248249------- ---------- -----------------------------------------------------------
249- v0.4.0 *Pending * - Requires Python 3.9 or later.
250+ v0.4.0 *Pending * - Tested with docutils v0.22.2
251+ - Adds `RST308 ` for duplicated target names.
252+ - Requires Python 3.9 or later.
250253v0.3.1 2025-04-29 - Adds ``RST220 `` for redefined anonymous links.
251254 - Requires Python 3.8 or later (no code changes).
252255v0.3.0 2022-11-16 - Replaced ``setup.py `` with ``pyproject.toml ``.
Original file line number Diff line number Diff line change 8080 'Unknown target name: "*".' : 6 ,
8181 # e.g. Error in "code" directive:
8282 'Error in "*" directive:' : 7 ,
83+ # e.g. Duplicate target name, cannot be used as a unique reference: "python".
84+ 'Duplicate target name, cannot be used as a unique reference: "*".' : 8 ,
8385}
8486
8587# Level 4 - severe
Original file line number Diff line number Diff line change 66What happens here?
77
88 $ flake8 --select RST RST220/dup_explicit_target.py
9- RST220/dup_explicit_target.py:3:1: RST399 Duplicate target name, cannot be used as a unique reference: "python".
9+ RST220/dup_explicit_target.py:3:1: RST308 Duplicate target name, cannot be used as a unique reference: "python".
1010 RST220/dup_explicit_target.py:15:1: RST220 Duplicate explicit target name: "python".
1111
1212This file triggers an error as there are repeated conflicting definitions:
You can’t perform that action at this time.
0 commit comments