Commit 977ef524 authored by Ben Gamari's avatar Ben Gamari 🐢

gdb: Fix utils

parent d19b689e
import gdb
from typeable import TypeVar, Callable
from typing import TypeVar, Callable
class CommandWithArgs(gdb.Command):
def __init__(self):
......@@ -34,9 +34,9 @@ def get_num_generations():
A = TypeVar('A')
def memoized(f: Callable[A]) -> Callable[A]:
def memoized(f: Callable[[], A]) -> Callable[[], A]:
""" a decorator to memoize a nullary function """
f._cache = None
f._cache = None # type: ignore
def g():
if f._cache is None:
f._cache = f()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment