Files
ServerSync/lib/prompt_toolkit/__pycache__/cache.cpython-314.pyc

53 lines
6.6 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
9<><39>i<EFBFBD><00><01>:<00>^RIHt^RIHt^RIHt^RIHtHtH t H
t
H t H t H t Ht.ROt] !R] R7t] !R 4t!R
R]
]]3,4t] !R ] ] R 3,R7t] !R 4t!RR] ]]3,4t] !R]R ]3,R7tRRRlltR#)<15>)<01> annotations)<01>deque)<01>wraps)<08>Any<6E>Callable<6C>Dict<63>Generic<69>Hashable<6C>Tuple<6C>TypeVar<61>cast<73> SimpleCache<68> FastDictCache<68>_T)<01>bound<6E>_Uc<01>B<00>]tRt^tRtR
RRlltRRltRRltRtR #) rz<>
Very simple cache that discards the oldest item when the cache size is
exceeded.
:param maxsize: Maximum size of the cache. (Don't make it too big.)
c<01> <00>V^8<>dQhRRRR/#)<05><00>maxsize<7A>int<6E>return<72>None<6E>)<01>formats"<22>;/tmp/pip-target-wqrk2shd/lib/python/prompt_toolkit/cache.py<70> __annotate__<5F>SimpleCache.__annotate__s<00><00>$<24>$<24><03>$<24>D<EFBFBD>$<24>c <09>P<00>V^8<>gQh/Vn\4VnWnR#<00>rN)<04>_datar<00>_keysr)<02>selfrs&&r<00>__init__<5F>SimpleCache.__init__s#<00><00><16><11>{<7B><1A>{<7B>#%<25><04>
<EFBFBD> %<25><07><04>
<EFBFBD>#<23> rc<01>$<00>V^8<>dQhRRRRRR/#)r<00>keyr<00> getter_funczCallable[[], _U]rrr)rs"rrr s"<00><00><19><19>r<EFBFBD><19>(8<><19>R<EFBFBD>rc <0A>f<00>VPV,# \d<>T!4pY0PT&TPPT4\ TP4TP
8<>d8TPP 4pY@P9dTPTTu#i;i)zz
Get object from the cache.
If not found, call `getter_func` to resolve it, and put that on the top
of the cache instead.
)r"<00>KeyErrorr#<00>append<6E>lenr<00>popleft)r$r(r)<00>value<75> key_to_removes&&& r<00>get<65>SimpleCache.get s<><00><00> <19><17>:<3A>:<3A>c<EFBFBD>?<3F> "<22><><17> <19><1F>M<EFBFBD>E<EFBFBD>#<23>J<EFBFBD>J<EFBFBD>s<EFBFBD>O<EFBFBD> <10>J<EFBFBD>J<EFBFBD> <1D> <1D>c<EFBFBD> "<22><13>4<EFBFBD>:<3A>:<3A><EFBFBD><14><1C><1C>-<2D> $<24>
<EFBFBD>
<EFBFBD> 2<> 2<> 4<> <0A> <20>J<EFBFBD>J<EFBFBD>.<2E><1C>
<EFBFBD>
<EFBFBD>=<3D>1<><18>L<EFBFBD> <19>s<00><00>BB0<03>/B0c<01><00>V^8<>dQhRR/#)rrrr)rs"rrr7s<00><00><1D><1D>t<EFBFBD>rc <0A>2<00>/Vn\4VnR#)z Clear cache.N)r"rr#)r$s&r<00>clear<61>SimpleCache.clear7s<00><00><17><04>
<EFBFBD><1A>W<EFBFBD><04>
r)r"r#rN)<01>) <09>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__r%r1r5<00>__static_attributes__rrrrrs<00><00><08>$<24><19>.<1D>r<00>_K.<2E>_Vc<01>6<00>]tRt^AtRtRRRlltRRltRtR#) ra<>
Fast, lightweight cache which keeps at most `size` items.
It will discard the oldest items in the cache first.
The cache is a dictionary, which doesn't keep track of access counts.
It is perfect to cache little immutable objects which are not expensive to
create, but where a dictionary lookup is still much faster than an object
instantiation.
:param get_value: Callable that's called in case of a missing key.
c<01>$<00>V^8<>dQhRRRRRR/#)r<00> get_valuezCallable[..., _V]<5D>sizerrrr)rs"rr<00>FastDictCache.__annotate__Vs"<00><00><19><19>"3<><19>3<EFBFBD><19>T<EFBFBD>rc <09>N<00>V^8<>gQh\4VnWnW nR#r!)rr#rBrC)r$rBrCs&&&rr%<00>FastDictCache.__init__Vs <00><00><13>a<EFBFBD>x<EFBFBD><0F>x<EFBFBD> %<25><07><04>
<EFBFBD>"<22><0E><18> rc<01> <00>V^8<>dQhRRRR/#)rr(r>rr?r)rs"rrrD]s<00><00>
<16>
<16>r<EFBFBD>
<16>b<EFBFBD>
rc <09><><00>\V4VP8<>d#VPP4pW 9dWVP!V!pW0V&VPP V4V#<00>N)r-rCr#r.rBr,)r$r(r0<00>results&& r<00> __missing__<5F>FastDictCache.__missing__]s\<00><00> <0E>t<EFBFBD>9<EFBFBD>t<EFBFBD>y<EFBFBD>y<EFBFBD> <20> <20>J<EFBFBD>J<EFBFBD>.<2E>.<2E>0<>M<EFBFBD><1C>$<24><18>'<27><15><1E><1E><13>%<25><06><1A>S<EFBFBD> <09> <0C>
<EFBFBD>
<EFBFBD><19><19>#<23><1E><15> r)r#rBrCN)i@B)r8r9r:r;r<r%rKr=rrrrrAs<00><00>
<08>(<19>
<16>
r<00>_Fc<01> <00>V^8<>dQhRRRR/#)rrrrzCallable[[_F], _F]r)rs"rrrms<00><00><15><15>c<EFBFBD><15>%7<>rc<05>a<00>RV3RllpV#)zA
Memoization decorator for immutable classes and pure functions.
c<01> <00>V^8<>dQhRRRR/#)r<00>objrMrr)rs"rr<00>memoized.<locals>.__annotate__rs<00><00> &<26> &<26>r<EFBFBD> &<26>b<EFBFBD> &rc<01>p<aa<02>\SR7o\S4RVV3Rll4p\\V4#))rc<01>$<00>V^8<>dQhRRRRRR/#)r<00>ar<00>kwrr)rs"rr<00>1memoized.<locals>.decorator.<locals>.__annotate__vs!<00><00> .<2E> .<2E>S<EFBFBD> .<2E><03> .<2E><03> .rc<01><><aa<01>RVVV3RllpS\\SP4443pSPW24#)c<01><00>V^8<>dQhRR/#)rrrr)rs"rr<00>Gmemoized.<locals>.decorator.<locals>.new_callable.<locals>.__annotate__ws<00><00> %<25> %<25><03> %rc<01><<03>S!S/SB#rIr)rUrVrQs<00><><EFBFBD>r<00>
create_new<EFBFBD>Ememoized.<locals>.decorator.<locals>.new_callable.<locals>.create_newws<00><><00><1A>A<EFBFBD>}<7D><12>}<7D>$r)<04>tuple<6C>sorted<65>itemsr1)rUrVr\r(<00>cacherQsjl <20><>r<00> new_callable<6C>1memoized.<locals>.decorator.<locals>.new_callableus8<00><><00> %<25> %<25><15>e<EFBFBD>F<EFBFBD>2<EFBFBD>8<EFBFBD>8<EFBFBD>:<3A>.<2E>/<2F>0<>C<EFBFBD><18>9<EFBFBD>9<EFBFBD>S<EFBFBD>-<2D> -r)rrr rM)rQrbrarsf @<40>r<00> decorator<6F>memoized.<locals>.decoratorrs7<00><><00>,7<><07>,H<><05> <0E>s<EFBFBD><1A> .<2E> .<2E>
<14> .<2E><14>B<EFBFBD> <0C>%<25>%rr)rrdsf r<00>memoizedrfms<00><><00>
&<26> &<26> <15>rN)rrrf)i)<19>
__future__r<00> collectionsr<00> functoolsr<00>typingrrrr r
r r r <00>__all__rrrr>r?r<00>objectrMrfrrr<00><module>rms<><00><01>"<22><1D><1B>O<>O<>O<> <02><07>  <0A>T<EFBFBD><18>"<22><02> <0C>T<EFBFBD>]<5D><02>)<1D>'<27>"<22>b<EFBFBD>&<26>/<2F>)<1D>X <0A>T<EFBFBD><15>x<EFBFBD><13>}<7D>-<2D>.<2E><02> <0C>T<EFBFBD>]<5D><02>&<16>D<EFBFBD><12>R<EFBFBD><16>L<EFBFBD>&<16>R <0A>T<EFBFBD><18>#<23>v<EFBFBD>+<2B>.<2E>/<2F><02><15>r