Files
ServerSync/lib/jaraco/classes/__pycache__/properties.cpython-314.pyc

151 lines
10 KiB
Plaintext
Raw Normal View History

2026-02-19 00:55:27 +02:00
+
<00>;<3B>i/<00><01><>a<00>0t$^RIHt^RIHtHtHtHtHt]!R4t ]!R4t
]'du^RI H t ^RIH t Ht^RIHtHt] R] 3,tR ]R
&]] .] 3,tR ]R &] ]] ,] .R 3,tR ]R &]] ] .R 3,tR ]R&!RR]] ,4t!RR]] ]
3,4t!RR]] ,4tR #)<15>)<01> annotations)<05> TYPE_CHECKING<4E>Generic<69>TypeVar<61>cast<73>overload<61>_T<5F>_U)<01>Callable)<02>Any<6E>Protocol)<02>Self<6C> TypeAlias.r<00>_GetterCallable<6C>_GetterClassMethodN<64>_SetterCallable<6C>_SetterClassMethodc<01>2<00>]tRt^tRRRlltRRltRtR#)<08>_ClassPropertyAttributeNc<01>$<00>V^8<>dQhRRRRRR/#)<07><00>obj<62>object<63>objtypeztype[Any] | None<6E>returnr <00>)<01>formats"<22>@/tmp/pip-target-ugtna5l2/lib/python/jaraco/classes/properties.py<70> __annotate__<5F>$_ClassPropertyAttribute.__annotate__s<00><00>S<>S<>v<EFBFBD>S<>0@<40>S<>B<EFBFBD>S<>c <09><00>R#<00>Nr<00><03>selfrrs&&&r<00>__get__<5F>_ClassPropertyAttribute.__get__s<00><00>PSr!c<01>$<00>V^8<>dQhRRRRRR/#)rrr<00>valuer r<00>Noner)rs"rrr s<00><00>><3E>><3E>v<EFBFBD>><3E>b<EFBFBD>><3E>T<EFBFBD>>r!c <09><00>R#r#r)r%rr)s&&&r<00>__set__<5F>_ClassPropertyAttribute.__set__s<00><00>3r!rr#)<07>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__r&r,<00>__static_attributes__rr!rrrs <00><00>S<>><3E>>r!rc<01>f<00>]tRt^tRtRRlt]RRl4t]R RRll4tR R R
lltR tR#) <0A>NonDataPropertya<79>Much like the property builtin, but only implements __get__,
making it a non-data property, and can be subsequently reset.
See http://users.rcn.com/python/download/Descriptor.htm for more
information.
>>> class X(object):
... @NonDataProperty
... def foo(self):
... return 3
>>> x = X()
>>> x.foo
3
>>> x.foo = 4
>>> x.foo
4
'...' below should be 'jaraco.classes' but for pytest-dev/pytest#3396
>>> X.foo
<....properties.NonDataProperty object at ...>
c<01> <00>V^8<>dQhRRRR/#)r<00>fgetzCallable[[_T], _U]rr*r)rs"rr<00>NonDataProperty.__annotate__2s<00><00><19><19>/<2F><19>D<EFBFBD>r!c <09>X<00>VfQR4h\V4'gQR4hWnR#)Nzfget cannot be nonezfget must be callable)<02>callabler6)r%r6s&&r<00>__init__<5F>NonDataProperty.__init__2s-<00><00><13><1F>6<>!6<>6<><1F><17><04>~<7E>~<7E>6<>6<>6<>~<7E><18> r!c<01>$<00>V^8<>dQhRRRRRR/#)rrr*rrrr)rs"rrr78s(<00><00><13><13> <11><13><16><13>
<0E> r!c <09><00>R#r#rr$s&&&rr&<00>NonDataProperty.__get__7s<00><00>
r!Nc<01>$<00>V^8<>dQhRRRRRR/#)rrr r<00>type[_T] | Nonerr
r)rs"rrr7?s(<00><00><11><11> <0F><11>!<21><11>
<0C> r!c <09><00>R#r#rr$s&&&rr&r>>s<00><00>
r!c<01>$<00>V^8<>dQhRRRRRR/#)rrz _T | Nonerr@rz Self | _Ur)rs"rrr7Es(<00><00><1E><1E> <16><1E>!<21><1E>
<13> r!c <09>0<00>VfV#VPV4#r#<00>r6r$s&&&rr&r>Es<00><00>
<0F>;<3B><17>K<EFBFBD><13>y<EFBFBD>y<EFBFBD><13>~<7E>r!rDr#) r.r/r0r1<00>__doc__r:rr&r2rr!rr4r4s><00><00><08>,<19>
<0E><13><0E><13> <0E><11><0E><11> <1E>r!r4c<01><><00>]tRt^Ot$RtR]R&R]R&!RR]4tRR R
lltRR R llt R Rlt
RRlt ] ] RRl44t] ] RRl44t] RRl4tRtR#)<19> classpropertya~
Like @property but applies at the class level.
>>> class X(metaclass=classproperty.Meta):
... val = None
... @classproperty
... def foo(cls):
... return cls.val
... @foo.setter
... def foo(cls, val):
... cls.val = val
>>> X.foo
>>> X.foo = 3
>>> X.foo
3
>>> x = X()
>>> x.foo
3
>>> X.foo = 4
>>> x.foo
4
Setting the property on an instance affects the class.
>>> x.foo = 5
>>> x.foo
5
>>> X.foo
5
>>> vars(x)
{}
>>> X().foo
5
Attempting to set an attribute where no setter was defined
results in an AttributeError:
>>> class GetOnly(metaclass=classproperty.Meta):
... @classproperty
... def foo(cls):
... return 'bar'
>>> GetOnly.foo = 3
Traceback (most recent call last):
...
AttributeError: can't set attribute
It is also possible to wrap a classmethod or staticmethod in
a classproperty.
>>> class Static(metaclass=classproperty.Meta):
... @classproperty
... @classmethod
... def foo(cls):
... return 'foo'
... @classproperty
... @staticmethod
... def bar():
... return 'bar'
>>> Static.foo
'foo'
>>> Static.bar
'bar'
*Legacy*
For compatibility, if the metaclass isn't specified, the
legacy behavior will be invoked.
>>> class X:
... val = None
... @classproperty
... def foo(cls):
... return cls.val
... @foo.setter
... def foo(cls, val):
... cls.val = val
>>> X.foo
>>> X.foo = 3
>>> X.foo
3
>>> x = X()
>>> x.foo
3
>>> X.foo = 4
>>> x.foo
4
Note, because the metaclass was not specified, setting
a value on an instance does not have the intended effect.
>>> x.foo = 5
>>> x.foo
5
>>> X.foo # should be 5
4
>>> vars(x) # should be empty
{'foo': 5}
>>> X().foo # should be 5
4
z/_ClassPropertyAttribute[_GetterClassMethod[_T]]r6z6_ClassPropertyAttribute[_SetterClassMethod[_T] | None]<5D>fsetc<01>.a<00>]tRt^<5E>tRV3RlltRtV;t#)<04>classproperty.Metac<01>$<00>V^8<>dQhRRRRRR/#)r<00>key<65>strr)rrr*r)rs"rr<00>classproperty.Meta.__annotate__<5F>s!<00><00> 3<> 3<>3<EFBFBD> 3<>v<EFBFBD> 3<>$<24> 3r!c <09><><<01>VPPVR4p\V4\JdVP W4#\
SV`W4#r#)<07>__dict__<5F>get<65>typerGr,<00>super<65> __setattr__)r%rLr)r<00> __class__s&&& <20>rrT<00>classproperty.Meta.__setattr__<5F>sD<00><><00><16>-<2D>-<2D>#<23>#<23>C<EFBFBD><14>.<2E>C<EFBFBD><13>C<EFBFBD>y<EFBFBD>M<EFBFBD>)<29><1A>{<7B>{<7B>4<EFBFBD>/<2F>/<2F><18>7<EFBFBD>&<26>s<EFBFBD>2<> 2r!r)r.r/r0r1rTr2<00> __classcell__)rUs@r<00>MetarJ<00>s <00><><00> 3<> 3r!rXNc<01>$<00>V^8<>dQhRRRRRR/#)rr6<00>,_GetterCallable[_T] | _GetterClassMethod[_T]rHz3_SetterCallable[_T] | _SetterClassMethod[_T] | Nonerr*r)rs"rr<00>classproperty.__annotate__<5F>s)<00><00>#<23>#<23>:<3A>#<23>B<01>#<23>
<0E> #r!c <09>z<00>VPV4VnW nT;'dVPV4R#R#r#)<04>_ensure_methodr6rH<00>setter)r%r6rHs&&&rr:<00>classproperty.__init__<5F>s2<00><00>
<19>'<27>'<27><04>-<2D><04> <09><18> <09> <0C>"<22>"<22><14><1B><1B>T<EFBFBD>"<22>"r!c<01>$<00>V^8<>dQhRRRRRR/#)r<00>instancer<00>ownerztype[object] | Nonerr r)rs"rrr[<00>s"<00><00>0<>0<><06>0<>/B<>0<>b<EFBFBD>0r!c <09>D<00>VPPRV4!4#r#)r6r&)r%rarbs&&&rr&<00>classproperty.__get__<5F>s<00><00><13>y<EFBFBD>y<EFBFBD> <20> <20><14>u<EFBFBD>-<2D>/<2F>/r!c<01>$<00>V^8<>dQhRRRRRR/#)rrbrr)r rr*r)rs"rrr[<00>s&<00><00>K<01>K<01>V<EFBFBD>K<01>B<EFBFBD>K<01>4<EFBFBD>Kr!c <09><><00>VP'g \R4h\V4\PJd \V4pVPP R\ RV44!V4#)zcan't set attributeNz type[object])rH<00>AttributeErrorrRrGrXr&r)r%rbr)s&&&rr,<00>classproperty.__set__<5F>sU<00><00><13>y<EFBFBD>y<EFBFBD>y<EFBFBD> <20>!6<>7<> 7<> <0F><05>;<3B>m<EFBFBD>0<>0<> 0<><18><15>K<EFBFBD>E<EFBFBD><13>y<EFBFBD>y<EFBFBD> <20> <20><14>t<EFBFBD>N<EFBFBD>E<EFBFBD>'B<>C<>E<EFBFBD>J<>Jr!c<01> <00>V^8<>dQhRRRR/#)rrH<00>,_SetterCallable[_T] | _SetterClassMethod[_T]rrr)rs"rrr[<00>s<00><00><14><14>G<><14>D<EFBFBD>r!c <09>2<00>VPV4VnV#r#)r]rH)r%rHs&&rr^<00>classproperty.setter<65>s<00><00><18>'<27>'<27><04>-<2D><04> <09><13> r!c<01> <00>V^8<>dQhRRRR/#)r<00>fnrZrz_GetterClassMethod[_T]r)rs"rrr[<00><00><00><00>%<25>%<25> 8<>%<25>
<20>%r!c <09><00>R#r#r<00><02>clsrns&&rr]<00>classproperty._ensure_method<6F><00><00><00>
"%r!c<01> <00>V^8<>dQhRRRR/#)rrnrjrz_SetterClassMethod[_T]r)rs"rrr[<00>ror!c <09><00>R#r#rrqs&&rr]rs<00>rtr!c<01> <00>V^8<>dQhRRRR/#)rrnz[_GetterCallable[_T] | _GetterClassMethod[_T] | _SetterCallable[_T] | _SetterClassMethod[_T]rz/_GetterClassMethod[_T] | _SetterClassMethod[_T]r)rs"rrr[<00>s <00><00> 7<> 7<> !<21> 7<>
9<EFBFBD> 7r!c <0A>b<00>\V\\34'*pV'd \V4#T#)z-
Ensure fn is a classmethod or staticmethod.
)<03>
isinstance<EFBFBD> classmethod<6F> staticmethod)rrrn<00> needs_methods&& rr]rs<00>s)<00><00>&<26>b<EFBFBD>;<3B> <0C>*E<>F<>F<> <0C>".<2E>{<7B>2<EFBFBD><EFBFBD>6<>B<EFBFBD>6r!)r6rHr#)r.r/r0r1rE<00>__annotations__rRrXr:r&r,r^rrzr]r2rr!rrGrGOs<><00><00>d<08>L :<3A>9<>
@<40>@<40>3<>t<EFBFBD>3<>#<23>0<>K<01><14><0E><10>%<25><11><0E>%<25>
<0E><10>%<25><11><0E>%<25>
<11> 7<><11> 7r!rG)<1C>__conditional_annotations__<5F>
__future__r<00>typingrrrrrr r
<00>collections.abcr r r <00>typing_extensionsrrrr}rzrrRrrrr4rG)r~s@r<00><module>r<>s<><00><><01>"<22>"<22>B<>B<> <0C>T<EFBFBD>]<5D><02> <0C>T<EFBFBD>]<5D><02><10>(<28>$<24>1<>"*<2A>#<23>r<EFBFBD>'<27>!2<>O<EFBFBD>Y<EFBFBD>2<>$/<2F><03>R<EFBFBD><12> <0B>$<<3C><16> <09><<3C>!)<29>4<EFBFBD><03>9<EFBFBD>b<EFBFBD>/<2F>4<EFBFBD>*?<3F>!@<40>O<EFBFBD>Y<EFBFBD>@<40>$/<2F><03>b<EFBFBD>T<EFBFBD>4<EFBFBD><0F>$@<40><16> <09>@<40>?<3F>(<28>2<EFBFBD>,<2C>?<3F> 1<1E>g<EFBFBD>b<EFBFBD>"<22>f<EFBFBD>o<EFBFBD>1<1E>hb7<>G<EFBFBD>B<EFBFBD>K<EFBFBD>b7r!