docs/reference: document compat guarantee, importing, shapes.

This commit also contains a related semantic change: it adds `Shape`
and `ShapeCastable` to the `__all__` list in `amaranth.hdl`. This is
consistent with the policy that is laid out in the new documentation,
which permits such additions without notice.

Co-authored-by: mcclure <mcclure@users.noreply.github.com>
This commit is contained in:
Catherine 2024-01-30 01:44:07 +00:00
parent c9b87a4fc5
commit ea3d6c9557
6 changed files with 325 additions and 79 deletions

View file

@ -167,8 +167,8 @@ class MockShapeCastable(ShapeCastable):
class ShapeCastableTestCase(FHDLTestCase):
def test_no_override(self):
with self.assertRaisesRegex(TypeError,
r"^Class 'MockShapeCastableNoOverride' deriving from `ShapeCastable` must "
r"override the `as_shape` method$"):
r"^Class 'MockShapeCastableNoOverride' deriving from 'ShapeCastable' must "
r"override the 'as_shape' method$"):
class MockShapeCastableNoOverride(ShapeCastable):
def __init__(self):
pass