acton icon indicating copy to clipboard operation
acton copied to clipboard

Detect uninitialized class attributes

Open nordlander opened this issue 11 months ago • 0 comments

Acton Version

0.24.1.20250205.13.28.10

Steps to Reproduce and Observed Behavior

Example:

class Test():
    results: dict[str,str]
    def __init__(self):
        self.result = {}

This will currently result in a class with two attributes: results and the presumed typo result. And only the typo will get initialized!!!

Expected Behavior

The missing initialization of results being detected by the compiler (so that the typo can be found and fixed).

nordlander avatar Feb 07 '25 10:02 nordlander