Skip to content

Commit 135a671

Browse files
committed
Python, doc: References to section on API graphs.
1 parent 7e9cf03 commit 135a671

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/codeql/codeql-language-guides/analyzing-data-flow-in-python.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ Python has builtin functionality for reading and writing files, such as the func
9999
100100
➤ `See this in the query console on LGTM.com <https://lgtm.com/query/8635258505893505141/>`__. Two of the demo projects make use of this low-level API.
101101

102+
Notice the use of the ``API`` module for referring to library functions. It is further described in ":doc:`Using API graphs in Python <using-api-graphs-in-python>`."
103+
102104
Unfortunately this will only give the expression in the argument, not the values which could be passed to it. So we use local data flow to find all expressions that flow into the argument:
103105

104106
.. code-block:: ql

docs/codeql/codeql-language-guides/codeql-for-python.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
2121

2222
- :doc:`Analyzing data flow in Python <analyzing-data-flow-in-python>`: You can use CodeQL to track the flow of data through a Python program to places where the data is used.
2323

24+
- :doc:`Using API graphs in Python <using-api-graphs-in-python>`: API graphs are a uniform interface for referring to functions, classes, and methods defined in external libraries.
25+
2426
- :doc:`Functions in Python <functions-in-python>`: You can use syntactic classes from the standard CodeQL library to find Python functions and identify calls to them.
2527

2628
- :doc:`Expressions and statements in Python <expressions-and-statements-in-python>`: You can use syntactic classes from the CodeQL library to explore how Python expressions and statements are used in a codebase.

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ The CodeQL library for Python incorporates a large number of classes. Each class
2323
- **Data flow** - classes that represent entities from the data flow graphs.
2424
- **API graphs** - classes that represent entities from the API graphs.
2525

26-
The first two categories are described below. See ":doc:`Analyzing data flow in Python <analyzing-data-flow-in-python>`" for a description of data flow and associated classes.
27-
28-
..
29-
and [TO COME IN FUTURE PR] for a description of API graphs and their use.
26+
The first two categories are described below. See ":doc:`Analyzing data flow in Python <analyzing-data-flow-in-python>`" for a description of data flow and associated classes and ":doc:`Using API graphs in Python <using-api-graphs-in-python>`" for a description of API graphs and their use.
3027

3128
Syntactic classes
3229
-----------------

0 commit comments

Comments
 (0)