관리-도구
편집 파일: codec.cpython-311.pyc
� P�Dg. � �: � d dl mZmZmZmZmZ ddlZddlZddlm Z m Z ej d� � Z G d� dej � � Z G d� d ej � � Z G d � dej � � Z G d� d e ej � � Z G d� de ej � � Zdej fd�ZdS )� )�encode�decode�alabel�ulabel� IDNAError� N)�Tuple�Optionalu [.。.。]c �Z � e Zd Zddededeeef fd�Zddededeeef fd�ZdS ) �Codec�strict�data�errors�returnc � � |dk r"t d� |� � � � �|sdS t |� � t |� � fS )Nr �Unsupported error handling "{}")� r )r �formatr �len��selfr r s �j/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/idna/codec.pyr zCodec.encode sN � ��X����?�F�F�v�N�N�O�O�O�� ��6��d�|�|�S��Y�Y�&�&r c � � |dk r"t d� |� � � � �|sdS t |� � t |� � fS )Nr r �� r )r r r r r s r r zCodec.decode sN � ��X����?�F�F�v�N�N�O�O�O�� ��5��d�|�|�S��Y�Y�&�&r N)r ) �__name__� __module__�__qualname__�strr �bytes�intr r � r r r r s� � � � � � �'� '�3� '�� '�5����;L� '� '� '� '�'� '�5� '�#� '�U�3��8�_� '� '� '� '� '� 'r r c �6 � e Zd Zdedededeeef fd�ZdS )�IncrementalEncoderr r �finalr c � � |dk r"t d� |� � � � �|sdS t � |� � }d}|r|d sd}|d= n |s|d= |rd}g }d}|D ]=}|� t |� � � � |r|dz }|t |� � z }�>d� |� � |z } |t |� � z }| |fS � Nr r r r ����.r r )r r �_unicode_dots_re�split�appendr r �join� r r r r% �labels�trailing_dot�result�size�label� result_strs r �_buffer_encodez!IncrementalEncoder._buffer_encode s � ��X����?�F�F�v�N�N�O�O�O�� ��5�!�'�'��-�-����� '��"�:� '�"���2�J�J�� '��2�J�� '�#&�L������ � �E��M�M�&��-�-�(�(�(�� ��� ���C��J�J��D�D� �X�X�f�%�%��4� ���L�!�!�!���4��r N)r r r r �boolr r! r5 r"