File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
python/ql/test/experimental/dataflow/TestUtil Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change
1
+ import python
1
2
import semmle.python.dataflow.new.DataFlow:: DataFlow
2
3
import semmle.python.dataflow.new.internal.DataFlowPrivate
3
4
import semmle.python.dataflow.new.internal.DataFlowImplConsistency:: Consistency
@@ -18,4 +19,20 @@ private class MyConsistencyConfiguration extends ConsistencyConfiguration {
18
19
// being a post-update node for the synthetic `**kwargs` parameter.
19
20
n instanceof SynthDictSplatParameterNode
20
21
}
22
+
23
+ override predicate uniqueParameterNodePositionExclude (
24
+ DataFlowCallable c , ParameterPosition pos , Node p
25
+ ) {
26
+ // For normal parameters that can both be passed as positional arguments or keyword
27
+ // arguments, we currently have parameter positions for both cases..
28
+ //
29
+ // TODO: Figure out how bad breaking this consistency check is
30
+ exists ( Function func , Parameter param |
31
+ c .getScope ( ) = func and
32
+ p = parameterNode ( param ) and
33
+ c .getParameter ( pos ) = p and
34
+ param = func .getArg ( _) and
35
+ param = func .getArgByName ( _)
36
+ )
37
+ }
21
38
}
You can’t perform that action at this time.
0 commit comments