Skip to content

Commit e44247b

Browse files
committed
Python: Add links to function docs
1 parent 8e7e107 commit e44247b

File tree

1 file changed

+17
-7
lines changed
  • python/ql/src/experimental/semmle/python/frameworks

1 file changed

+17
-7
lines changed

python/ql/src/experimental/semmle/python/frameworks/Django.qll

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,13 @@ private module Django {
264264
exists(DataFlow::TypeTracker t2 | result = classRawSQL(t2).track(t2, t))
265265
}
266266

267-
/** Gets a reference to the `django.db.models.expressions.RawSQL` class. */
267+
/**
268+
* Gets a reference to the `django.db.models.expressions.RawSQL` class.
269+
*
270+
* See
271+
* - https://docs.djangoproject.com/en/3.1/topics/db/sql/#executing-custom-sql-directly
272+
* - https://docs.djangoproject.com/en/3.1/topics/db/sql/#connections-and-cursors
273+
*/
268274
DataFlow::Node classRawSQL() { result = classRawSQL(DataFlow::TypeTracker::end()) }
269275
}
270276
}
@@ -281,7 +287,11 @@ private module Django {
281287
}
282288
}
283289

284-
/** A call to the `annotate` function on a model using a `RawSQL` argument. */
290+
/**
291+
* A call to the `annotate` function on a model using a `RawSQL` argument.
292+
*
293+
* See https://docs.djangoproject.com/en/3.1/ref/models/querysets/#annotate
294+
*/
285295
private class ObjectsAnnotate extends SqlExecution::Range, DataFlow::CfgNode {
286296
override CallNode node;
287297
CallNode raw;
@@ -295,10 +305,10 @@ private module Django {
295305
override DataFlow::Node getSql() { result.asCfgNode() = raw.getArg(0) }
296306
}
297307

298-
/**
299-
* A call to the `raw` function on a model.
308+
/**
309+
* A call to the `raw` function on a model.
300310
*
301-
* See
311+
* See
302312
* - https://docs.djangoproject.com/en/3.1/topics/db/sql/#django.db.models.Manager.raw
303313
* - https://docs.djangoproject.com/en/3.1/ref/models/querysets/#raw
304314
*/
@@ -310,8 +320,8 @@ private module Django {
310320
override DataFlow::Node getSql() { result.asCfgNode() = node.getArg(0) }
311321
}
312322

313-
/**
314-
* A call to the `extra` function on a model.
323+
/**
324+
* A call to the `extra` function on a model.
315325
*
316326
* See https://docs.djangoproject.com/en/3.1/ref/models/querysets/#extra
317327
*/

0 commit comments

Comments
 (0)