Skip to content

Commit

Permalink
SONARPY-2360 Add unit test case on S5655 when compared types has deco…
Browse files Browse the repository at this point in the history
…rators (#2173)
  • Loading branch information
maksim-grebeniuk-sonarsource authored Nov 21, 2024
1 parent a142a48 commit 677e9a8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions python-checks/src/test/resources/checks/argumentType.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,14 @@ class EnumA(Enum):
C = 3

len(EnumA)

import dataclasses
@dataclasses.dataclass
class DecoratedDataClass:
x : int

def decorated_dataclass_expected(data: DecoratedDataClass): ...
data = dataclasses.replace(DecoratedDataClass(42))

# FP SONARPY-2359
decorated_dataclass_expected(data) # Noncompliant

0 comments on commit 677e9a8

Please sign in to comment.