File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed
main/java/org/sonar/python/semantic/v2
test/java/org/sonar/python/semantic/v2 Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,6 @@ private void inferTypesAndMemberAccessSymbols(FileInput fileInput) {
88
88
89
89
private void inferTypesAndMemberAccessSymbols (FunctionDef functionDef ) {
90
90
Set <Name > parameterNames = TreeUtils .nonTupleParameters (functionDef ).stream ()
91
- // TODO SONARPY-1866: it probably doesn't make sense to restrict to annotated parameters here
92
- .filter (parameter -> parameter .typeAnnotation () != null )
93
91
.map (Parameter ::name )
94
92
.collect (Collectors .toSet ());
95
93
Set <SymbolV2 > localVariables = symbolTable .getSymbolsByRootTree (functionDef );
Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ def foo(param):
377
377
378
378
var functionDef = (FunctionDef ) root .statements ().statements ().get (0 );
379
379
var lastExpressionStatement = (ExpressionStatement ) functionDef .body ().statements ().get (functionDef .body ().statements ().size () -1 );
380
- Assertions .assertThat (lastExpressionStatement .expressions ().get (0 ).typeV2 ().unwrappedType ()).isEqualTo (PythonType . UNKNOWN );
380
+ Assertions .assertThat (lastExpressionStatement .expressions ().get (0 ).typeV2 ().unwrappedType ()).isEqualTo (STR_TYPE );
381
381
}
382
382
383
383
@ Test
You can’t perform that action at this time.
0 commit comments