관리-도구
편집 파일: alias_generators.cpython-311.pyc
� ���eu � �F � d Z ddlZdZdedefd�Zdedefd�Zdedefd �ZdS ) zMAlias generators for converting between different capitalization conventions.� N)� to_pascal�to_camel�to_snake�snake�returnc �X � | � � � }t j dd� |� � S )z�Convert a snake_case string to PascalCase. Args: snake: The string to convert. Returns: The PascalCase string. z([0-9A-Za-z])_(?=[0-9A-Z])c �, � | � d� � S �N� ��group��ms �N/opt/cloudlinux/venv/lib/python3.11/site-packages/pydantic/alias_generators.py�<lambda>zto_pascal.<locals>.<lambda> s � �!�'�'�!�*�*� � )�title�re�sub�r �camels r r r s* � � �K�K�M�M�E� �6�.�0D�0D�e�L�L�Lr c �N � t | � � }t j dd� |� � S )z�Convert a snake_case string to camelCase. Args: snake: The string to convert. Returns: The converted camelCase string. z (^_*[A-Z])c �P � | � d� � � � � S r )r �lowerr s r r zto_camel.<locals>.<lambda> s � �!�'�'�!�*�*�*:�*:�*<�*<� r )r r r r s r r r s) � � �e���E� �6�,� <� <�e�D�D�Dr r c � � t j dd� | � � }t j dd� |� � }|� � � S )z�Convert a PascalCase or camelCase string to snake_case. Args: camel: The string to convert. Returns: The converted string in snake_case. z([a-zA-Z])([0-9])c �\ � | � d� � � d| � d� � � �S �Nr �_� r r s r r zto_snake.<locals>.<lambda>* �( � �a�g�g�a�j�j�3O�3O�1�7�7�1�:�:�3O�3O� r z([a-z0-9])([A-Z])c �\ � | � d� � � d| � d� � � �S r r r s r r zto_snake.<locals>.<lambda>+ r r )r r r )r r s r r r ! sD � � �F�'�)O�)O�QV�W�W�E��F�'�)O�)O�QV�W�W�E��;�;�=�=�r )�__doc__r �__all__�strr r r � r r �<module>r&