HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/breezy/__pycache__/static_tuple.cpython-39.pyc
a

�*�^��
@s�dZddlmZddlmZzddlmZWnFeyrZz.ddlm	Z	e	�
e�ddlmZWYdZ[n
dZ[00dd	�Zd
d�Z
dS)z1Interface thunk for a StaticTuple implementation.�)�absolute_import�)�debug)�StaticTuple)�osutilsNcCs4dtjvrt�|�St|t�s0tdt|�f��|S)a	Check if the passed object is a StaticTuple.

    Cast it if necessary, but if the 'static_tuple' debug flag is set, raise an
    error instead.

    As apis are improved, we will probably eventually stop calling this as it
    adds overhead we shouldn't need.
    Zstatic_tuplez"We expected a StaticTuple not a %s)rZdebug_flagsrZ
from_sequence�
isinstance�	TypeError�type)�obj�r�5/usr/lib/python3/dist-packages/breezy/static_tuple.py�expect_static_tuples
	


r
cCs8g}|D]&}t|tttf�r$t|�}|�|�qt|�S)z�Ensure that the object and any referenced objects are plain tuples.

    :param obj: a list, tuple or StaticTuple
    :return: a plain tuple instance, with all children also being tuples.
    )r�tuple�listr�	as_tuples�append)r
�result�itemrrrr/sr)�__doc__Z
__future__r�rZ_static_tuple_cr�ImportError�erZfailed_to_load_extensionZ_static_tuple_pyr
rrrrr�<module>s
"