�
J�g�
� �� � d dl mZ d dlZd dlmZ d dlZd dlZd dlZd dlZd dl Z d dl
Z
d dlmZ d dl
mZ d dl
mZ d dlmZ d dlmZ d d
lmZ d dlmZ d d�Zd!d�Zd"d�Zd#d�Zd$d�ZdS )%� )�annotationsN)� ExitStack)�
ModuleType)�Any)�Optional)�
exceptions)�Template� )�compat)�CommandError�
template_file�str�dest�output_encoding�kwr �return�Nonec � � t | �� � } |j di |��� |� � }t |d� � 5 }|� |� � d d d � � d S # 1 swxY w Y d S # t j dd�� � 5 }|� t j � � � � � � |� � � � |j }d d d � � n# 1 swxY w Y t d|z � � �xY w)N)�filename�wbz.txtF)�suffix�deletezDTemplate rendering failed; see %s for a template-oriented traceback.� )r �render_unicode�encode�open�write�tempfile�NamedTemporaryFiler �text_error_template�namer ) r
r r r �template�output�f�ntf�fnames �d/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/alembic/util/pyfiles.py�template_to_filer( s� � � ��/�/�/�H��(��(�.�.�2�.�.�5�5�o�F�F�� �$��
�
� ��
�G�G�F�O�O�O� � � � � � � � � � � � ���� � � � � � ��
�
�
(��u�
E�
E�
E� ���I�I��.�0�0���!�!����(�(�
�
�
�
�H�E�
� � � � � � � � � � ���� � � � � �
+�-2�
3�
�
�
���sB � A2 �A%�%A)�,A)�2D�
AC)�D�)C- �-D�0C- �1Dr&