Improve type annotation (#1029)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Callable
|
||||
|
||||
|
||||
class BasePrefixCache(ABC):
|
||||
@@ -25,7 +26,7 @@ class BasePrefixCache(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def evict(self, num_tokens, evict_callback):
|
||||
def evict(self, num_tokens: int, evict_callback: Callable):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
@@ -41,7 +42,7 @@ class BasePrefixCache(ABC):
|
||||
pass
|
||||
|
||||
def total_size(self):
|
||||
raise NotImplementedError
|
||||
raise NotImplementedError()
|
||||
|
||||
def pretty_print(self):
|
||||
raise NotImplementedError
|
||||
raise NotImplementedError()
|
||||
|
||||
Reference in New Issue
Block a user