From 65718f7dbe70397eab7ab856965566f11b9322a5 Mon Sep 17 00:00:00 2001 From: Alan Lawrence Date: Wed, 12 Jun 2024 13:51:58 +0100 Subject: [PATCH] refactor!: Remove "Signature" from hugr-py (#1186) I was originally suspicious why this contained a PolyFuncType not a FunctionType, but AFAICS this isn't used, turns out that it doesn't change what goes into `specification/schema/` at all... BREAKING CHANGE: the Signature class is gone, but it's not clear how or why you might have been using it... --- 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 f19e27340..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: "PolyFuncType" # 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()