SonarPython 4.23.0.17664
Release notes - SonarPython - 4.23
Bug
SONARPY-1572 Fix parse error for challenging unicode characters
SONARPY-1573 Fix parse error of unparenthesized walrus in set literals and comprehension
SONARPY-1727 S5905: Make sure the quick fix removes trailing commas
SONARPY-1792 Cannot parse a file with binary characters that is valid in the Python interpreter
SONARPY-2068 Tabulations (\t) should be handled correctly as an escape character
SONARPY-2081 Array index in hex form should be handled correctly
SONARPY-2120 Ensure coverage report sensor fails gracefully when reports can't be read
SONARPY-2196 Fix off-by-one errors in the highlighting/issue location in Jupyter Notebooks
Documentation
SONARPY-2005 S1721 : Update rule for in (...)
SONARPY-2015 Fix S5654 RSPEC broken link
SONARPY-2016 Make rule examples for S6738 and S6711 module-level
SONARPY-2195 S2068: Update title to "Hard-coded passwords are security-sensitive"
False Negative
SONARPY-2153 S6978: Fix False Negative related to resolving `torch.nn.Module`
New Feature
SONARPY-1995 Support Jupyter Delimiter in Jupyter Notebooks lexing
SONARPY-2132 Support Union types in SymbolsModuleTypeProvider#getReturnTypeFromSymbol
Sub-task
SONARPY-2168 FunctionDescriptorToPythonTypeConverter should set STUB type origin
False Positive
SONARPY-633 FP on rule S5719 when abc.abstractstaticmethod is used
SONARPY-862 S117 (LocalVariableAndParameterNameConventionCheck) shouldn't raise on type aliases
SONARPY-987 S1542 / FunctionNameCheck should not raise on unittest functions 'setUpModule' and 'tearDownModule'
SONARPY-1002 Fix FP on S2275 for nested replacement fields with format specifiers
SONARPY-1018 Fix S5727 to not raise when comparing xml ElementTree.getroot() to None
SONARPY-1531 Verify that private builtins are not serialized.
SONARPY-1711 Rule S5659: do not raise under certain use of get_unverified_header()
SONARPY-1756 FP on rule S5806 when the function name is used
SONARPY-1814 S1481: Fix detection of mutation of dict using the |= operator
SONARPY-1834 S6969 triggers when a Pipeline is used in a ColumnTransformer
SONARPY-1974 S1481: should not raise on an assignment expression occurring in a generator expression
SONARPY-2038 S4790 support usedforsecurity=False in python
SONARPY-2182 Fix FP on S5756 when calling TypedDict
SONARPY-2183 Fix FP on S5708 when the caught object has type "type"
SONARPY-2184 S125: Fix FP when analyzing databricks notebook
Task
SONARPY-1022 Change PythonCustomRuleRepository#checkClasses return type to List<Class<?>>
SONARPY-1913 Update Microsoft stubs
SONARPY-2094 Refactor Python version comparison to PythonVersionsUtils
SONARPY-2095 Update pluginApiMinVersion in pom.xml
SONARPY-2097 S6971: Fix incomplete quickfix message
SONARPY-2164 Update sonar-plugin-api to version 10.11.0.2468
SONARPY-2169 Update logback dependency to 1.5.8
SONARPY-2181 Ensure UnionType can never contain LazyType
SONARPY-2193 Update sonarlint-core.version to v10 (major)
SONARPY-2197 Update protobuf.version to v4 (major)
SONARPY-2198 Update mockito.version to v5 (major)
Improvement
SONARPY-1750 S6928 : Allow calls to python functions that have the decorator @tf.py_function
SONARPY-2084 S1451 : Improve issue message
SONARPY-2114 Migrate S5707 ExceptionCauseTypeCheck to the V2 type model
SONARPY-2115 Migrate S1244 FloatingPointEqualityCheck to the V2 type model
SONARPY-2161 Replace v2 TypeShed with TypeShedDescriptorsProvider
SONARPY-2163 Migrate S5708 CaughtExceptionsCheck to the V2 type model
SONARPY-2170 SONARPY-2170 Support detailed return types in Descriptor model