From: Jacob Lifshay Date: Thu, 13 Oct 2022 01:36:33 +0000 (-0700) Subject: remove plain_data Generic workaround X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1df047596e5385e04b14191d5559fabd512ad6c;p=bigint-presentation-code.git remove plain_data Generic workaround --- 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):