Files
sirh/venv/lib/python3.12/site-packages/sqlparse/__pycache__/cli.cpython-312.pyc

58 lines
8.3 KiB
Plaintext
Raw Normal View History

2026-04-29 11:52:03 +02:00
<EFBFBD>
<00><><EFBFBD>i<00><00>R<00>dZddlZddlZddlmZddlZddlmZd<05>Zd<06>Z d<07>Z
d d<08>Z y)
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
<EFBFBD>N)<01> TextIOWrapper)<01> SQLParseErrorc <00>J<00>gd<01>}tjddd<04><05>}|jddd<08> <09>|jd
d d d d<0E><0F>|jddddd<14><15>|jddtj<00><18>|j d<19>}|jdddd|dj djd <20>|D<00><00><00><00>!<21>|jd"d#dd$|d%j djd&<26>|D<00><00><00><00>!<21>|jd'd(d)d*d+d,gd-<2D>!<21>|jd.d/ddd0<64><15>|jd1d2d3ddd4<64><15>|jd5d6d7td8<64>9<EFBFBD>|jd:d;ddd<<3C><15>|jd=d>ddd?<3F><15>|jd@dAdddB<64>C<EFBFBD>|jdDdEdddF<64>C<EFBFBD>|jdGdHdItdJ<64>9<EFBFBD>|jdKdLdtdM<64>9<EFBFBD>|jdNdOdtdP<64>9<EFBFBD>|jdQdRdSdT<64>U<EFBFBD>|S)VN)<03>upper<65>lower<65>
capitalize<EFBFBD> sqlformatzEFormat FILE according to OPTIONS. Use "-" as FILE to read from stdin.z"%(prog)s [OPTIONS] FILE [FILE ...])<03>prog<6F> description<6F>usage<67>filename<6D>+z%file(s) to format (use "-" for stdin))<02>nargs<67>helpz-oz --outfile<6C>outfile<6C>FILEz)write output to FILE (defaults to stdout))<03>dest<73>metavarrz
--in-place<63>inplace<63>
store_trueFz0format files in-place (overwrite existing files))r<00>action<6F>defaultrz --version<6F>version)rrzFormatting Optionsz-kz
--keywords<64>CHOICE<43> keyword_casez,change case of keywords, CHOICE is one of {}z, c3<00>(K<00>|]
}d|<01>d<00><03><01><00> y<01>w<01><02>"N<><00><02>.0<EFBFBD>xs <20>I/home/fatima/modif/sirh/venv/lib/python3.12/site-packages/sqlparse/cli.py<70> <genexpr>z create_parser.<locals>.<genexpr>G<00><00><00><><00>6<>1<EFBFBD><01>!<21><13>A<EFBFBD>h<EFBFBD>6<><36><00>)rr<00>choicesrz-iz --identifiers<72>identifier_casez/change case of identifiers, CHOICE is one of {}c3<00>(K<00>|]
}d|<01>d<00><03><01><00> y<01>wrrr s r#r$z create_parser.<locals>.<genexpr>Or%r&z-lz
--language<67>LANG<4E> output_format<61>python<6F>phpzJoutput a snippet in programming language LANG, choices are "python", "php"z--strip-comments<74>strip_commentszremove commentsz-rz
--reindent<6E>reindentzreindent statementsz--indent_width<74> indent_width<74>z(indentation width (defaults to 2 spaces))rr<00>typerz--indent_after_first<73>indent_after_firstz2indent after first line of statement (e.g. SELECT)z--indent_columns<6E>indent_columnsz<indent all columns by indent_width instead of keyword lengthz-az--reindent_alignedz%reindent statements to aligned format)rrrz-sz--use_space_around_operatorsz*place spaces around mathematical operatorsz --wrap_after<65>
wrap_afterrz*Column after which lists should be wrappedz --comma_first<73> comma_firstz-Insert linebreak before comma (default False)z --compact<63>compactz2Try to produce more compact output (default False)z
--encoding<6E>encodingzutf-8z*Specify the input encoding (default utf-8))rrr)
<EFBFBD>argparse<73>ArgumentParser<65> add_argument<6E>sqlparse<73> __version__<5F>add_argument_group<75>format<61>join<69>int<6E>bool)<03> _CASE_CHOICES<45>parser<65>groups r#<00> create_parserrFs<00><00>4<>M<EFBFBD> <15> $<24> $<24> <18>*<2A>2<> <06>F<EFBFBD> <0B><17><17><12><11> 4<><18>6<>
 <0B><17><17> <0C>k<EFBFBD> <16><16> 8<> <18>:<3A>  <0B><17><17><14> <16><1B><15> ?<3F> <18>A<01> <0B><17><17><13><18><18>$<24>$<24><18>&<26>
