Skip to content

Commit 21a0f8a

Browse files
committed
Python: address reviewer comments
- fix wording on `builtins` - add named argument/parameter access path components
1 parent d603b48 commit 21a0f8a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ Note that this flow is already recognized by the CodeQL Python analysis, but for
251251
252252
253253
- Since we're adding flow through a function call, we add a tuple to the **summaryModel** extensible predicate.
254-
- The first column, **"builtins"**, begins the search for relevant calls at references to the **builtin** package.
255-
In Python, the built-in functions are available in the **builtins** package.
254+
- The first column, **"builtins"**, begins the search for relevant calls among references to the built-in names.
255+
In Python, many built-in functions are available. Technically, most of these are part of the **builtins** package, but they can be accessed without an explicit import. When we write **builtins** in the first column, we will find both the implicit and explicit references to the built-in functions.
256256
- The second column, **Member[sorted]**, selects references to the **sorted** function from the **builtins** package; that is, the built-in function **sorted**.
257257
- The third column, **Argument[0]**, indicates the input of the flow. In this case, the first argument to the function call.
258258
- The fourth column, **ReturnValue**, indicates the output of the flow. In this case, the return value of the function call.
@@ -400,8 +400,10 @@ The **path**, **input**, and **output** columns consist of a **.**-separated lis
400400
The following components are supported:
401401

402402
- **Argument[**\ `number`\ **]** selects the argument at the given index.
403+
- **Argument[**\ `name`:\ **]** selects the argument with the given name.
403404
- **Argument[this]** selects the receiver of a method call.
404405
- **Parameter[**\ `number`\ **]** selects the parameter at the given index.
406+
- **Parameter[**\ `name`:\ **]** selects the named parameter with the given name.
405407
- **Parameter[this]** selects the **this** parameter of a function.
406408
- **ReturnValue** selects the return value of a function or call.
407409
- **Member[**\ `name`\ **]** selects the function/method/class/value with the given name.

0 commit comments

Comments
 (0)