ProjectNeura / LEADS

Enable your racing car with powerful, data-driven instrumentation, control, and analysis systems, all wrapped up in a gorgeous look.
https://leads.projectneura.org
Apache License 2.0
257 stars 54 forks source link

`None` Objects are Passed to the Constructor of `VariableControlled` #279

Closed ATATC closed 4 months ago

ATATC commented 4 months ago

The signature of the constructor of VariableControlled:

def __init__(self, variable: _Variable) -> None:

is not well obeyed. In Base64Photo,

def __init__(self,
             master: _Misc,
             theme_key: str = "CTkLabel",
             width: float = 0,
             height: float = 0,
             variable: _StringVar | None = None,
             fg_color: _Color | None = None,
             hover_color: _Color | None = None,
             bg_color: _Color | None = None,
             corner_radius: float | None = None,
             clickable: bool = False,
             command: _Callable[[_Event], None] = lambda _: None) -> None:
    CanvasBased.__init__(self, master, theme_key, width, height, fg_color, hover_color, bg_color, corner_radius,
                                           clickable, command)
    VariableControlled.__init__(self, variable)
    self.attach(self.partially_render)
    self._image: _PhotoImage | None = None