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