Skip to content

Commit b4e377c

Browse files
Pouyanpitgasser-nv
authored andcommitted
style(cache): replace pass with ellipsis in abstract methods (#1455)
Updates abstract method implementations in CacheInterface to use ellipsis (...) instead of pass, following modern Python conventions for abstract method stubs.
1 parent 89f1bbc commit b4e377c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

nemoguardrails/llm/cache/interface.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def get(self, key: Any, default: Any = None) -> Any:
4444
Returns:
4545
The value associated with the key, or default if not found.
4646
"""
47-
pass
47+
...
4848

4949
@abstractmethod
5050
def put(self, key: Any, value: Any) -> None:
@@ -58,7 +58,7 @@ def put(self, key: Any, value: Any) -> None:
5858
key: The key to store.
5959
value: The value to associate with the key.
6060
"""
61-
pass
61+
...
6262

6363
@abstractmethod
6464
def size(self) -> int:
@@ -68,7 +68,7 @@ def size(self) -> int:
6868
Returns:
6969
The number of items currently stored in the cache.
7070
"""
71-
pass
71+
...
7272

7373
@abstractmethod
7474
def is_empty(self) -> bool:
@@ -78,7 +78,7 @@ def is_empty(self) -> bool:
7878
Returns:
7979
True if the cache contains no items, False otherwise.
8080
"""
81-
pass
81+
...
8282

8383
@abstractmethod
8484
def clear(self) -> None:
@@ -87,7 +87,7 @@ def clear(self) -> None:
8787
8888
After calling this method, the cache should be empty.
8989
"""
90-
pass
90+
...
9191

9292
def contains(self, key: Any) -> bool:
9393
"""
@@ -115,7 +115,7 @@ def maxsize(self) -> int:
115115
Returns:
116116
The maximum number of items the cache can hold.
117117
"""
118-
pass
118+
...
119119

120120
def get_stats(self) -> dict:
121121
"""

0 commit comments

Comments
 (0)