+
    Qj                     V    R t ^ RIt^ RIt^ RIHt ^ RIt^ RIHt R tR t	R t
RR ltR# )	ae  Module 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                  L   . RSOp \         P                  ! RRRR7      pVP                  RRRR7       VP                  R	R
RRRR7       VP                  RRRRRR7       VP                  RR\        P                  R7       VP                  R4      pVP                  RRRRV RP                  RP                  R V  4       4      4      R 7       VP                  R!R"RR#V R$P                  RP                  R% V  4       4      4      R 7       VP                  R&R'R(R)R*R+.R,R 7       VP                  R-R.RRR/R7       VP                  R0R1R2RRR3R7       VP                  R4R5^\        R6R77       VP                  R8R9RRR:R7       VP                  R;R<RRR=R7       VP                  R>R?RRR@RA7       VP                  RBRCRRRDRA7       VP                  RERF^ \        RGR77       VP                  RHRIR\        RJR77       VP                  RKRLR\        RMR77       VP                  RNRORPRQRR7       V# )Tupper	sqlformatzEFormat FILE according to OPTIONS. Use "-" as FILE to read from stdin.z"%(prog)s [OPTIONS] FILE [FILE ...])progdescriptionusagefilename+z%file(s) to format (use "-" for stdin))nargshelpz-oz	--outfileoutfileFILEz)write output to FILE (defaults to stdout))destmetavarr   z
--in-placeinplace
store_trueFz0format files in-place (overwrite existing files))r   actiondefaultr   z	--versionversion)r   r   zFormatting Optionsz-kz
--keywordsCHOICEkeyword_casez,change case of keywords, CHOICE is one of {}z, c              3   .   "   T F  pR V R 2x  K  	  R# 5i"N .0xs   & A/var/www/idalgo/venv/lib/python3.14/site-packages/sqlparse/cli.py	<genexpr> create_parser.<locals>.<genexpr>G        61!Ah   )r   r   choicesr   z-iz--identifiersidentifier_casez/change case of identifiers, CHOICE is one of {}c              3   .   "   T F  pR V R 2x  K  	  R# 5ir   r   r   s   & r    r!   r"   O   r#   r$   z-lz
--languageLANGoutput_formatpythonphpzJoutput a snippet in programming language LANG, choices are "python", "php"z--strip-commentsstrip_commentszremove commentsz-rz
--reindentreindentzreindent statementsz--indent_widthindent_widthz(indentation width (defaults to 2 spaces))r   r   typer   z--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)r   r   r   z-sz--use_space_around_operatorsz*place spaces around mathematical operatorsz--wrap_after
wrap_afterz*Column after which lists should be wrappedz--comma_firstcomma_firstz-Insert linebreak before comma (default False)z	--compactcompactz2Try to produce more compact output (default False)z
--encodingencodingzutf-8z*Specify the input encoding (default utf-8))r   r   r   )r   lower
capitalize)
argparseArgumentParseradd_argumentsqlparse__version__add_argument_groupformatjoinintbool)_CASE_CHOICESparsergroups      r    create_parserrE      s   4M$$*2	F 4  6
 k8	  : ?  A $$  &
 %%&:;E	l;BBII6668  9 
o>EEII6668  9 
l5!+  , 
    
l"  $ 
7  9 
!A  C 
K  M 
"4	  6 
,9	  ; 
9  ; 
<  > 
A  C 
9	  ; M    c                L    \         P                  P                  RV  R24       ^# )z5Print msg and optionally exit with return code exit_.z[ERROR] 
)sysstderrwrite)msgs   &r    _errorrM      s     JJxuB'(rF   c                   V R8X  d   VP                   '       d   \        R4      # V R8X  dR   \        \        P                  P
                  VP                  R7      p VP                  4       pVP                  4        MG \        WP                  R7      ;_uu_ 4       pRP                  VP                  4       4      pRRR4       RpVP                   '       d    \        V R	VP                  R7      pR
pMHVP                  '       d'    \        VP                  R	VP                  R7      pR
pM\        P                  p\        V4      p \         P"                  P%                  V4      p\         P(                  ! X3/ TB p	TP+                  T	4       TP-                  4        T'       d   TP/                  4        ^ #   TP                  4        i ; i  + '       g   i     EL; i  \         d   p\        RT  RT 24      u Rp?# Rp?ii ; i  \         d   p\        RT  RT 24      u Rp?# Rp?ii ; i  \         d&   p\        RTP                   RT 24      u Rp?# Rp?ii ; i  \&         d   p\        RT 24      u Rp?# Rp?ii ; i)z\Process a single file with the given formatting options.

Returns 0 on success, 1 on error.
-z Cannot use --in-place with stdin)r5    NzFailed to read z: FwTzFailed to open zInvalid options: )r   rM   r   rI   stdinbufferr5   readdetachopenr?   	readlinesOSErrorr   stdoutvarsr;   	formattervalidate_optionsr   r>   rK   flushclose)
r
   argswrapperdatafeclose_streamstreamformatter_optsss
   &&        r    _process_filerh      s
    34<<<899 3		 0 04==I	<<>DNN	=h771wwq{{}- 8 L|||	=(C$--@FL 
	A$,,dmmDFL  $ZN/!++<<^L 	//A
LLO
LLNK NN 877 	=OH:Rs;<<	=  	=OH:Rs;<<	=  	AODLL>A3?@@	A  /)!-../s   F9 >G"  G<G" H $H4 I' 9GG	G" G" "H-H=HHH1H,&H1,H14I$?II$I$'J
2J?J
J
c                 :   \        4       pVP                  V 4      p \        V P                  4      ^8  d;   V P                  '       d   \        R4      # V P                  '       g   \        R4      # ^ pV P                   F  p\        W04      pV^ 8w  g   K  TpK  	  V# )   z+Cannot use -o/--outfile with multiple filesz&Multiple files require --in-place flag)rE   
parse_argslenr
   r   rM   r   rh   )r_   rC   	exit_coder
   results   &    r    mainro      s    _FT"D 4==A<<<GHH|||BCC IMMx.Q;I " rF   )N)__doc__r8   rI   ior   r;   sqlparse.exceptionsr   rE   rM   rh   ro   r   rF   r    <module>rs      s2     
   -
EP4nrF   