File tree Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Original file line number Diff line number Diff line change 6262
6363"""
6464
65- from copy import deepcopy
66-
6765SENTINEL = object ()
6866
6967
@@ -91,13 +89,6 @@ def __init__(self, max_size):
9189
9290 self .hits = self .misses = 0
9391
94- def __copy__ (self ):
95- cache = LRUCache (self .max_size )
96- cache .full = self .full
97- cache .cache = deepcopy (self .cache )
98- cache .root = deepcopy (self .root )
99- return cache
100-
10192 def set (self , key , value ):
10293 link = self .cache .get (key , SENTINEL )
10394
Original file line number Diff line number Diff line change 1- from copy import copy
21from typing import TYPE_CHECKING
32
43import sentry_sdk
@@ -25,12 +24,6 @@ def clear(self):
2524 # type: () -> None
2625 self .buffer = LRUCache (self .capacity )
2726
28- def __copy__ (self ):
29- # type: () -> FlagBuffer
30- buffer = FlagBuffer (capacity = self .capacity )
31- buffer .buffer = copy (self .buffer )
32- return buffer
33-
3427 def get (self ):
3528 # type: () -> list[FlagData]
3629 return [{"flag" : key , "result" : value } for key , value in self .buffer .get_all ()]
You can’t perform that action at this time.
0 commit comments