Files
ServerSync/lib/rich/__pycache__/_ratio.cpython-314.pyc

63 lines
7.4 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
<00> <0C>i<EFBFBD><00>
<00><00>^RIHt^RIHt^RIHtHtHtHtH t !RR] 4t
RRlt RR lt RR R llt ]R 8XdJ^RIHt]!RR44t] !^n]!R
^^4]!R
^^4]!R
^^4.4t]!]!]44R
#R
#)<12>)<01>Fraction)<01>ceil)<05>cast<73>List<73>Optional<61>Sequence<63>Protocolc<00><a<00>]tRt^toRtRt^t^tV3RltRt Vt
R#)<05>Edgez1Any object that defines an edge (such as Layout).Nc<00>N<<01>V^8<>dQh/S[S[,;R&S[;R&S[;R&#<00><04><00>size<7A>ratio<69> minimum_size<7A>r<00>int)<02>format<61> __classdict__s"<22><>2/tmp/pip-target-qd_sq_1j/lib/python/rich/_ratio.py<70> __annotate__<5F>Edge.__annotate__s/<00><><00><00> <13>3<EFBFBD>-<2D><1E><01> <0F>N<EFBFBD> <01>
<16><19> <01><00>) <0B>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__rrr<00>__annotate_func__<5F>__static_attributes__<5F>__classdictcell__<5F>rs@rr r s<00><><00><00>;<3B><1E>D<EFBFBD><12>E<EFBFBD><19>L<EFBFBD> <01>rr c<00>h<00>V^8<>dQhR\R\\,R\\,/#)r<00>total<61>edges<65>return)rrr r)rs"rrrs)<00><00>:"<22>:"<22><13>:"<22>X<EFBFBD>d<EFBFBD>^<5E>:"<22><04>S<EFBFBD> <09>:"rc<04><><00>VUu.uFq"P;'gRNK pp\pRV9Ed \\W144UUUu.uFwpwrbVeKWR3NK ppppV\ RV44,
pV^8:d:\W14UUu.uF!wrbVfVP
;'g^MTNK# upp#V!V\ RV444p VF7wrRW<52>P ,VP
8:gK(VP
W5&K<> V!^4p
VF.wrR\W<>P ,V
,^4wrjWcV&K0 \\\,V4#uupiuupppiuuppi)a`Divide total space to satisfy size, ratio, and minimum_size, constraints.
The returned list of integers should add up to total in most cases, unless it is
impossible to satisfy all the constraints. For instance, if there are two edges
with a minimum size of 20 each and `total` is 30 then the returned list will be
greater than total. In practice, this would mean that a Layout object would
clip the rows that would overflow the screen height.
Args:
total (int): Total number of characters.
edges (List[Edge]): Edges within total space.
Returns:
List[int]: Number of characters for each edge.
Nc3<00>8"<00>TFq;'g^x<00>K R#5i)rNr)<02>.0rs& r<00> <genexpr><3E> ratio_resolve.<locals>.<genexpr>,s<00><00><00><<3C>e<EFBFBD>d<EFBFBD> <09> <09><01> <09>e<EFBFBD>s<00> <01> c3<00>R"<00>TFwrVP;'g^x<00>K R#5i)<02>N)r)r*<00>_<>edges& rr+r,5s<00><00><00>K<>N<EFBFBD><17><11>D<EFBFBD>J<EFBFBD>J<EFBFBD>O<EFBFBD>O<EFBFBD>!<21>O<EFBFBD>N<EFBFBD>s<00>'<01> ') rr<00> enumerate<74>zip<69>sumrr<00>divmodrrr) r%r&r0<00>sizes<65> _Fraction<6F>indexr<00>flexible_edges<65> remaining<6E>portion<6F> remainders && r<00> ratio_resolver<sy<00><00>".3<EFBFBD> 3<>U<EFBFBD>T<EFBFBD>i<EFBFBD>i<EFBFBD><1F><1F>4<EFBFBD><1F>U<EFBFBD>E<EFBFBD> 3<><18>I<EFBFBD> <0F>%<25>-<2D>(1<><13>U<EFBFBD>1B<31>'C<>
<EFBFBD>'C<>#<23><05>|<7C><04><13> <1A>U<EFBFBD>M<EFBFBD>'C<> <17>
<EFBFBD> <1A>C<EFBFBD><<3C>e<EFBFBD><<3C><<3C><<3C> <09> <14><01>><3E>#&<26>e<EFBFBD>"3<><0E>"3<>J<EFBFBD>D<EFBFBD>.2<EFBFBD>\<5C>$<24>#<23>#<23>(<28>(<28>q<EFBFBD><71>t<EFBFBD>C<>"3<><0E> <0E>
<1C> <15>s<EFBFBD>K<>N<EFBFBD>K<>K<>
<EFBFBD><07>
*<2A>K<EFBFBD>E<EFBFBD><16><1A><1A>#<23>t<EFBFBD>'8<>'8<>8<>#<23>0<>0<><05> <0C><15> *<2A>"<22>!<21> <0C>I<EFBFBD>-<2D> <0B><05>"(<28><17>:<3A>:<3A>)=<3D> <09>)I<>1<EFBFBD>"M<><0F><04>#<23>e<EFBFBD> <0C> .<2E> <12> <0F><04>S<EFBFBD> <09>5<EFBFBD> !<21>!<21><>S 4<><34>
<EFBFBD><EFBFBD>s"<00>E-<04>E-<04> E2<08>E2<08>E9<06>2 E9c <00><><00>V^8<>dQhR\R\\,R\\,R\\,R\\,/#)rr%<00>ratios<6F>maximums<6D>valuesr')rr)rs"rrrKsD<00><00><12><12> <0E><12><1C>S<EFBFBD> <09><12>-1<>#<23>Y<EFBFBD><12>@D<>S<EFBFBD> <09><12> <09>#<23>Y<EFBFBD>rc<04><><00>\W4UUu.uFwrEV'dTM^NK ppp\V4pV'g
VR,#Tp.pVPp \WV4F_wrJp V'dJV^8<>dC\V
\ WG,V, 44p V !W<>,
4W|,pWd,pKWV !V 4Ka V#uuppi)aDDivide an integer total in to parts based on ratios.
Args:
total (int): The total to divide.
ratios (List[int]): A list of integer ratios.
maximums (List[int]): List of maximums values for each slot.
values (List[int]): List of values
Returns:
List[int]: A list of integers guaranteed to sum to total.
:NNN)r2r3<00>append<6E>min<69>round) r%r>r?r@r<00>_max<61> total_ratio<69>total_remaining<6E>resultrB<00>maximum<75>value<75> distributeds &&&& r<00> ratio_reducerLKs<><00><00>7:<3A>&<26>6K<36> L<>6K<36>{<7B>u<EFBFBD>t<EFBFBD>e<EFBFBD><11>"<22>6K<36>F<EFBFBD> L<><15>f<EFBFBD>+<2B>K<EFBFBD> <16><15>a<EFBFBD>y<EFBFBD><18><1B>O<EFBFBD><1A>F<EFBFBD> <13>]<5D>]<5D>F<EFBFBD>!$<24>V<EFBFBD>v<EFBFBD>!><3E><1D><05><05> <10>[<5B>1<EFBFBD>_<EFBFBD><1D>g<EFBFBD>u<EFBFBD>U<EFBFBD>-D<>{<7B>-R<>'S<>T<>K<EFBFBD> <12>5<EFBFBD>&<26> '<27> <1B> *<2A>O<EFBFBD> <17> <20>K<EFBFBD> <12>5<EFBFBD>M<EFBFBD>"?<3F> <12>M<EFBFBD><4D>Ms<00>CNc <00><><00>V^8<>dQhR\R\\,R\\\,,R\\,/#)rr%r><00>minimumsr')rrr)rs"rrrks=<00><00>!<1D>!<1D> <0E>!<1D><1C>S<EFBFBD> <09>!<1D>-5<>d<EFBFBD>3<EFBFBD>i<EFBFBD>-@<40>!<1D> <09>#<23>Y<EFBFBD>!rc<04><><00>V'd)\W4UUu.uFwr4V'dTM^NK ppp\V4pV^8<>gQR4hTp.pVPpVf^.\V4,p MTp \W4FIwr:V^8<>d$\ V
\ W6,V, 44p MTp V!V 4WS,pWk,pKK V#uuppi)a Distribute an integer total in to parts based on ratios.
Args:
total (int): The total to divide.
ratios (List[int]): A list of integer ratios.
minimums (List[int]): List of minimum values for each slot.
Returns:
List[int]: A list of integers guaranteed to sum to total.
zSum of ratios must be > 0)r2r3rB<00>len<65>maxr) r%r>rNr<00>_minrFrG<00>distributed_totalrB<00> _minimums<6D>minimumrKs &&& r<00>ratio_distributerVks<><00><00><10>:=<3D>f<EFBFBD>:O<>P<>:O<>;<3B>5<EFBFBD>4<EFBFBD>%<25>Q<EFBFBD>&<26>:O<><06>P<><15>f<EFBFBD>+<2B>K<EFBFBD> <16><11>?<3F>7<>7<>7<>?<3F><1B>O<EFBFBD>#%<25><15> <1E> %<25> %<25>F<EFBFBD><0F><17><16>C<EFBFBD>#<23>f<EFBFBD>+<2B>%<25> <09><1C> <09><1D>f<EFBFBD>0<><0E><05> <16><11>?<3F><1D>g<EFBFBD>t<EFBFBD>E<EFBFBD>,C<>k<EFBFBD>,Q<>'R<>S<>K<EFBFBD>)<29>K<EFBFBD><0E>{<7B><1B><13><1C> <0B><17>&<26><0F>1<> <1D><1C><>'Qs<00>C<06>__main__)<01> dataclassc<00>8a<00>]tRt^<5E>toRt^t^tV3RltRtVt R#)<04>ENc<00>N<<01>V^8<>dQh/S[S[,;R&S[;R&S[;R&#r r)rrs"<22>rr<00>E.__annotate__<5F>s-<00><><00><00><16>s<EFBFBD>m<EFBFBD>"<22><01><13><0E><01><1A><1D> rr)
rrrrrrrr r!r"r#s@rrZrZ<00>s<00><><00><00>"<22><04><16><05><1D> <0C> <01>rrZ)N)<15> fractionsr<00>mathr<00>typingrrrrr r r<rLrVr<00> dataclassesrXrZ<00>resolved<65>printr3rrr<00><module>rcs<><00><01><1E><15>;<3B>;<3B><1A>8<EFBFBD><1A>:"<22>z<12>@!<1D>H <0C>z<EFBFBD><19>%<25><0E><1E><1E><0F><1E>
<1D>S<EFBFBD>1<EFBFBD>T<EFBFBD>1<EFBFBD>a<EFBFBD>=<3D>!<21>D<EFBFBD>!<21>Q<EFBFBD>-<2D><11>4<EFBFBD><11>A<EFBFBD><1D>"O<>P<>H<EFBFBD> <09>#<23>h<EFBFBD>-<2D><18>r