@@ -1290,19 +1290,20 @@ class ValueCastable:
1290
1290
1291
1291
Note that it is necessary to ensure that nMigen's view of representation of all values stays
1292
1292
internally consistent. The class deriving from ``ValueCastable`` must decorate the ``as_value``
1293
- method with the ``lowermethod`` decorator, which ensures that all calls to ``as_value``return the
1294
- same ``Value`` representation. If the class deriving from ``ValueCastable`` is mutable, it is
1295
- up to the user to ensure that it is not mutated in a way that changes its representation after
1296
- the first call to ``as_value``.
1293
+ method with the ``lowermethod`` decorator, which ensures that all calls to ``as_value`` return
1294
+ the same ``Value`` representation. If the class deriving from ``ValueCastable`` is mutable,
1295
+ it is up to the user to ensure that it is not mutated in a way that changes its representation
1296
+ after the first call to ``as_value``.
1297
1297
"""
1298
1298
def __new__ (cls , * args , ** kwargs ):
1299
1299
self = super ().__new__ (cls )
1300
1300
if not hasattr (self , "as_value" ):
1301
- raise TypeError (f"Class '{ cls .__name__ } ' deriving from `ValueCastable` must override the `as_value` method" )
1301
+ raise TypeError (f"Class '{ cls .__name__ } ' deriving from `ValueCastable` must override "
1302
+ "the `as_value` method" )
1302
1303
1303
1304
if not hasattr (self .as_value , "_ValueCastable__memoized" ):
1304
- raise TypeError (f"Class '{ cls .__name__ } ' deriving from `ValueCastable` must decorate the `as_value` "
1305
- "method with the `ValueCastable.lowermethod` decorator" )
1305
+ raise TypeError (f"Class '{ cls .__name__ } ' deriving from `ValueCastable` must decorate "
1306
+ "the `as_value` method with the `ValueCastable.lowermethod` decorator" )
1306
1307
return self
1307
1308
1308
1309
@staticmethod
0 commit comments