From b2d8a18cbfc9e05a20e5b1e68044e4b4d4969135 Mon Sep 17 00:00:00 2001 From: Catherine Date: Sun, 26 Nov 2023 13:57:50 +0000 Subject: [PATCH] lib.wiring: fix _gettypeattr fallback path. --- amaranth/lib/wiring.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/amaranth/lib/wiring.py b/amaranth/lib/wiring.py index 27b28f9..e9c6b45 100644 --- a/amaranth/lib/wiring.py +++ b/amaranth/lib/wiring.py @@ -499,9 +499,9 @@ def _gettypeattr(obj, attr): return cls.__dict__[attr] except KeyError: pass - # In case there is `__getattr__` on the metaclass, or just to generate an `AttributeError` with - # the standard message. - return type(obj).attr + # Call ``getattr`` In case there is ``__getattr__`` on the metaclass, or just to generate + # an ``AttributeError`` with the standard message. + return getattr(type(obj), attr) # To simplify implementation and reduce API surface area `FlippedSignature` is made final. This