From d1df047596e5385e04b14191d5559fabd512ad6c Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Wed, 12 Oct 2022 18:36:33 -0700 Subject: [PATCH] remove plain_data Generic workaround --- src/bigint_presentation_code/toom_cook.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/bigint_presentation_code/toom_cook.py b/src/bigint_presentation_code/toom_cook.py index 02ddb4b..50eb804 100644 --- a/src/bigint_presentation_code/toom_cook.py +++ b/src/bigint_presentation_code/toom_cook.py @@ -10,22 +10,16 @@ from collections import defaultdict from enum import Enum, unique from functools import lru_cache from typing import (Sequence, AbstractSet, Iterable, Mapping, - TYPE_CHECKING, Sequence, TypeVar) + TYPE_CHECKING, Sequence, TypeVar, Generic) from nmutil.plain_data import plain_data if TYPE_CHECKING: from typing_extensions import final, Self - from typing import Generic else: def final(v): return v - # make plain_data work with Generics - class Generic: - def __class_getitem__(cls, item): - return object - @plain_data(frozen=True, unsafe_hash=True) class PhysLoc(metaclass=ABCMeta): -- 2.30.2