Closed AghilesAzzoug closed 9 months ago
Rule EC7 (AvoidGettersAndSetters) detects __init__ methods with one argument and assignment as a setter.
__init__
To Reproduce Code that can reproduce the error:
class Something: def __init__(self, value): self.value = value ...
Expected behavior It shouldn't be detected as a code smell since init method is used to assign values to object properties.
init
Software Versions
Hi @AghilesAzzoug ,
thank you for your issue. you agree it's a bug. the correction is done in related PR. I'm waiting for core team reviewer.
Rule EC7 (AvoidGettersAndSetters) detects
__init__
methods with one argument and assignment as a setter.To Reproduce Code that can reproduce the error:
Expected behavior It shouldn't be detected as a code smell since
init
method is used to assign values to object properties.Software Versions