Skip to content

Commit 7a7db0e

Browse files
Update unsupported format character documentaion, fix outdated reference link
1 parent df5f768 commit 7a7db0e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

python/ql/src/Expressions/UnsupportedFormatCharacter.qhelp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,27 @@
33
"qhelp.dtd">
44
<qhelp>
55
<overview>
6-
<p>A format string, that is the string on the left hand side of an expression like <code>fmt % arguments</code>, must consist of legal conversion specifiers.
6+
<p>A printf-style format string (i.e. a string that is used as the left hand side of the <code>%</code> operator, such as <code>fmt % arguments</code>)
7+
must consist of valid conversion specifiers, such as <code>%s</code>, <code>%d</code>, etc.
78
Otherwise, a <code>ValueError</code> will be raised.
89

910
</p>
1011

1112
</overview>
1213
<recommendation>
13-
<p>Choose a legal conversion specifier.</p>
14+
<p>Ensure a valid conversion specifier is used.</p>
1415

1516
</recommendation>
1617
<example>
17-
<p>In <code>format_as_tuple_incorrect</code>, "t" is not a legal conversion specifier.
18+
<p>In the following example, <code>format_as_tuple_incorrect</code>, <code>%t</code> is not a valid conversion specifier.
1819

1920
</p>
2021
<sample src="UnsupportedFormatCharacter.py" />
2122

2223
</example>
2324
<references>
2425

25-
<li>Python Library Reference: <a href="http://docs.python.org/library/stdtypes.html#string-formatting">String Formatting.</a> </li>
26+
<li>Python Library Reference: <a href="https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting">printf-style String Formatting.</a> </li>
2627

2728
</references>
2829
</qhelp>

0 commit comments

Comments
 (0)