From 22c658898d32e4b24c2b0fb050d04ffece9d7581 Mon Sep 17 00:00:00 2001 From: Joao Jacome Date: Mon, 17 Jul 2023 11:48:29 +0100 Subject: [PATCH] Removing unused memoize funcion (#46) * Removing unused memoize funcion --- bw_add_sshkeys.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/bw_add_sshkeys.py b/bw_add_sshkeys.py index 9a306fd..a000fd6 100755 --- a/bw_add_sshkeys.py +++ b/bw_add_sshkeys.py @@ -8,23 +8,7 @@ import json import logging import os import subprocess -from typing import Any, Callable - - -def memoize(func: Callable[..., Any]) -> Callable[..., Any]: - """ - Decorator function to cache the results of another function call - """ - cache: dict[Any, Callable[..., Any]] = {} - - def memoized_func(*args: Any) -> Any: - if args in cache: - return cache[args] - result = func(*args) - cache[args] = result - return result - - return memoized_func +from typing import Any def get_session(session: str) -> str: