Skip to content

SonarPython 4.8.0.12420

Compare
Choose a tag to compare
@jdodinh jdodinh released this 25 Sep 09:52
· 659 commits to master since this release
0c49937

Release notes - SonarPython - 4.8

New Feature

SONARPY-1443 Rule S6725: Equality checks should not be made against "numpy.nan"

SONARPY-1445 Rule S6709: Results that depend on random number generation should be reproducible

SONARPY-1446 Rule S6711: numpy.random.Generator should be preferred to numpy.random.RandomState

SONARPY-1447 Rule S6727: The abs_tol parameter should be provided when using math.isclose to compare values to 0

SONARPY-1448 Rule S6730: Deprecated NumPy aliases of built-in types should not be used

SONARPY-1449 Rule S1244: Floating point numbers should not be tested for equality

SONARPY-1462 Rule S6725: Add quick fix for equality checks against "np.nan"

False Negative

SONARPY-750 S1192 (StringLiteralDuplicationCheck) shouldn't exclude capitalized strings

SONARPY-1364 S2638 Argument number check should correctly detect tzname number of parameters

SONARPY-1368 Fix FNs on S5655 for calls to len

SONARPY-1370 S5655: Fix FN on math.acos calls

SONARPY-1375 Fix FN: S2638 should report on ambiguous symbols when no definition contract is respected

SONARPY-1452 S930: Fix FN on math.acos calls

Improvement

SONARPY-1348 Support type inference in presence of augmented assignments

SONARPY-1363 S2638 ChangeMethodContract: Should properly state the missing parameter name and not null.

SONARPY-1386 Avoid running Typeshed serializer tests when mvn has -DskipTests argument

SONARPY-1389 Fix parse error when an unpacking expression is used as subscript

SONARPY-1393 S6540: Avoid raising issues on args and kwargs

SONARPY-1436 Rule S6729: np.nonzero should be preferred over np.where when only the condition parameter is set.

SONARPY-1437 Rule S6714: Passing a list to np.array should be preferred over passing a generator.

SONARPY-1463 Rule S6725: Fix issue message to be imperative

SONARPY-1467 Rule S6729: Add quick fix to turn np.where into np.nonzero

SONARPY-1470 ReachingDefinitionAnalysis should work with annotated assignments