From f757cae26f30dd10525f7c6c0f1513dad47b20b0 Mon Sep 17 00:00:00 2001 From: Alan Lawrence Date: Wed, 12 Jun 2024 11:11:23 +0100 Subject: [PATCH 1/2] hugr-py: Signature contains FunctionType not PolyFuncType --- hugr-py/src/hugr/serialization/tys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugr-py/src/hugr/serialization/tys.py b/hugr-py/src/hugr/serialization/tys.py index f19e27340..c54394f7a 100644 --- a/hugr-py/src/hugr/serialization/tys.py +++ b/hugr-py/src/hugr/serialization/tys.py @@ -364,7 +364,7 @@ class Signature(ConfiguredBaseModel): (value) of a call (constant). """ - signature: "PolyFuncType" # The underlying signature + signature: "FunctionType" # The underlying signature # The extensions which are associated with all the inputs and carried through input_extensions: ExtensionSet From 15cc3ecdb1fe837427d382fe3b22b38dea0f03e7 Mon Sep 17 00:00:00 2001 From: Alan Lawrence Date: Wed, 12 Jun 2024 11:12:14 +0100 Subject: [PATCH 2/2] Remove Signature --- hugr-py/src/hugr/serialization/tys.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/hugr-py/src/hugr/serialization/tys.py b/hugr-py/src/hugr/serialization/tys.py index c54394f7a..dfbf5fab9 100644 --- a/hugr-py/src/hugr/serialization/tys.py +++ b/hugr-py/src/hugr/serialization/tys.py @@ -352,24 +352,6 @@ class Type(RootModel): TypeRow = list[Type] -# ------------------------------------------- -# --------------- Signature ----------------- -# ------------------------------------------- - - -class Signature(ConfiguredBaseModel): - """Describes the edges required to/from a node. - - This includes both the concept of "signature" in the spec, and also the target - (value) of a call (constant). - """ - - signature: "FunctionType" # The underlying signature - - # The extensions which are associated with all the inputs and carried through - input_extensions: ExtensionSet - - # Now that all classes are defined, we need to update the ForwardRefs in all type # annotations. We use some inspect magic to find all classes defined in this file # and call model_rebuild()