ó
    Ñ]j0  ã                   ó\   • S r SrSSKr " S S\5      r " S S\5      r " S S	\5      rS
 rg)z*Provides a container for DescriptorProtos.z"matthewtoia@google.com (Matt Toia)é    Nc                   ó   • \ rS rSrSrg)ÚErroré   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   ó    Ú`/home/mande/repo/quber/.venv/lib/python3.13/site-packages/google/protobuf/descriptor_database.pyr   r      s   † Úr   r   c                   ó   • \ rS rSrSrSrg)Ú,DescriptorDatabaseConflictingDefinitionErroré   zGRaised when a proto is added with the same name & different descriptor.r   N)r   r   r	   r
   Ú__doc__r   r   r   r   r   r      s   † ÜOr   r   c                   óB   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
rg)ÚDescriptorDatabaseé   zEA container accepting FileDescriptorProtos and maps DescriptorProtos.c                 ó    • 0 U l         0 U l        g ©N©Ú_file_desc_protos_by_fileÚ_file_desc_protos_by_symbol)Úselfs    r   Ú__init__ÚDescriptorDatabase.__init__   s   € Ø%'€DÔ"Ø')€DÕ$r   c                 óª  • UR                   nX R                  ;  a  XR                  U'   O"U R                  U   U:w  a  [        SU-  5      egUR                  nUR                   H&  n[        XC5       H  nU R                  XQ5        M     M(     UR                   H‘  nU R                  U(       a  SR                  X6R                   45      OUR                   U5        UR                   H?  nUU R                  U(       a  SR                  X7R                   45      OUR                   '   MA     M“     UR                   HB  nU R                  U(       a  SR                  X8R                   45      OUR                   U5        MD     UR                   HB  n	U R                  U(       a  SR                  X9R                   45      OU	R                   U5        MD     g)a0  Adds the FileDescriptorProto and its types to this database.

Args:
  file_desc_proto: The FileDescriptorProto to add.
Raises:
  DescriptorDatabaseConflictingDefinitionError: if an attempt is made to
    add a proto with the same name but different definition than an
    existing proto in the database.
z0%s already added, but with different descriptor.NÚ.)Únamer   r   ÚpackageÚmessage_typeÚ_ExtractSymbolsÚ
_AddSymbolÚ	enum_typeÚjoinÚvaluer   Ú	extensionÚservice)
r   Úfile_desc_protoÚ
proto_namer    Úmessager   ÚenumÚ
enum_valuer'   r(   s
             r   ÚAddÚDescriptorDatabase.Add   s„  € ð !×%Ñ%€JØ×7Ñ7Ó7Ø3B×$Ñ$ ZÒ0Ø	×	'Ñ	'¨
