SonarPython 4.3.0.11660
Release notes - SonarPython - 4.3
Bug
SONARPY-1341 Fix broken formatting when applying quick fix for S2772
False-Positive
SONARPY-1279 S1144 (UnreadPrivateMethodsCheck) should take into account usages apart from `self`
SONARPY-1285 Fix FP on S1451 when shebang head lines are used
SONARPY-1298 Fix FP on S2245 when using random.SystemRandom
SONARPY-1300 Fix FP on S5953 when an inner class is used as type hint
SONARPY-1338 Fix FP on S5655 when the argument is a valid TypedDict
False Negative
SONARPY-1326 S1481 / UnusedLocalVariableCheck should raise with sequence unpacking
New Feature
SONARPY-1297 Rule S6437: Credentials should not be hard-coded
SONARPY-1317 S6538: Add quick fix for '__init__' return type hint
SONARPY-1320 S6538: Add quick fix for return type hints
SONARPY-1330 Rule S6556: 'locals()' should not be passed to a Django 'render()' function
SONARPY-1331 S6545: Add quick fix to replace typing module type hints with built-in types
SONARPY-1332 Rule S6560: The "safe" flag should be set to "False" when serializing non-dictionary objects in Django JSON-encoded responses
SONARPY-1333 Rule S6559: Fields of a Django ModelForm should be defined explicitly
SONARPY-1334 Rule S6554: Django models should define a "__str__" method
SONARPY-1335 Rule S6553: "null=True": should not be used on string-based fields in Django models
SONARPY-1336 Rule S6552: Django signal handler functions should have the '@receiver' decorator on top of all other decorators
Improvement
SONARPY-1327 S1481 / UnusedLocalVariable shouldn't report multiple times on the same variable
SONARPY-1328 S1481 / UnusedLocalVariable: add quick fixes for redundant exception bindings
SONARPY-1342 Improve typeshed unit test to avoid serializing typeshed
SONARPY-1344 Fix FP on S1721: Avoid raising an issue on all single element tuples
SONARPY-1346 Support type inference of unary plus and minus
SONARPY-1347 Add quick fix for S6552 (DjangoReceiverDecoratorCheck)