Skip to content

Commit 758b6bd

Browse files
yoffRasmusWL
andauthored
Update python/ql/src/semmle/python/functions/ModificationOfParameterWithDefaultCustomizations.qll
Co-authored-by: Rasmus Wriedt Larsen <[email protected]>
1 parent 2eb1173 commit 758b6bd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

python/ql/src/semmle/python/functions/ModificationOfParameterWithDefaultCustomizations.qll

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,17 @@ module ModificationOfParameterWithDefault {
141141
private import semmle.python.essa.SsaCompute
142142

143143
/**
144-
* Simple detection of truthy and falsey values.
144+
* A data-flow node that is known to be either truthy or falsey.
145145
*
146146
* It handles the cases `if x` and `if not x`.
147+
*
148+
* For example, in the following code, `this` will be the `x` that is printed,
149+
* which we will know is truthy:
150+
*
151+
* ```py
152+
* if x:
153+
* print(x)
154+
* ```
147155
*/
148156
private class MustBe extends DataFlow::Node {
149157
DataFlow::GuardNode guard;

0 commit comments

Comments
 (0)