You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,8 +187,8 @@ Note that this source is already known by the CodeQL Python analysis, but for th
187
187
Example: Adding flow through 're.compile'
188
188
----------------------------------------------
189
189
190
-
In this example, we'll show how to add flow through calls to `re.compile`.
191
-
`re.compile` returns a compiled regular expression for efficient evaluation, but the pattern to be compiled is stored in the `pattern` attribute of the resulting object.
190
+
In this example, we'll show how to add flow through calls to ``re.compile``.
191
+
``re.compile`` returns a compiled regular expression for efficient evaluation, but the pattern to be compiled is stored in the ``pattern`` attribute of the resulting object.
192
192
193
193
.. code-block:: python
194
194
@@ -217,9 +217,9 @@ Note that this flow is already recognized by the CodeQL Python analysis, but for
217
217
- Since we're adding flow through a function call, we add a tuple to the **summaryModel** extensible predicate.
218
218
- The first column, **re**, begins the search for relevant calls at places where the **re** package is imported.
219
219
- The second column, **Member[compile]**, is a path leading to the function calls we wish to model.
220
-
In this case, we select references to the **compile** function from the `re` package.
220
+
In this case, we select references to the **compile** function from the ``re`` package.
221
221
- The third column, **Argument[0,pattern:]**, indicates the input of the flow. In this case, either the first argument to the function call or the argument named **pattern**.
222
-
- The fourth column, **ReturnValue.Attribute[pattern]**, indicates the output of the flow. In this case, the `pattern` attribute of the return value of the function call.
222
+
- The fourth column, **ReturnValue.Attribute[pattern]**, indicates the output of the flow. In this case, the ``pattern`` attribute of the return value of the function call.
223
223
- The last column, **value**, indicates the kind of flow to add. The value **value** means the input value is unchanged as
224
224
it flows to the output.
225
225
@@ -399,20 +399,20 @@ The **path**, **input**, and **output** columns consist of a **.**-separated lis
399
399
400
400
The following components are supported:
401
401
402
-
- **Argument[**\ `number`\ **]** selects the argument at the given index.
403
-
- **Argument[**\ `name`:\ **]** selects the argument with the given name.
402
+
- **Argument[**\ ``number``\ **]** selects the argument at the given index.
403
+
- **Argument[**\ ``name``:\ **]** selects the argument with the given name.
404
404
- **Argument[this]** selects the receiver of a method call.
405
-
- **Parameter[**\ `number`\ **]** selects the parameter at the given index.
406
-
- **Parameter[**\ `name`:\ **]** selects the named parameter with the given name.
405
+
- **Parameter[**\ ``number``\ **]** selects the parameter at the given index.
406
+
- **Parameter[**\ ``name``:\ **]** selects the named parameter with the given name.
407
407
- **Parameter[this]** selects the **this** parameter of a function.
408
408
- **ReturnValue** selects the return value of a function or call.
409
-
- **Member[**\ `name`\ **]** selects the function/method/class/value with the given name.
409
+
- **Member[**\ ``name``\ **]** selects the function/method/class/value with the given name.
410
410
- **Instance** selects instances of a class, including instances of its subclasses.
411
-
- **Attribute[**\ `name`\ **]** selects the attribute with the given name.
411
+
- **Attribute[**\ ``name``\ **]** selects the attribute with the given name.
412
412
- **ListElement** selects an element of a list.
413
413
- **SetElement** selects an element of a set.
414
-
- **TupleElement[**\ `number`\ **]** selects the subscript at the given index.
415
-
- **DictionaryElement[**\ `name`\ **]** selects the subscript at the given name.
414
+
- **TupleElement[**\ ``number``\ **]** selects the subscript at the given index.
415
+
- **DictionaryElement[**\ ``name``\ **]** selects the subscript at the given name.
0 commit comments