Files
ServerSync/lib/prompt_toolkit/layout/__pycache__/dimension.cpython-314.pyc

76 lines
9.3 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
9<><39>i$<00><01><><00>Rt^RIHt^RIHtHtHtHt.ROt]'d^RI H
t
!RR4t RRlt RR lt ]R
]] ].]3,3,tR R ltR Rlt] t] tR
#)zo
Layout dimensions are used to give the minimum, maximum and preferred
dimensions for containers and controls.
)<01> annotations)<04> TYPE_CHECKING<4E>Any<6E>Callable<6C>Union<6F> Dimension)<01> TypeGuardc<01>b<00>]tRt^tRtR RRllt]RRl4t]RRl4tR R
lt R t
R#) ra<>
Specified dimension (width/height) of a user control or window.
The layout engine tries to honor the preferred size. If that is not
possible, because the terminal is larger or smaller, it tries to keep in
between min and max.
:param min: Minimum size.
:param max: Maximum size.
:param weight: For a VSplit/HSplit, the actual size will be determined
by taking the proportion of weights from all the children.
E.g. When there are two children, one with a weight of 1,
and the other with a weight of 2, the second will always be
twice as big as the first, if the min/max values allow it.
:param preferred: Preferred size.
Nc
<01>,<00>V^8<>dQhRRRRRRRRRR/#)<08><00>minz
int | None<6E>max<61>weight<68> preferred<65>return<72>None<6E>)<01>formats"<22>F/tmp/pip-target-wqrk2shd/lib/python/prompt_toolkit/layout/dimension.py<70> __annotate__<5F>Dimension.__annotate__*s<<00><00>*&<26>*&<26> <17>*&<26><18>*&<26><1B> *&<26>
<1E> *&<26>
<0E> *&<26>c <09><><00>Ve
V^8<>gQhVe
V^8<>gQhVe
V^8<>gQhVe
V^8<>gQhVRJVnVRJVnVRJVnVRJVnVf^pVfRpVfTpVf^pWnW nW@nW0nW!8d \R4hVP VP8dVPVnVP VP
8<>dVP
VnR#R#)NzInvalid Dimension: max < min.l<00>7<EFBFBD>3M<>e') <09> min_specified<65> max_specified<65>preferred_specified<65>weight_specifiedr r rr<00>
ValueError)<05>selfr r rrs&&&&&r<00>__init__<5F>Dimension.__init__*s <00><00> <12> <1D><19>Q<EFBFBD>;<3B> <1E>;<3B><12>{<7B>c<EFBFBD>Q<EFBFBD>h<EFBFBD>&<26>&<26><12>{<7B>c<EFBFBD>Q<EFBFBD>h<EFBFBD>&<26>&<26><18> <20>I<EFBFBD><11>N<EFBFBD>2<>2<> <20><04>_<EFBFBD><04><1A> <20><04>_<EFBFBD><04><1A>#,<2C>D<EFBFBD>#8<><04> <20> &<26>d<EFBFBD> 2<><04><1D> <0E>;<3B><13>C<EFBFBD> <0E>;<3B><1A>C<EFBFBD> <14> <1C><1B>I<EFBFBD> <11>><3E><16>F<EFBFBD><16><08><16><08>"<22><0E><1C> <0B> <0F>9<EFBFBD><1C><<3C>=<3D> =<3D> <10>><3E>><3E>D<EFBFBD>H<EFBFBD>H<EFBFBD> $<24>!<21>X<EFBFBD>X<EFBFBD>D<EFBFBD>N<EFBFBD> <0F>><3E>><3E>D<EFBFBD>H<EFBFBD>H<EFBFBD> $<24>!<21>X<EFBFBD>X<EFBFBD>D<EFBFBD>N<EFBFBD> %rc<01> <00>V^8<>dQhRRRR/#)r <00>amount<6E>intrrr)rs"rrrWs<00><00>=<3D>=<3D>3<EFBFBD>=<3D>9<EFBFBD>=rc <0A><00>V!WVR7#)z^
Return a :class:`.Dimension` with an exact size. (min, max and
preferred set to ``amount``).
<EFBFBD>r r rr)<02>clsr"s&&r<00>exact<63>Dimension.exactVs<00><00> <13>v<EFBFBD>V<EFBFBD><<3C><rc<01><00>V^8<>dQhRR/#)r rrr)rs"rrr_s<00><00>#<23>#<23>Y<EFBFBD>#rc <0A>&<00>VP^R7#)zR
Create a dimension that represents a zero size. (Used for 'invisible'
controls.)
)r")r')r&s&r<00>zero<72>Dimension.zero^s<00><00> <13>y<EFBFBD>y<EFBFBD><01>y<EFBFBD>"<22>"rc<01><00>V^8<>dQhRR/#)r r<00>strr)rs"rrrfs<00><00> 9<> 9<>#<23> 9rc <09><><00>.pVP'd VPRVP: 24VP'd VPRVP: 24VP
'd VPRVP : 24VP'd VPRVP: 24RPRPV44#)zmin=zmax=z
preferred=zweight=z Dimension({})z, ) r<00>appendr rr rrrrr<00>join)r<00>fieldss& r<00>__repr__<5F>Dimension.__repr__fs<><00><00><13><06> <0F> <1D> <1D> <1D> <12>M<EFBFBD>M<EFBFBD>D<EFBFBD><14><18><18> <0C>-<2D> .<2E> <0F> <1D> <1D> <1D> <12>M<EFBFBD>M<EFBFBD>D<EFBFBD><14><18><18> <0C>-<2D> .<2E> <0F> #<23> #<23> #<23> <12>M<EFBFBD>M<EFBFBD>J<EFBFBD>t<EFBFBD>~<7E>~<7E>&8<>9<> :<3A> <0F> <20> <20> <20> <12>M<EFBFBD>M<EFBFBD>G<EFBFBD>D<EFBFBD>K<EFBFBD>K<EFBFBD>?<3F>3<> 4<><1E>%<25>%<25>d<EFBFBD>i<EFBFBD>i<EFBFBD><06>&7<>8<>8r)r rr rrrrr)NNNN) <0B>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__r<00> classmethodr'r+r3<00>__static_attributes__rrrrrs?<00><00><08>"*&<26>X<11>=<3D><11>=<3D><11>#<23><11>#<23> 9<> 9rc<01> <00>V^8<>dQhRRRR/#<00>r <00>
dimensionszlist[Dimension]rrr)rs"rrrts<00><00><<3C><<3C>o<EFBFBD><<3C>)<29><rc<05><><00>\RV44p\RV44p\RV44p\WVR7#)z.
Sum a list of :class:`.Dimension` instances.
c3<01>8"<00>TFqPx<00>K R#5i<01>N<>r <00><02>.0<EFBFBD>ds& r<00> <genexpr><3E>(sum_layout_dimensions.<locals>.<genexpr>x<00><00><00><00> (<28>Z<EFBFBD><01>e<EFBFBD>e<EFBFBD>Z<EFBFBD><5A><00>c3<01>8"<00>TFqPx<00>K R#5irA<00>r rCs& rrFrGyrHrIc3<01>8"<00>TFqPx<00>K R#5irA<00>rrCs& rrFrGzs<00><00><00>4<><1A>A<EFBFBD>K<EFBFBD>K<EFBFBD><1A>rIr%)<02>sumr)r>r r rs& r<00>sum_layout_dimensionsrOtsA<00><00> <0E> (<28>Z<EFBFBD> (<28>
(<28>C<EFBFBD>
<0A> (<28>Z<EFBFBD> (<28>
(<28>C<EFBFBD><13>4<><1A>4<>4<>I<EFBFBD> <14><13><19> ;<3B>;rc<01> <00>V^8<>dQhRRRR/#r=r)rs"rrrs<00><00>*<1B>*<1B>o<EFBFBD>*<1B>)<29>*rc<05>P<00>\V4'g\P4#\;QJdRV4F 'dK RM RM !RV44'd\P4#VUu.uF*qP^8wgKVP
^8wgK(VNK, ppV'dh\ RV44p\ RV44p\ V\ RV444pW#8<>dTp\ RV44p\W#VR7#\4#uupi) z<>
Take the maximum of a list of :class:`.Dimension` instances.
Used when we have a HSplit/VSplit, and we want to get the best width/height.)
c3<01>l"<00>TF*qP^8H;'dVP^8Hx<00>K, R#5i)<02>N)rr rCs& rrF<00>(max_layout_dimensions.<locals>.<genexpr><3E>s*<00><00><00>
?<3F>J<EFBFBD>q<EFBFBD>;<3B>;<3B>!<21> <1B> *<2A> *<2A><01><05><05><11>
<EFBFBD> *<2A>J<EFBFBD>s<00>4<01>4FTc3<01>8"<00>TFqPx<00>K R#5irArBrCs& rrFrT<00><00><00><00><00>-<2D>*<2A>Q<EFBFBD>5<EFBFBD>5<EFBFBD>*<2A>rIc3<01>8"<00>TFqPx<00>K R#5irArKrCs& rrFrT<00>rVrIc3<01>8"<00>TFqPx<00>K R#5irArMrCs& rrFrT<00>s<00><00><00>=<3D>*<2A>Q<EFBFBD>[<5B>[<5B>*<2A>rIc3<01>8"<00>TFqPx<00>K R#5irArMrCs& rrFrT<00>s<00><00><00>8<>Z<EFBFBD><01> <0B> <0B>Z<EFBFBD>rIr%)<07>lenrr+<00>allrr r )r>rE<00>min_<6E>max_rs& r<00>max_layout_dimensionsr^s<><00><00>
<0F>z<EFBFBD>?<3F>?<3F><18>~<7E>~<7E><1F><1F>
 <0B>s<EFBFBD>
?<3F>J<EFBFBD>
?<3F>s<EFBFBD>s<EFBFBD>s<EFBFBD>
?<3F>J<EFBFBD>
?<3F>?<3F>?<3F><18>~<7E>~<7E><1F><1F>(<28>K<>Z<EFBFBD><01>;<3B>;<3B>!<21>+;<3B>!<21><01><05><05><11>
<EFBFBD>!<21>!<21>Z<EFBFBD>J<EFBFBD>K<><11><12>-<2D>*<2A>-<2D>-<2D><04><13>-<2D>*<2A>-<2D>-<2D><04><12>4<EFBFBD><13>=<3D>*<2A>=<3D>=<3D>><3E><04> <10>;<3B><17>D<EFBFBD><17>8<>Z<EFBFBD>8<>8<> <09><18>T<EFBFBD>y<EFBFBD>A<>A<><18>{<7B><1A><>7Ls<00>8D#<04>D#<04>"D#Nc<01> <00>V^8<>dQhRRRR/#)r <00>value<75> AnyDimensionrrr)rs"rrr<00>s<00><00> <<3C> <<3C> <0C> <<3C><19> <rc<05><><00>Vf \4#\V\4'd\PV4#\V\4'dV#\ V4'd\ V!44#\ R4h)z2
Turn the given object into a `Dimension` object.
z#Not an integer or Dimension object.)r<00>
isinstancer#r'<00>callable<6C> to_dimensionr<00>r`s&rrere<00>sa<00><00> <0A>}<7D><18>{<7B><1A><11>%<25><13><1D><1D><18><EFBFBD><EFBFBD>u<EFBFBD>%<25>%<25><11>%<25><19>#<23>#<23><14> <0C><0F><05><EFBFBD><EFBFBD><1B>E<EFBFBD>G<EFBFBD>$<24>$<24>
<14>:<3A>
;<3B>;rc<01> <00>V^8<>dQhRRRR/#)r r`<00>objectrzTypeGuard[AnyDimension]r)rs"rrr<00>s<00><00> <11> <11><06> <11>#:<3A> rc<05>t<00>VfR#\V4'dR#\V\\34'dR#R#)z<>
Test whether the given value could be a valid dimension.
(For usage in an assertion. It's not guaranteed in case of a callable.)
TF)rdrcr#rrfs&r<00> is_dimensionrj<00>s0<00><00>
 <0A>}<7D><13><0F><05><EFBFBD><EFBFBD><13><11>%<25>#<23>y<EFBFBD>)<29>*<2A>*<2A><13> r)r<00>DrOr^rarerj)r9<00>
__future__r<00>typingrrrr<00>__all__<5F>typing_extensionsrrrOr^r#rarerjrk<00>LayoutDimensionrrr<00><module>rqsz<00><01><04>
#<23>6<>6<> <02><07><11>+<2B>Y9<>Y9<>x<<3C>*<1B>\<15><08><07> <0A> <0C>R<EFBFBD><13>W<EFBFBD><15> <17><02> <0C> <<3C> <11><0E><01><1C>r