| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/zmq/tests/__pycache__/ |
Upload File : |
�
mc�c� � � � d Z ddlZddlZddlmZmZmZ ddlZddlZ ej d� � ej
� ej � � Z
d� Z ed� � Z ed� � Zd� Zej
� e� � rd � ej e� � D � � Zej � ej
� e� � d
�� � ej � de� � d
� � � � � Zej
� e� � rd� ej e� � D � � Zej � de� � d� � � ZdS )z
Test our typing with mypy
� N)�PIPE�STDOUT�Popen�mypyc �� � t j � t j � t � � | � � }t j � |� � s| }|S )z�Resolve a dir in the repo
Resolved relative to zmq dir
fallback on CWD (e.g. test run from repo, zmq installed, not -e)
)�os�path�join�dirname�zmq_dir�exists)r �
resolved_paths �5/usr/lib/python3/dist-packages/zmq/tests/test_mypy.py�resolve_repo_dirr sJ � � �G�L�L������!9�!9�4�@�@�M� �7�>�>�-�(�(� ��
��� �examples�
mypy_testsc � � t t j ddgt | � � z t t
�� � }|� � � \ }}|� dd� � }t |� � |j dk s
J |� � �dS )zFRun mypy for a path
Captures output and reports it on errors
z-mr )�stdout�stderr�utf8�replacer N)
r �sys�
executable�listr r �communicate�decode�print�
returncode)� mypy_args�p�o�_�outs r �run_mypyr% $ s� � �
� ���v�&��i���8��f� � � �A�
�=�=�?�?�D�A�q�
�(�(�6�9�
%�
%�C� �#�J�J�J��<�1����c�����r c � � g | ]F}t j � t j � t |� � � � �D|��GS � )r r �isdirr
�examples_dir)�.0�ds r �
<listcomp>r, 3 sL � � � � �
�
�7�=�=�����l�A�6�6�7�7�� �� � r z!only test from examples directory)�reason�examplec �p � t j � t | � � }t d|� � d S �Nz--disallow-untyped-calls)r r r
r) r% )r. �example_dirs r �test_mypy_exampler2 : s0 � �
�'�,�,�|�W�5�5�K��
'��5�5�5�5�5r c �<