File tree Expand file tree Collapse file tree
python/ql/src/experimental/dataflow/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ private class BuiltInCallNode extends CallNode {
7474 string name ;
7575
7676 BuiltInCallNode ( ) {
77- // TODO disallow instances where `setattr` may refer to an in-scope variable of that name.
77+ // TODO disallow instances where the name of the built-in may refer to an in-scope variable of that name.
7878 exists ( NameNode id | this .getFunction ( ) = id and id .getId ( ) = name and id .isGlobal ( ) ) and
7979 name = any ( Builtin b ) .getName ( )
8080 }
@@ -85,14 +85,10 @@ private class BuiltInCallNode extends CallNode {
8585
8686/**
8787 * Represents a call to the built-ins that handle dynamic inspection and modification of
88- * attributes: `getattr`, `setattr`, and `hasattr `.
88+ * attributes: `getattr`, `setattr`, `hasattr`, and `delattr `.
8989 */
9090private class BuiltinAttrCallNode extends BuiltInCallNode {
91- BuiltinAttrCallNode ( ) {
92- name = "setattr" or
93- name = "getattr" or
94- name = "hasattr"
95- }
91+ BuiltinAttrCallNode ( ) { name in [ "setattr" , "getattr" , "hasattr" , "delattr" ] }
9692
9793 /** Gets the control flow node for object on which the attribute is accessed. */
9894 ControlFlowNode getObject ( ) { result in [ this .getArg ( 0 ) , this .getArgByName ( "object" ) ] }
You can’t perform that action at this time.
0 commit comments