|
90 | 90 | <li><a href="https://github.com/jugmac00/python-version-cheat-sheet#python-37">Guaranteed dict sort order</a></li> |
91 | 91 | <li><a href="https://github.com/jugmac00/python-version-cheat-sheet#python-37"><pre>breakpoint()</pre></a></li> |
92 | 92 | <li><a href="https://github.com/jugmac00/python-version-cheat-sheet#python-37">Data classes</a></li> |
93 | | - <li><a href="https://docs.python.org/3/whatsnew/3.7.html">And more!</a></li> |
| 93 | + <li><a href="https://docs.python.org/3/whatsnew/$template_next_version.html">And more!</a></li> |
94 | 94 | """ # noqa: E501 |
95 | 95 | }, |
96 | 96 | "3.7": { |
97 | 97 | "reasons": """ |
98 | 98 | <li><a href="https://github.com/jugmac00/python-version-cheat-sheet#python-38"><strike>Walrus operator</strike></a></li> |
99 | | - <li><a href="https://docs.python.org/3/whatsnew/3.8.html">And more!</a></li> |
| 99 | + <li><a href="https://docs.python.org/3/whatsnew/$template_next_version.html">And more!</a></li> |
100 | 100 | """ # noqa: E501 |
101 | 101 | }, |
102 | 102 | "3.8": { |
103 | 103 | "reasons": """ |
104 | 104 | <li><a href="https://github.com/jugmac00/python-version-cheat-sheet#python-39">use <code>list</code> and <code>dict</code> for type annotations</a></li> |
105 | | - <li><a href="https://docs.python.org/3/whatsnew/3.9.html">And more!</a></li> |
| 105 | + <li><a href="https://docs.python.org/3/whatsnew/$template_next_version.html">And more!</a></li> |
106 | 106 | """ # noqa: E501 |
107 | 107 | }, |
108 | 108 | "3.9": { |
109 | 109 | "reasons": """ |
110 | 110 | <li><a href="https://github.com/jugmac00/python-version-cheat-sheet#python-310">use <code>match</code> statement and write union types as <code>X | Y</code></a></li> |
111 | | - <li><a href="https://docs.python.org/3/whatsnew/3.10.html">And more!</a></li> |
| 111 | + <li><a href="https://docs.python.org/3/whatsnew/$template_next_version.html">And more!</a></li> |
112 | 112 | """ # noqa: E501 |
113 | 113 | }, |
114 | 114 | "3.10": { |
115 | 115 | "reasons": """ |
116 | 116 | <li><a href="https://github.com/jugmac00/python-version-cheat-sheet#python-311"><code>tomllib</code> in the stdlib, exception groups and except*</a></li> |
117 | | - <li><a href="https://docs.python.org/3/whatsnew/3.11.html">And more!</a></li> |
| 117 | + <li><a href="https://docs.python.org/3/whatsnew/$template_next_version.html">And more!</a></li> |
118 | 118 | """ # noqa: E501 |
119 | 119 | }, |
120 | 120 | } |
@@ -187,12 +187,14 @@ def main() -> None: |
187 | 187 | "template_minor": minor, |
188 | 188 | "template_next_minor": next_minor, |
189 | 189 | "template_next_version": next_version, |
190 | | - "template_reasons": substitutions.get("reasons", REASONS), |
191 | 190 | "template_remove_examples": substitutions.get("remove", ""), |
192 | 191 | "template_new_features": substitutions.get("new_features", ""), |
193 | 192 | } |
194 | 193 |
|
195 | | - # Do the substitution |
| 194 | + # Do the substitutions |
| 195 | + d["template_reasons"] = Template( |
| 196 | + substitutions.get("reasons", REASONS) |
| 197 | + ).safe_substitute(d) |
196 | 198 | result = src.safe_substitute(d) |
197 | 199 |
|
198 | 200 | # EOL in the future? |
|
0 commit comments