From fd045e16d432ef959afc4344a483b10bab9241e9 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Thu, 12 Jan 2023 23:06:12 -0800 Subject: [PATCH] various fixes --- masque/library.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/masque/library.py b/masque/library.py index 2943a50..3222d48 100644 --- a/masque/library.py +++ b/masque/library.py @@ -11,6 +11,7 @@ import struct import re from pprint import pformat from collections import defaultdict +from abc import ABCMeta, abstractmethod import numpy from numpy.typing import ArrayLike, NDArray, NDArray @@ -29,6 +30,7 @@ logger = logging.getLogger(__name__) visitor_function_t = Callable[['Pattern', Tuple['Pattern'], Dict, NDArray[numpy.float64]], 'Pattern'] L = TypeVar('L', bound='Library') +ML = TypeVar('ML', bound='MutableLibrary') LL = TypeVar('LL', bound='LazyLibrary') @@ -268,11 +270,11 @@ class MutableLibrary(Library, metaclass=ABCMeta): pass @abstractmethod - def _copy(self: ML, other: ML, key: str) -> None: + def _merge(self: ML, other: ML, key: str) -> None: pass def add( - self: WL, + self: ML, other: L, use_ours: Callable[[str], bool] = lambda name: False, use_theirs: Callable[[str], bool] = lambda name: False,