diff --git a/pysnippets/Memoisation/factorial.py b/pysnippets/Memoisation/factorial.py index 5d5a77d..774f75e 100644 --- a/pysnippets/Memoisation/factorial.py +++ b/pysnippets/Memoisation/factorial.py @@ -1,6 +1,6 @@ import logging from dataclasses import dataclass -from pysnippets.Memoisation.decorator import memoize +from decorator import memoize logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) diff --git a/pysnippets/Memoisation/fibonacci.py b/pysnippets/Memoisation/fibonacci.py index 4c57378..9461c23 100644 --- a/pysnippets/Memoisation/fibonacci.py +++ b/pysnippets/Memoisation/fibonacci.py @@ -1,6 +1,6 @@ import logging from dataclasses import dataclass -from pysnippets.Memoisation.decorator import memoize +from decorator import memoize logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) diff --git a/pysnippets/Memoisation/knapsack.py b/pysnippets/Memoisation/knapsack.py index e2bbb9f..44f5410 100644 --- a/pysnippets/Memoisation/knapsack.py +++ b/pysnippets/Memoisation/knapsack.py @@ -1,12 +1,12 @@ import logging from dataclasses import dataclass -from pysnippets.Memoisation.decorator import memoize -from typing import List, Tuple +from decorator import memoize +from typing import Tuple logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) -@dataclass +@dataclass(frozen=True) class Item: value: int weight: int