ó
    |chƒ  ã                   ój   • S r SSKrSSKJr  SSKJr  SSKJr  SSKJ	r	   " S S5      r
 " S	 S
\
5      rg)zb
inspectors.py   # Per-endpoint view introspection

See schemas.__init__.py for package overview.
é    N)ÚWeakKeyDictionary)Ú	smart_str)Úapi_settings)Ú
formattingc                   ó²   • \ rS rSrSr\R                  " S5      rS rS r	S r
\S 5       r\R                  S 5       r\R                  S	 5       rS
 rS rSrg)ÚViewInspectoré   zO
Descriptor class on APIView.

Provide subclass for per-view schema generation
z^[a-zA-Z][0-9A-Za-z_]*:c                 ó"   • [        5       U l        g ©N)r   Úinstance_schemas©Úselfs    Új/var/www/djangovue.mamus.xyz/django/venv/lib/python3.13/site-packages/rest_framework/schemas/inspectors.pyÚ__init__ÚViewInspector.__init__   s   € Ü 1Ó 3ˆÕó    c                 óN   • XR                   ;   a  U R                   U   $ Xl        U $ )aÕ  
Enables `ViewInspector` as a Python _Descriptor_.

This is how `view.schema` knows about `view`.

`__get__` is called when the descriptor is accessed on the owner.
(That will be when view.schema is called in our case.)

`owner` is always the owner class. (An APIView, or subclass for us.)
`instance` is the view instance or `None` if accessed from the class,
rather than an instance.

See: https://docs.python.org/3/howto/descriptor.html for info on
descriptor usage.
©r   Úview)r   ÚinstanceÚowners      r   Ú__get__ÚViewInspector.__get__   s+   € ð  ×,Ñ,Ó,Ø×(Ñ(¨Ñ2Ð2àŒ	Øˆr   c                 ó4   • X R                   U'   Ub  Xl        g g r   r   )r   r   Úothers      r   Ú__set__ÚViewInspector.__set__2   s    € Ø*/×Ñ˜hÑ'ØÑØ!�Jð r   c                 óB   • U R                   c   S5       eU R                   $ )zView property.zvSchema generation REQUIRES a view instance. (Hint: you accessed `schema` from the view class rather than an instance.)©Ú_viewr   s    r   r   ÚViewInspector.view7   s-   € ð �z‰zÑ%ð 	
ðEó	
Ð%ð �z‰zÐr   c                 ó   • Xl         g r   r   )r   Úvalues     r   r   r!   @   s   € à�
r   c                 ó   • S U l         g r   r   r   s    r   r   r!   D   s	   € àˆ�
r   c           	      óŠ  • U R                   n[        USUR                  5       5      n[        X4S5      nUR                  nU(       aD  U(       a=  U R	                  X2R                  5       [
        R                  " [        U5      5      5      $ U R	                  U[        USUR                  5       5      UR                  5       5      $ )zw
Determine a path description.

This will be based on the method docstring if one exists,
or else the class docstring.
ÚactionN)	r   ÚgetattrÚlowerÚ__doc__Ú_get_description_sectionr   Údedentr   Úget_view_description)r   ÚpathÚmethodr   Úmethod_nameÚmethod_funcÚmethod_docstrings          r   Úget_descriptionÚViewInspector.get_descriptionH   sž   € ð �y‰yˆä˜d H¨f¯l©l«nÓ=ˆÜ˜d°Ó6ˆØ&×.Ñ.ÐÞÖ+à×0Ñ0°·|±|³~Äz×GXÒGXÔYbÐcsÓYtÓGuÓvÐvà×0Ñ0°´w¸tÀXÈvÏ|É|Ë~Ó7^Ø15×1JÑ1JÓ1LóNð Nr   c                 ó¦  • UR                  5       nSnSS0nU HZ  nU R                  R                  U5      (       a(  UR                  S5      u  pXn	U	R	                  5       Xe'   MK  Xe==   SU-   -  ss'   M\     [
        R                  n
X&;   a  Xb   R	                  5       $ X*;   a  X¢   U;   a  XjU      R	                  5       $ US   R	                  5       $ )NÚ Ú:Ú
)Ú
splitlinesÚheader_regexÚmatchÚ	partitionÚstripr   ÚSCHEMA_COERCE_METHOD_NAMES)r   r   ÚheaderÚdescriptionÚlinesÚcurrent_sectionÚsectionsÚlineÚ	separatorÚleadÚcoerce_method_namess              r   r*   Ú&ViewInspector._get_description_section[   sÓ   € Ø×&Ñ&Ó(ˆØˆØ˜�8ˆãˆDØ× Ñ ×&Ñ& t×,Ñ,Ø37·>±>À#Ó3FÑ0�¨DØ,0¯J©J«L�Ó)àÓ)¨T°D©[Ñ8Õ)ñ ô +×EÑEÐØÓØÑ#×)Ñ)Ó+Ð+ØÓ(Ø"Ñ*¨hÓ6Ø°FÑ ;Ñ<×BÑBÓDÐDØ˜‰|×!Ñ!Ó#Ð#r   )r    r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r)   ÚreÚcompiler9   r   r   r   Úpropertyr   ÚsetterÚdeleterr2   r*   Ú__static_attributes__© r   r   r   r      sv   † ñð —:’:Ð7Ó8€Lò4òò,"ð
 ñó ðð 
‡[�[ñó ðð 
‡\�\ñó ðòNõ&$r   r   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )ÚDefaultSchemaéq   z?Allows overriding AutoSchema using DEFAULT_SCHEMA_CLASS settingc                 óÆ   >• [         TU ]  X5      n[        U[        5      (       d  U$ [        R
                  n[        U[        5      (       d   S5       eU" 5       nXl        U$ )NzTDEFAULT_SCHEMA_CLASS must be set to a ViewInspector (usually an AutoSchema) subclass)	Úsuperr   Ú
isinstancerT   r   ÚDEFAULT_SCHEMA_CLASSÚ
issubclassr   r   )r   r   r   ÚresultÚinspector_classÚ	inspectorÚ	__class__s         €r   r   ÚDefaultSchema.__get__s   s`   ø€ Ü‘‘ Ó1ˆÜ˜&¤-×0Ñ0ØˆMä&×;Ñ;ˆÜ˜/¬=×9Ñ9ð 	
Øbó	
Ð9ñ $Ó%ˆ	Ø!ŒØÐr   rR   )rH   rI   rJ   rK   r)   r   rQ   Ú__classcell__)r^   s   @r   rT   rT   q   s   ø† ÙI÷ó r   rT   )r)   rL   Úweakrefr   Údjango.utils.encodingr   Úrest_framework.settingsr   Úrest_framework.utilsr   r   rT   rR   r   r   Ú<module>re      s4   ðñó
 
Ý %å +å 0Ý +÷_$ñ _$ôD�Mõ r   