From 91fcade97db67357ee838951a7fadb887a0735a8 Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Sat, 7 Mar 2026 21:14:57 -0800 Subject: [PATCH] ci(M01): stub UPPER_CASE attrs as dict for ATTENTION_MODES etc Made-with: Cursor --- scripts/dev/create_stub_repos.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/dev/create_stub_repos.py b/scripts/dev/create_stub_repos.py index 4e228969b..cabb883a1 100644 --- a/scripts/dev/create_stub_repos.py +++ b/scripts/dev/create_stub_repos.py @@ -26,13 +26,17 @@ import importlib.abc import importlib.machinery def _make_stub_class(name): - """Stub class; any attr access returns no-op (for forward, etc.).""" + """Stub class; forward->noop, UPPER_CASE->{}, else->noop.""" _noop = lambda *a, **k: None class _Meta(type): def __getattribute__(cls, attr): try: return type.__getattribute__(cls, attr) except AttributeError: + if attr.isupper() or (attr and attr[0].isupper() and "_" in attr): + d = {} + object.__setattr__(cls, attr, d) # cache for future access + return d return _noop return _Meta(name, (), {"forward": _noop})