Ñ	3°Ó	FÜ8Ø
<¸zÑ
IóKð Kð ð ×%Ñ%€GØ"×/Ô/ˆÜ! 'Ö3ˆ$Ø�‰˜Ö.ó 4ñ 0ð  ×)Ô)ˆØ
‡o�oÞ-4ˆ3�8‰8�WŸi™iÐ(Ô)¸$¿)¹)Ø
ôð Ÿ
œ
ˆ*ð ð 	×(Ñ(Þ4;ˆC�H‰H�gŸ™Ð/Ô0ÀÇÁó	
ó #ñ *ð %×.Ô.ˆ	Ø
‡o�oÞ29ˆ3�8‰8�WŸn™nÐ-Ô.¸y¿~¹~Ø
öñ /ð
 #×*Ô*ˆØ
‡o�oÞ07ˆ3�8‰8�WŸl™lÐ+Ô,¸W¿\¹\Ø
öò +r   c                 ó    • U R                   U   $ )a�  Finds the file descriptor proto by file name.

Typically the file name is a relative path ending to a .proto file. The
proto with the given name will have to have been added to this database
using the Add method or else an error will be raised.

Args:
  name: The file name to find.

Returns:
  The file descriptor proto matching the name.

Raises:
  KeyError if no file by the given name was added.
)r   )r   r   s     r   ÚFindFileByNameÚ!DescriptorDatabase.FindFileByNameJ   s   € ð" ×)Ñ)¨$Ñ/Ð/r   c                 óR  • UR                  S5      S:X  a5  US   S:X  a,  UR                  S5      n[        R                  " S[        5         U R
                  U   $ ! [         aA    UR                  S5      u  n  n U R
                  U   s $ ! [         a    [        U5      ef = ff = f)aj  Finds the file descriptor proto containing the specified symbol.

The symbol should be a fully qualified name including the file descriptor's
package and any containing messages. Some examples:

'some.package.name.Message'
'some.package.name.Message.NestedEnum'
'some.package.name.Message.some_field'

The file descriptor proto containing the specified symbol must be added to
this database using the Add method or else an error will be raised.

Args:
  symbol: The fully qualified symbol name.

Returns:
  The file descriptor proto containing the symbol.

Raises:
  KeyError if no file contains the specified symbol.
r   é   r   zaPlease remove the leading "." when FindFileContainingSymbol, this will turn to error in 2026 Jan.)ÚcountÚlstripÚwarningsÚwarnÚRuntimeWarningr   ÚKeyErrorÚ
rpartition)r   ÚsymbolÚ	top_levelÚ_s       r   ÚFindFileContainingSymbolÚ+DescriptorDatabase.FindFileContainingSymbol]   s±   € ð, ‡|�|�CÓ˜AÓ &¨¡)¨sÓ"2Ø�}‰}˜SÓ!€fÜ‡m‚mðô ô	ðØ×-Ñ-¨fÑ5Ð5øÜó ð ×)Ñ)¨#Ó.�o€i��AðØ×/Ñ/°	Ñ:Ò:øÜó ä�vÓÐðúðús$   ÁA ÁB&Á;BÂ	B&ÂB"Â"B&c                 ó   • g r   r   )r   Úextendee_nameÚextension_numbers      r   ÚFindFileContainingExtensionÚ.DescriptorDatabase.FindFileContainingExtensionŠ   s   € àr   c                 ó   • / $ r   r   )r   rB   s     r   ÚFindAllExtensionNumbersÚ*DescriptorDatabase.FindAllExtensionNumbersŽ   s   € à€Ir   c                 óÞ   • XR                   ;   aP  SUR                  -   S-   U-   S-   U R                   U   R                  -   S-   n[        R                  " U[        5        X R                   U'   g )NzConflict register for file "z": z is already defined in file "Ú")r   r   r7   r8   r9   )r   r   r)   Úwarn_msgs       r   r#   ÚDescriptorDatabase._AddSymbol’   s|   € Ø×/Ñ/Ó/Ø0°?×3GÑ3GÑGØñØñà1ñ2ð ×2Ñ2°4Ñ8×=Ñ=ñ>ð ADñD€hô ‡m‚m�HœnÔ-Ø-<×$Ñ$ TÒ*r   r   N)r   r   r	   r
   r   r   r.   r1   r?   rD   rG   r#   r   r   r   r   r   r      s*   † ÙMò*ò*òX0ò&+òZòõ=r   r   c              #   ó  #   • U(       a  US-   U R                   -   OU R                   nUv •  U R                   H  n[        X25       H  nUv •  M	     M     U R                   H!  nSR	                  X%R                   45      v •  M#     g7f)zßPulls out all the symbols from a descriptor proto.

Args:
  desc_proto: The proto to extract symbols from.
  package: The package containing the descriptor type.

Yields:
  The fully qualified name found in the descriptor.
r   N)r   Únested_typer"   r$   r%   )Ú
desc_protor    Úmessage_namerN   r<   r$   s         r   r"   r"   œ   ss   é € ö 5<�˜3‘ §¡Ò0ÀÇÁ€,ØÒØ×+Ô+€kÜ! +Ö<ˆØ„ló =ñ ,ð ×'Ô'€iØ
�(‰(�L§.¡.Ð1Ó
2Ô2ò (ùs   ‚BB)	r   Ú
__author__r7   Ú	Exceptionr   r   Úobjectr   r"   r   r   r   Ú<module>rT      s@   ðñ 1à1€
ã ôˆIô ôP°5ô PôB=˜ô B=óJ3r   