https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sqlparse/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sqlparse/__pycache__/cli.cpython-310.pyc
o

�e}_P�@sRdZddlZddlZddlmZddlZddlmZdd�Zdd�Z	dd	d
�Z
dS)aeModule that contains the command line app.

Why does this file exist, and why not put this in __main__?
  You might be tempted to import things from __main__ later, but that will
  cause problems: the code will get executed twice:
  - When you run `python -m sqlparse` python will execute
    ``__main__.py`` as a script. That means there won't be any
    ``sqlparse.__main__`` in ``sys.modules``.
  - When you import __main__ it will get executed again (as a module) because
    there's no ``sqlparse.__main__`` in ``sys.modules``.
  Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration
�N)�
TextIOWrapper)�
SQLParseErrorcCs�gd�}tjdddd�}|�d�|jddd	d
dd�|jd
dtjd�|�d�}|jdddd|d�d�dd�|D���d�|jdddd|d�d�dd�|D���d�|jdd d!d"d#d$gd%d�|jd&d'd(d)d*d+�|jd,d-d.d(d)d/d+�|jd0d1d2td3d4�|jd5d6d(d)d7d+�|jd8d9d(d)d:d+�|jd;d<d(d)d=d>�|jd?d@d(d)dAd>�|jdBdCdDtdEd4�|jdFdGd)t	dHd4�|jdIdJdKdLdM�|S)NN)�upper�lower�
capitalize�	sqlformatzEFormat FILE according to OPTIONS. Use "-" as FILE to read from stdin.z%(prog)s  [OPTIONS] FILE, ...)�prog�description�usage�filenamez-oz	--outfile�outfile�FILEz)write output to FILE (defaults to stdout))�dest�metavar�helpz	--version�version)�actionrzFormatting Optionsz-kz
--keywords�CHOICE�keyword_casez,change case of keywords, CHOICE is one of {}z, cs��|]}d�|�VqdS�z"{}"N��format��.0�x�r�./usr/lib/python3/dist-packages/sqlparse/cli.py�	<genexpr>?��z create_parser.<locals>.<genexpr>)rr�choicesrz-iz
--identifiers�identifier_casez/change case of identifiers, CHOICE is one of {}csrrrrrrrrGrz-lz
--language�LANG�
output_format�python�phpzJoutput a snippet in programming language LANG, choices are "python", "php"z--strip-comments�strip_comments�
store_trueFzremove comments)rr�defaultrz-rz
--reindent�reindentzreindent statementsz--indent_width�indent_width�z(indentation width (defaults to 2 spaces))rr(�typerz--indent_after_first�indent_after_firstz2indent after first line of statement (e.g. SELECT)z--indent_columns�indent_columnsz<indent all columns by indent_width instead of keyword lengthz-az--reindent_alignedz%reindent statements to aligned format)rr(rz-sz--use_space_around_operatorsz*place spaces around mathematical operatorsz--wrap_after�
wrap_afterrz*Column after which lists should be wrappedz
--comma_first�comma_firstz-Insert linebreak before comma (default False)z
--encoding�encodingzutf-8z*Specify the input encoding (default utf-8))rr(r)
�argparse�ArgumentParser�add_argument�sqlparse�__version__�add_argument_groupr�join�int�bool)�
_CASE_CHOICES�parser�grouprrr�
create_parser s��
��
���������������r>cCstj�d�|��dS)z5Print msg and optionally exit with return code exit_.z[ERROR] {}
�)�sys�stderr�writer)�msgrrr�_error�srDc

Cs�t�}|�|�}|jdkr&ttjj|jd�}z
|��}W|�	�nB|�	�wz!t
|j|jd��}d�|���}Wd�n1sAwYWnt
yb}ztd�|j|��WYd}~Sd}~wwd}|jr�z
t
|jd|jd�}d}Wnt
y�}ztd�|j|��WYd}~Sd}~wwtj}t|�}ztj�|�}Wnty�}z
td	�|��WYd}~Sd}~wwtj|fi|��}	|�|	�|��|r�|��d
S)N�-)r1�zFailed to read {}: {}F�wTzFailed to open {}: {}zInvalid options: {}r)r>�
parse_argsrrr@�stdin�bufferr1�read�detach�openr8�	readlines�OSErrorrDrr�stdout�varsr5�	formatter�validate_optionsrrB�flush�close)
�argsr<�wrapper�data�f�e�close_stream�stream�formatter_opts�srrr�main�sR


���������
r_)N)�__doc__r2r@�iorr5�sqlparse.exceptionsrr>rDr_rrrr�<module>s
w

https://t.me/RX1948 - 2025