From d98179d96c1cb2e994ac0b22208948cbf8ef666c Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 14 Aug 2024 22:50:55 -0700 Subject: [PATCH] add TODO for slots --- selfdrive/car/structs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/car/structs.py b/selfdrive/car/structs.py index dce60e99b2..c4d7f90c05 100644 --- a/selfdrive/car/structs.py +++ b/selfdrive/car/structs.py @@ -27,6 +27,7 @@ def auto_dataclass(cls=None, /, **kwargs): else: raise TypeError(f"Unsupported type for auto_field: {origin_typ}") + # TODO: use slots, this prevents accidentally setting attributes that don't exist return _dataclass(cls, **kwargs)