From 0843d9f596a13aa63260e01bdcdbc72d0504ac8b Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 12 Dec 2020 14:11:40 +0000 Subject: [PATCH] hdl.ast: formatting. NFC. --- nmigen/hdl/ast.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nmigen/hdl/ast.py b/nmigen/hdl/ast.py index 5cdbf6e..b410844 100644 --- a/nmigen/hdl/ast.py +++ b/nmigen/hdl/ast.py @@ -1290,19 +1290,20 @@ class ValueCastable: Note that it is necessary to ensure that nMigen's view of representation of all values stays internally consistent. The class deriving from ``ValueCastable`` must decorate the ``as_value`` - method with the ``lowermethod`` decorator, which ensures that all calls to ``as_value``return the - same ``Value`` representation. If the class deriving from ``ValueCastable`` is mutable, it is - up to the user to ensure that it is not mutated in a way that changes its representation after - the first call to ``as_value``. + method with the ``lowermethod`` decorator, which ensures that all calls to ``as_value`` return + the same ``Value`` representation. If the class deriving from ``ValueCastable`` is mutable, + it is up to the user to ensure that it is not mutated in a way that changes its representation + after the first call to ``as_value``. """ def __new__(cls, *args, **kwargs): self = super().__new__(cls) if not hasattr(self, "as_value"): - raise TypeError(f"Class '{cls.__name__}' deriving from `ValueCastable` must override the `as_value` method") + raise TypeError(f"Class '{cls.__name__}' deriving from `ValueCastable` must override " + "the `as_value` method") if not hasattr(self.as_value, "_ValueCastable__memoized"): - raise TypeError(f"Class '{cls.__name__}' deriving from `ValueCastable` must decorate the `as_value` " - "method with the `ValueCastable.lowermethod` decorator") + raise TypeError(f"Class '{cls.__name__}' deriving from `ValueCastable` must decorate " + "the `as_value` method with the `ValueCastable.lowermethod` decorator") return self @staticmethod -- 2.30.2