<13> %<25> %<25>&:<3A> ;<3B>E<EFBFBD> <09><16><16> <0C>l<EFBFBD><18> <1B><1D> ;<3B> B<> B<> <10>I<EFBFBD>I<EFBFBD>6<> <0A>6<> 6<>8<> <17>9<>
<EFBFBD><16><16> <0C>o<EFBFBD><18> <1E><1D> ><3E> E<> E<> <10>I<EFBFBD>I<EFBFBD>6<> <0A>6<> 6<>8<> <17>9<>
<EFBFBD><16><16> <0C>l<EFBFBD><16> <1C><19>5<EFBFBD>!<21>+<2B> <17>,<2C>
<EFBFBD><16><16><1A> <1D><1B><15> <1E> <17> <20>
<EFBFBD><16><16> <0C>l<EFBFBD> <17><1B><15> "<22> <17>$<24>
<EFBFBD><16><16><18> <1B><11> <10> 7<> <17>9<>
<EFBFBD><16><16><1E> !<21><1B><15> A<> <17>C<01>
<EFBFBD><16><16><1A> <1D><1B><15> K<> <17>M<01>
<EFBFBD><16><16> <0C>"<22><1B><15> 4<> <17>6<> 
<EFBFBD><16><16> <0C>,<2C><1B><15> 9<> <17>;<3B> 
<EFBFBD><16><16><16> <19><11> <10> 9<> <17>;<3B>
<EFBFBD><16><16><17> <1A><15> <11> <<3C> <17>><3E>
<EFBFBD><16><16><13> <16><15> <11> A<> <17>C<01>
<EFBFBD><16><16><14> <17><17> 9<> <17>;<3B> <12>M<EFBFBD>c<00>J<00>tjjd|<00>d<02><03>y)z5Print msg and optionally exit with return code exit_.z[ERROR] <20>
<EFBFBD>)<03>sys<79>stderr<72>write)<01>msgs r#<00>_errorrO<00>s <00><00><07>J<EFBFBD>J<EFBFBD><14><14>x<EFBFBD><03>u<EFBFBD>B<EFBFBD>'<27>(<28> rGc<00><><00>|dk(r|jr td<02>S|dk(rQttjj
|j <00><03>} |j<00>}|j<00>n@ t||j <00><03>5}dj|j<00><00>}ddd<05>d}|jr t|d |j <00><03>}d
}nB|jr& t|jd |j <00><03>}d
}ntj}t|<01>} t j"j%|<08>}t!j(fi|<08><01>} |j+| <09>|j-<00>|r|j/<00>y #|j<00>wxYw#1swY<00><>xYw#t$r}td|<00>d|<05><00><04>cYd}~Sd}~wwxYw#t$r}td |<00>d|<05><00><04>cYd}~Sd}~wwxYw#t$r%}td |j<00>d|<05><00><04>cYd}~Sd}~wwxYw#t&$r}td |<05><00><02>cYd}~Sd}~wwxYw)zdProcess a single file with the given formatting options.
Returns 0 on success, 1 on error.
<20>-z Cannot use --in-place with stdin)r8<00>NzFailed to read z: F<>wTzFailed to open zInvalid options: r)rrOrrK<00>stdin<69>bufferr8<00>read<61>detach<63>openr@<00> readlines<65>OSErrorr<00>stdout<75>varsr<<00> formatter<65>validate_optionsrr?rM<00>flush<73>close)
r <00>args<67>wrapper<65>data<74>f<>e<> close_stream<61>stream<61>formatter_opts<74>ss
r#<00> _process_filerj<00>s<00><00> <10>3<EFBFBD><EFBFBD>4<EFBFBD><<3C><<3C><15>8<>9<>9<><10>3<EFBFBD><EFBFBD><1F><03> <09> <09> 0<> 0<>4<EFBFBD>=<3D>=<3D>I<><07> <1D><1A><<3C><<3C>><3E>D<EFBFBD> <13>N<EFBFBD>N<EFBFBD> <1C> =<3D><15>h<EFBFBD><14><1D><1D>7<> .<2E>1<EFBFBD><19>w<EFBFBD>w<EFBFBD>q<EFBFBD>{<7B>{<7B>}<7D>-<2D><04> .<2E> <19>L<EFBFBD> <0B>|<7C>|<7C> =<3D><19>(<28>C<EFBFBD>$<24>-<2D>-<2D>@<40>F<EFBFBD><1F>L<EFBFBD>
<0E><1C><1C> A<01><19>$<24>,<2C>,<2C><03>d<EFBFBD>m<EFBFBD>m<EFBFBD>D<>F<EFBFBD><1F>L<EFBFBD><15><1A><1A><06><1A>$<24>Z<EFBFBD>N<EFBFBD>/<2F>!<21>+<2B>+<2B><<3C><<3C>^<5E>L<><0E> <11><0F><0F><04>/<2F><0E>/<2F>A<EFBFBD>
<EFBFBD>L<EFBFBD>L<EFBFBD><11>O<EFBFBD>
<EFBFBD>L<EFBFBD>L<EFBFBD>N<EFBFBD><13><0E> <0C> <0C><0E> <0C><>K <14>N<EFBFBD>N<EFBFBD> <1C><> .<2E> .<2E><><16> =<3D><19>O<EFBFBD>H<EFBFBD>:<3A>R<EFBFBD><01>s<EFBFBD>;<3B><<3C> <<3C><> =<3D><><17> =<3D><19>O<EFBFBD>H<EFBFBD>:<3A>R<EFBFBD><01>s<EFBFBD>;<3B><<3C> <<3C><> =<3D><> <17> A<01><19>O<EFBFBD>D<EFBFBD>L<EFBFBD>L<EFBFBD>><3E><12>A<EFBFBD>3<EFBFBD>?<3F>@<40> @<40><> A<01><> <19>/<2F><15>)<29>!<21><13>-<2D>.<2E>.<2E><>/<2F>s<EFBFBD><00>F<00>4F5<00> F)<03>+F5<00>G<00>*$H<00>+H4<00>F&<03>)F2<07>.F5<00>5 G<03>>G<03>G<03>G<03> H<03>%G;<03>5H<03>;H<03> H1<03> H,<03>&H1<03>,H1<03>4 I<03>= I<03>
I<03>Ic<00><00>t<00>}|j|<00>}t|j<00>dkDr.|jr t d<02>S|j s t d<03>Sd}|jD]}t||<00>}|dk7s<01>|}<02>|S)NrJz+Cannot use -o/--outfile with multiple filesz&Multiple files require --in-place flagr)rF<00>
parse_args<EFBFBD>lenr rrOrrj)rarD<00> exit_coder <00>results r#<00>mainrp<00>s<><00><00> <1A>_<EFBFBD>F<EFBFBD> <11> <1C> <1C>T<EFBFBD> "<22>D<EFBFBD> <0B>4<EFBFBD>=<3D>=<3D><19>A<EFBFBD><1D> <0F><<3C><<3C><19>G<>H<> H<><13>|<7C>|<7C><19>B<>C<> C<><12>I<EFBFBD><18>M<EFBFBD>M<EFBFBD><1F><08><1E>x<EFBFBD><14>.<2E><06> <11>Q<EFBFBD>;<3B><1E>I<EFBFBD><1F> <15>rG)N) <0C>__doc__r9rK<00>iorr<<00>sqlparse.exceptionsrrFrOrjrprrGr#<00><module>rts2<00><01> <04><10>
<EFBFBD><1C><0F>-<2D>
E<12>P <0A> 4 <0A>nrG