@@ -147,9 +147,7 @@ class Value extends TObject {
147147 * Class representing modules in the Python program
148148 * Each `ModuleValue` represents a module object in the Python program.
149149 */
150- class ModuleValue extends Value {
151- ModuleValue ( ) { this instanceof ModuleObjectInternal }
152-
150+ class ModuleValue extends Value instanceof ModuleObjectInternal {
153151 /**
154152 * Holds if this module "exports" name.
155153 * That is, does it define `name` in `__all__` or is
@@ -159,7 +157,7 @@ class ModuleValue extends Value {
159157 predicate exports ( string name ) { PointsTo:: moduleExports ( this , name ) }
160158
161159 /** Gets the scope for this module, provided that it is a Python module. */
162- ModuleScope getScope ( ) { result = this . ( ModuleObjectInternal ) .getSourceModule ( ) }
160+ ModuleScope getScope ( ) { result = super .getSourceModule ( ) }
163161
164162 /**
165163 * Gets the container path for this module. Will be the file for a Python module,
@@ -181,7 +179,7 @@ class ModuleValue extends Value {
181179 predicate isPackage ( ) { this instanceof PackageObjectInternal }
182180
183181 /** Whether the complete set of names "exported" by this module can be accurately determined */
184- predicate hasCompleteExportInfo ( ) { this . ( ModuleObjectInternal ) .hasCompleteExportInfo ( ) }
182+ predicate hasCompleteExportInfo ( ) { super .hasCompleteExportInfo ( ) }
185183
186184 /** Get a module that this module imports */
187185 ModuleValue getAnImportedModule ( ) { result .importedAs ( this .getScope ( ) .getAnImportedModuleName ( ) ) }
@@ -452,23 +450,21 @@ class CallableValue extends Value {
452450 * Class representing bound-methods, such as `o.func`, where `o` is an instance
453451 * of a class that has a callable attribute `func`.
454452 */
455- class BoundMethodValue extends CallableValue {
456- BoundMethodValue ( ) { this instanceof BoundMethodObjectInternal }
457-
453+ class BoundMethodValue extends CallableValue instanceof BoundMethodObjectInternal {
458454 /**
459455 * Gets the callable that will be used when `this` is called.
460456 * The actual callable for `func` in `o.func`.
461457 */
462- CallableValue getFunction ( ) { result = this . ( BoundMethodObjectInternal ) .getFunction ( ) }
458+ CallableValue getFunction ( ) { result = super .getFunction ( ) }
463459
464460 /**
465461 * Gets the value that will be used for the `self` parameter when `this` is called.
466462 * The value for `o` in `o.func`.
467463 */
468- Value getSelf ( ) { result = this . ( BoundMethodObjectInternal ) .getSelf ( ) }
464+ Value getSelf ( ) { result = super .getSelf ( ) }
469465
470466 /** Gets the parameter node that will be used for `self`. */
471- NameNode getSelfParameter ( ) { result = this . ( BoundMethodObjectInternal ) .getSelfParameter ( ) }
467+ NameNode getSelfParameter ( ) { result = super .getSelfParameter ( ) }
472468}
473469
474470/**
@@ -831,12 +827,10 @@ class BuiltinMethodValue extends FunctionValue {
831827/**
832828 * A class representing sequence objects with a length and tracked items.
833829 */
834- class SequenceValue extends Value {
835- SequenceValue ( ) { this instanceof SequenceObjectInternal }
830+ class SequenceValue extends Value instanceof SequenceObjectInternal {
831+ Value getItem ( int n ) { result = super . getItem ( n ) }
836832
837- Value getItem ( int n ) { result = this .( SequenceObjectInternal ) .getItem ( n ) }
838-
839- int length ( ) { result = this .( SequenceObjectInternal ) .length ( ) }
833+ int length ( ) { result = super .length ( ) }
840834}
841835
842836/** A class representing tuple objects */
@@ -887,14 +881,12 @@ class NumericValue extends Value {
887881 * https://docs.python.org/3/howto/descriptor.html#properties
888882 * https://docs.python.org/3/library/functions.html#property
889883 */
890- class PropertyValue extends Value {
891- PropertyValue ( ) { this instanceof PropertyInternal }
892-
893- CallableValue getGetter ( ) { result = this .( PropertyInternal ) .getGetter ( ) }
884+ class PropertyValue extends Value instanceof PropertyInternal {
885+ CallableValue getGetter ( ) { result = super .getGetter ( ) }
894886
895- CallableValue getSetter ( ) { result = this . ( PropertyInternal ) .getSetter ( ) }
887+ CallableValue getSetter ( ) { result = super .getSetter ( ) }
896888
897- CallableValue getDeleter ( ) { result = this . ( PropertyInternal ) .getDeleter ( ) }
889+ CallableValue getDeleter ( ) { result = super .getDeleter ( ) }
898890}
899891
900892/** A method-resolution-order sequence of classes */
0 commit comments