Skip to content

Commit 6edf9ef

Browse files
committed
Python docs: Replace remaining references to old 'Object' API are replaced by new 'Value' API.
1 parent 8d33f31 commit 6edf9ef

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

docs/language/learn-ql/python/introduce-libraries-python.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,28 +297,28 @@ The ``SsaVariable`` class represents `static single assignment form <http://en.w
297297
Type-inference classes
298298
----------------------
299299

300-
The QL library for Python also supplies some classes for accessing the inferred types of values. The classes ``Object`` and ``ClassObject`` allow you to query the possible classes that an expression may have at runtime. For example, which ``ClassObjects`` are iterable can be determined using the query:
300+
The QL library for Python also supplies some classes for accessing the inferred types of values. The classes ``Value`` and ``ClassValue`` allow you to query the possible classes that an expression may have at runtime. For example, which ``ClassValue``\ s are iterable can be determined using the query:
301301

302-
**Find iterable ``ClassObjects``**
302+
**Find iterable ``ClassValue``\ s**
303303

304304
.. code-block:: ql
305305
306306
import python
307307
308-
from ClassObject cls
308+
from ClassValue cls
309309
where cls.hasAttribute("__iter__")
310310
select cls
311311
312-
➤ `See this in the query console <https://lgtm.com/query/688180005/>`__ This query returns a list of classes for the projects analyzed. If you want to include the results for `builtin classes <http://docs.python.org/library/stdtypes.html>`__, which do not have any Python source code, show the non-source results.
312+
➤ `See this in the query console <https://lgtm.com/query/5151030165280978402/>`__ This query returns a list of classes for the projects analyzed. If you want to include the results for `builtin classes <http://docs.python.org/library/stdtypes.html>`__, which do not have any Python source code, show the non-source results.
313313

314314
Summary
315315
~~~~~~~
316316

317-
- `Object <https://help.semmle.com/qldoc/python/semmle/python/types/Object.qll/type.Object$Object.html>`__
317+
- `Value <https://help.semmle.com/qldoc/python/semmle/python/objects/ObjectAPI.qll/type.ObjectAPI$Value.html>`__
318318

319-
- ``ClassObject``
320-
- ``FunctionObject``
321-
- ``ModuleObject``
319+
- ``ClassValue``
320+
- ``CallableValue``
321+
- ``ModuleValue``
322322

323323
These classes are explained in more detail in :doc:`Tutorial: Points-to analysis and type inference <pointsto-type-infer>`.
324324

docs/language/learn-ql/python/taint-tracking.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The sink is defined by using a custom ``TaintTracking::Sink`` class.
9696
class UnsafeSink extends TaintTracking::Sink {
9797
9898
UnsafeSink() {
99-
exists(FunctionObject unsafe |
99+
exists(FunctionValue unsafe |
100100
unsafe.getName() = "unsafe" and
101101
unsafe.getACall().(CallNode).getAnArg() = this
102102
)
@@ -172,7 +172,7 @@ Thus, our example query becomes:
172172
class UnsafeSink extends TaintTracking::Sink {
173173
174174
UnsafeSink() {
175-
exists(FunctionObject unsafe |
175+
exists(FunctionValue unsafe |
176176
unsafe.getName() = "unsafe" and
177177
unsafe.getACall().(CallNode).getAnArg() = this
178178
)
@@ -255,4 +255,4 @@ What next?
255255
----------
256256

257257
- Experiment with the worked examples in the QL for Python tutorial topics: :doc:`Control flow <control-flow>`, and :doc:`Points-to analysis and type inference <pointsto-type-infer>`.
258-
- Find out more about QL in the `QL language handbook <https://help.semmle.com/QL/ql-handbook/index.html>`__ and `QL language specification <https://help.semmle.com/QL/QLLanguageSpecification.html>`__.
258+
- Find out more about QL in the `QL language handbook <https://help.semmle.com/QL/ql-handbook/index.html>`__ and `QL language specification <https://help.semmle.com/QL/QLLanguageSpecification.html>`__.

0 commit comments

Comments
 (0)