o
    7f                     @   s  d Z ddlZddlZddlZddlZddlZddlZddlZddlm	Z	m
Z
mZmZmZmZmZmZmZ ddlmZ dZdZdZd	Zd
ZdZeZejejeje dZ!dddddedfddddddeefddddfZ"dZ#dZ$dZ%dZ&G dd dZ'G dd  d Z(G d!d" d"Z)G d#d$ d$Z*G d%d& d&Z+G d'd( d(Z,G d)d* d*ej-Z.d+e
e/e	f d,e
e/e	f fd-d.Z0d/ee/ d,eej1ej2ee/ f fd0d1Z3d2ee/ d,ee/ fd3d4Z4d5e/d6ee/ d,dfd7d8Z5d5e/d9ee/ d,dfd:d;Z6d<e/de/d=e
e/e)f d,dfd>d?Z7d5e/d=e
e/e)f d9ee/ d,dfd@dAZ8d5e/dBe9d,e9fdCdDZ:d5e/d,e9fdEdFZ;dGe/dHe/d,e/fdIdJZ<dKe/dLee/ dMe)dNe=dOe*d,ee9e/f fdPdQZ>dRee/ dSe=dTee=e=f d,dfdUdVZ?dWe/dXeee/  d,e/fdYdZZ@dWe/d[ee/ dXeee/  d,ee/ fd\d]ZAdWe/d[ee/ dXeee/  d,eee/  fd^d_ZBd`eee/  dKe/d[ee/ dXeee/  daee/ dbee/ d,eee/  fdcddZCd5e/dOe*deee+ d=e
e/e)f d6ee/ dfe,d[ee/ dXeee/  daee/ dbee/ dTeee=e=f  dgej1d,e=fdhdiZDd,e=fdjdkZEd/e/d,e=fdldmZFdS )nzu
Copyright (C) 2010-2011  Lucas De Marchi <lucas.de.marchi@gmail.com>
Copyright (C) 2011  ProFUSION embedded systems
    N)	AnyDictListMatchOptionalPatternSequenceSetTuple   )__version__u   [\w\-'’]+zK(\b(?:https?|[ts]?ftp|file|git|smb)://[^\s]+(?=$|\s)|\b[\w.%+-]+@[\w.-]+\b)))'u   ’)utf-8z
iso-8859-1z*
	%prog [OPTIONS] [file1 file2 ... fileN]
)enen_GBen_USen_CAen_AUdataclearzfor unambiguous errors F)rarez7for rare (but valid) words that are likely to be errors_rareNNNNinformalz%for making informal words more formal	_informalT)usagez-for replacing phrasing with recommended terms_usageNNNN)codezcfor words from code and/or mathematics that are likely to be typos in other contexts (such as uint)_codeNNNN)namesz*for valid proper names that might be typos_namesNNNN)zen-GB_to_en-USz#for corrections from en-GB to en-USz_en-GB_to_en-USTT)r   )r   z
clear,rare@   A   c                   @   s(   e Zd ZdZdZdZdZdZdZdZ	dS )	QuietLevelsr   r                   N)
__name__
__module____qualname__NONEENCODINGBINARY_FILEDISABLED_FIXESNON_AUTOMATIC_FIXESFIXESCONFIG_FILES r3   r3   Q/home/ertert/spirit/venv/lib/python3.10/site-packages/codespell_lib/_codespell.pyr#      s    r#   c                   @   s4   e Zd Zdee ddfddZdedefddZdS )		GlobMatchpatternreturnNc                 C   s(   |  |rd |d| _d S d | _d S N,)joinsplitpattern_list)selfr6   r3   r3   r4   __init__   s   
zGlobMatch.__init__filenamec                    s&   | j d u rdS t fdd| j D S )NFc                 3   s    | ]	}t   |V  qd S N)fnmatch.0pr?   r3   r4   	<genexpr>       z"GlobMatch.match.<locals>.<genexpr>)r<   anyr=   r?   r3   rE   r4   match   s   
zGlobMatch.match)r)   r*   r+   r   strr>   boolrJ   r3   r3   r3   r4   r5      s    r5   c                   @   s&   e Zd ZdedededdfddZdS )Misspellingr   fixreasonr7   Nc                 C   s   || _ || _|| _d S r@   )r   rN   rO   )r=   r   rN   rO   r3   r3   r4   r>      s   
zMisspelling.__init__)r)   r*   r+   rK   rL   r>   r3   r3   r3   r4   rM      s    rM   c                   @   s    e Zd ZdddZdddZdS )
TermColorsr7   Nc                 C   s   d| _ d| _d| _d| _d S )Nz[33mz[31mz[32mz[0mFILEWWORDFWORDDISABLEr=   r3   r3   r4   r>         
zTermColors.__init__c                 C   s   d| _ d| _d| _d| _d S )Nr   rQ   rV   r3   r3   r4   disable   rW   zTermColors.disabler7   N)r)   r*   r+   r>   rX   r3   r3   r3   r4   rP      s    
rP   c                   @   s6   e Zd Zd
ddZdeddfddZdefdd	ZdS )Summaryr7   Nc                 C   s
   i | _ d S r@   summaryrV   r3   r3   r4   r>      s   
zSummary.__init__	wrongwordc                 C   s.   || j v r| j |  d7  < d S d| j |< d S Nr   r[   )r=   r]   r3   r3   r4   update   s   
zSummary.updatec                    s.   t  j }|  d fdd|D S )N
c                    s,   g | ]}|  j |d t|  qS )   )r\   getlen)rC   keyrV   r3   r4   
<listcomp>   s   , z#Summary.__str__.<locals>.<listcomp>)listr\   keyssortr:   )r=   rg   r3   rV   r4   __str__   s
   zSummary.__str__rY   )r)   r*   r+   r>   rK   r_   ri   r3   r3   r3   r4   rZ      s    
rZ   c                   @   s   e Zd ZdededdfddZdddZd	edee	e ef fd
dZ
d	edee	e ef fddZd	edee	e ef fddZdS )
FileOpeneruse_chardetquiet_levelr7   Nc                 C   s   || _ |r	|   || _d S r@   )rk   init_chardetrl   )r=   rk   rl   r3   r3   r4   r>      s   
zFileOpener.__init__c                 C   s4   zddl m} W n ty   tdw | | _d S )Nr   )UniversalDetectorznThere's no chardet installed to import from. Please, install it and check your PYTHONPATH environment variable)chardet.universaldetectorrn   ImportErrorencdetector)r=   rn   r3   r3   r4   rm      s   zFileOpener.init_chardetr?   c                 C   s   | j r| |S | |S r@   )rk   open_with_chardetopen_with_internalrI   r3   r3   r4   open   s   

zFileOpener.openc                 C   s   | j   t|d}|D ]}| j | | j jr nqW d    n1 s&w   Y  | j   | j jd }z	t||dd}W n& tyQ   td| t	j
d   tye   td| d| t	j
d  w | }|  ||jfS )	Nrbencodingr   rv   newlinez"ERROR: Could not detect encoding: filez)ERROR: Don't know how to handle encoding : )rq   resetrt   feeddonecloseresultUnicodeDecodeErrorprintsysstderrLookupError	readlinesrv   )r=   r?   fblinerv   flinesr3   r3   r4   rr      s4   


zFileOpener.open_with_chardetc              
   C   s   d }d}t D ]^}|rd}n| jtj@ std| dtjd t||dd7}z| }W n t	yH   | jtj@ sFtd| d	| tjd Y nw 	 W d     ||fS W d    n1 s_w   Y  qt
d
)NTFzWARNING: Trying next encoding ""ry   r   rw   z,WARNING: Cannot decode file using encoding "z": zUnknown encoding)	encodingsrl   r#   r-   r   r   r   rt   r   r   	Exception)r=   r?   rv   	first_tryr   r   r3   r3   r4   rs      s6   zFileOpener.open_with_internalrY   )r)   r*   r+   rL   intr>   rm   rK   r
   r   rt   rr   rs   r3   r3   r3   r4   rj      s    
"rj   c                   @   s*   e Zd ZdZdededee fddZdS )NewlineHelpFormatterz<Help formatter that preserves newlines and deals with lists.textwidthr7   c                    s   | d}g }|D ]C}d}||rt| nd | d  }| jd| }t||  } fdd|D } rG||d  d   |d< || q	|S )Nr`   z- r    c                    s   g | ]}d   | qS )r   r3   rB   offsetr3   r4   re   )  s    z5NewlineHelpFormatter._split_lines.<locals>.<listcomp>)	r;   
startswithrc   _whitespace_matchersubstriptextwrapwrapextend)r=   r   r   partsoutpartindent_startr3   r   r4   _split_lines  s   


z!NewlineHelpFormatter._split_linesN)r)   r*   r+   __doc__rK   r   r   r   r3   r3   r3   r4   r     s    r   	toml_dictr7   c                 C   s   dd |   D S )zKConvert a dict read from a TOML file to the parseconfig.read_dict() format.c                 S   s*   i | ]\}}|d ur||du rdn|qS )FTr   r3   )rC   kvr3   r3   r4   
<dictcomp>2  s   * z(_toml_to_parseconfig.<locals>.<dictcomp>)items)r   r3   r3   r4   _toml_to_parseconfig0     r   argsc              
   C   s\  t jtd}|jtj d |jddtd |jdddd	d
d |jdddd	dd |jdddddd |jddddd d	dgdd t
D  }|jddtd d!| d" d# |jd$d%td&d' |jd(d)dd*d+d, |jd-d.dd/d0d, |jd1dd/d2d, |jd3d4d%td5d' |jd6d%td7d' |jd8d9ddd:d |jd;ddd<d |jd=d>dd?d |jd@dAtd*dBdC |jdDdEd%tdFdGdH |jdIdJd%tdKdLdH |jdMdNdddOd |jdPdQdddRd |jdSdTdddUd |jdVdWtdXdYdC |jdZd[tdXd\dC |jd]d^tdXd_dC |jd`tdadb |jdctdddb |jdedfdgdh |t| }didjg}|jr7||j tjd dk}g }d}tjdlrM|dl |jrY||j dm}|rtjdnkrgdFd l}n'zdFd l}W n  ty }	 z|rtdo|	 d d }W Y d }	~	nd }	~	ww |d ur|D ]4}
t|
dp}||dqi }W d    n	1 sw   Y  dr|v rt|dr |dr< | | qg }|D ]}t }|!| |"drr|| q|!| |"drrg }|dr D ]}|ds|  |dr | }|r|| q||}|jt| |dt}|j#s)|j#du |||fS )vN)formatter_classcolorsz	--versionversion)actionr   z-dz--disable-colorsstore_falser   zGdisable colors, even when printing to terminal (always set for Windows))r   desthelpz-cz--enable-colors
store_truez1enable colors, even when not printing to terminalz-wz--write-changesFz"write changes in place if possible)r   defaultr   z-Dz--dictionaryappendzcustom dictionary file that contains spelling corrections. If this flag is not specified or equals "-" then the default dictionary is used. This option can be specified multiple times.)r   r   z
- r   c                 S   s"   g | ]}|d  d|d  qS )r   r   r   r3   )rC   dr3   r3   r4   re   _  s   " z!parse_options.<locals>.<listcomp>z	--builtinbuiltinzBUILTIN-LISTzpcomma-separated list of builtin dictionaries to include (when "-D -" or no "-D" is passed). Current options are:z
The default is %(default)r.)r   r   metavarr   z--ignore-regexstorezregular expression that is used to find patterns to ignore by treating as whitespace. When writing regular expressions, consider ensuring there are boundary non-word chars, e.g., "\bmatch\b". Defaults to empty/disabled.)r   typer   z-Iz--ignore-wordsrR   zfile that contains words that will be ignored by codespell. File must contain 1 word per line. Words are case sensitive based on how they are written in the dictionary file)r   r   r   z-Lz--ignore-words-listWORDSzcomma separated list of words to be ignored by codespell. Words are case sensitive based on how they are written in the dictionary filez--uri-ignore-words-listzcomma separated list of words to be ignored by codespell in URIs and emails only. Words are case sensitive based on how they are written in the dictionary file. If set to "*", all misspelling in URIs and emails will be ignored.z-rz--regexzregular expression that is used to find words. By default any alphanumeric character, the underscore, the hyphen, and the apostrophe are used to build words. This option cannot be specified together with --write-changes.z--uri-regexzZregular expression that is used to find URIs and emails. A default expression is provided.z-sz	--summaryzprint summary of fixesz--countz5print the number of errors as the last line of stderrz-Sz--skipzcomma-separated list of files to skip. It accepts globs as well. E.g.: if you want codespell to skip .eps and .txt files, you'd give "*.eps,*.txt" to this option.z-xz--exclude-filezuignore whole lines that match those in the file FILE. The lines in FILE should match the to-be-excluded lines exactly)r   r   r   z-iz--interactiver   zset interactive mode when writing changes:
- 0: no interactivity.
- 1: ask for confirmation.
- 2: ask user to choose one fix when more than one is available.
- 3: both 1 and 2)r   r   r   r   z-qz--quiet-level"   a  bitmask that allows suppressing messages:
- 0: print all messages.
- 1: disable warnings about wrong encoding.
- 2: disable warnings about binary files.
- 4: omit warnings about automatic fixes that were disabled in the dictionary.
- 8: don't print anything for non-automatic fixes.
- 16: don't print the list of fixed files.
- 32: don't print configuration files.
As usual with bitmasks, these levels can be combined; e.g. use 3 for levels 1+2, 7 for 1+2+4, 23 for 1+2+4+16, etc. The default mask is %(default)s.z-ez--hard-encoding-detectionzuse chardet to detect the encoding of each file. This can slow down codespell, but is more reliable in detecting encodings other than utf-8, iso8859-1, and ascii.z-fz--check-filenameszcheck file names as wellz-Hz--check-hiddenzEcheck hidden files and directories (those starting with ".") as well.z-Az--after-contextLINESzprint LINES of trailing contextz-Bz--before-contextzprint LINES of leading contextz-Cz	--contextz"print LINES of surrounding contextz--configzpath to config file.)r   r   z--tomlzpath to a pyproject.toml file.files*zfiles or directories to check)nargsr   z	setup.cfgz.codespellrc)interpolationzpyproject.tomlT)      zUtomllib or tomli are required to read pyproject.toml but could not be imported, got: ru   tool	codespellz--)	namespace.)$argparseArgumentParserr   set_defaultsr   stdoutisattyadd_argumentVERSIONr:   _builtin_dictionaries_builtin_defaultrK   r   
parse_argsrf   configr   configparserConfigParserospathisfiletomlversion_infotomllibtomlirp   rt   loadrb   r   	read_dictreadhas_sectionr   )r   parserbuiltin_optsoptions	cfg_filesr   
toml_filestomllib_raise_errorr   e	toml_filer   r   used_cfg_filescfg_file_cfgcfg_argsrd   valr3   r3   r4   parse_options5  s  	

	












r   ignore_words_optionc                 C   s6   t  }| r| D ]}|dD ]	}||  qq|S r8   )setr;   addr   )r   ignore_wordscomma_separated_wordswordr3   r3   r4   parse_ignore_words_optionc  s   r   r?   exclude_linesc                 C   sF   t | dd}|D ]}|| q	W d    d S 1 sw   Y  d S Nr   rv   )rt   r   )r?   r   r   r   r3   r3   r4   build_exclude_hashesl  s
   "r   r   c                 C   sJ   t | dd}|D ]	}||  q	W d    d S 1 sw   Y  d S r   )rt   r   r   )r?   r   r   r   r3   r3   r4   build_ignore_wordsr  s
   "r   rd   misspellingsc                 C   sJ   |  }d|v rd}|dd\}}| }nd}d}t||||| < d S )Nr9   Fr   Tr   )r   rsplitlstriprM   )rd   r   r   rN   rO   r3   r3   r4   add_misspellingx  s   
r   c                 C   s   t | ddM}dd tD }|D ]:}|d\}}| }| }||vr+t||| |D ]\}}	||v rI||	}
||	}|
|vrIt|
|| q-qW d    d S 1 sVw   Y  d S )Nr   r   c                 S   s    g | ]\}}|t ||fqS r3   )rK   	maketrans)rC   xyr3   r3   r4   re     s     zbuild_dict.<locals>.<listcomp>z->)rt   	alt_charsr;   lowerr   	translate)r?   r   r   r   translate_tablesr   rd   r   r   tablealt_keyalt_datar3   r3   r4   
build_dict  s$   

"r  check_hiddenc                 C   s&   t j| }|dvo| o|d dkS )N)r   r   z..r   r   )r   r   basename)r?   r	  	bfilenamer3   r3   r4   	is_hidden  s   r  c                 C   sD   t | dd}|d}W d    d|vS 1 sw   Y  d|vS )Nru   )modei       )rt   r   )r?   r   sr3   r3   r4   is_text_file  s   
r  r   fixwordc                 C   s>   | |   krddd |dD S | |  kr| S |S )Nz, c                 s   s    | ]	}|   V  qd S r@   )r   
capitalizerC   wr3   r3   r4   rF     rG   zfix_case.<locals>.<genexpr>r9   )r  r:   r;   upper)r   r  r3   r3   r4   fix_case  s
   r  r   rJ   misspellinginteractivityr   c              	   C   s  |  }|dkr|jt||jfS | d |   |j | |j | | d   }|jrm|d@ rmd}t||j}|set| d| d| dddd t	j
   }|sYd	}|d
vrctd d}|r<|dkrld|_nn|d@ r|jsd}dd |jdD }	|st| ddd t|	D ]\}
}t||}td|
 d| dd qtdddd t	j
  }|snz
t|}
|	|
 }W n ttfy   td Y nw |r|rd|_||_|jt||jfS )Nr   r   r   	 ==> z (Y/n) T)endflushY)r  NzSay 'y' or 'n'r  Fr$   c                 S   s   g | ]}|  qS r3   )r   r  r3   r3   r4   re     s    z$ask_for_word_fix.<locals>.<listcomp>r9   z$ Choose an option (blank for none): r  r   z) r{   zNot a valid option
)grouprN   r  r   startrS   rU   r  r   r   stdinreadliner   r  rO   r;   	enumerater   
ValueError
IndexError)r   rJ   r  r  r   r]   line_uirr  optionr3   r3   r4   ask_for_word_fix  sf    	
r-  r   indexcontextc                 C   sj   t ||d  ||d  d D ]#}d|  krt| k r2n qt||kr&dnd d| |    qd S )Nr   r   >:r   )rangerc   r   rstrip)r   r.  r/  r*  r3   r3   r4   print_context  s
   "&r4  r   ignore_word_regexc                 C   s   |r| d| } | S )Nr   )r   )r   r5  r3   r3   r4   _ignore_word_sub  s   r6  
word_regexc                 C   s   | t| |S r@   )findallr6  r   r7  r5  r3   r3   r4   extract_words  s   r:  c                 C   s   t |t| |S r@   )rf   finditerr6  r9  r3   r3   r4   extract_words_iter  s   r<  check_matches	uri_regexuri_ignore_wordsc           
      C   sv   |s| S t ||D ].}t|||D ]%}||v r7t| D ]\}}	|	 |kr6| d | | |d d   }  nqqq
| S r^   )rer8  r:  r$  r   )
r=  r   r7  r5  r>  r?  uriuri_wordr*  rJ   r3   r3   r4   apply_uri_ignore_words  s   rC  r\   file_openerr   c           %      C   s  d}d }d}t d }| dkrtj}| }n|jrt| ||D ]t}| }||vr*q|| j}t||| j	}|r@|r@|
| |j |  |j }|j | |j }|j | |j }|| j}|rx|jtj@ rlqd|j | |j }n	|jtj@ rqd}|d7 }t| d| d| |  qtj| s|S zt| }W n, ty } ztd	|j d|  tjd
 |W  Y d }~S d }~w ty   | Y S w |s|jtj@ std|  tjd
 |S z	|| \}}W n ty   | Y S w t|D ]q\}}||v rqt  }t  }d|	v r|!d|}t"|||} d|	vr,t#| |||||	} | D ]>}!|!$ }| }||v rl|!% d }"|"dkra||" dkra|&dra|dd  |vraq.d}#|| j}t||| j	}|j'r||vr|
d urd}#t(|||
 t)|| |!|| |j'|d\}}|*| |r|r|
| ||v rq.|j+r|rd}t,!d| d||| ||< |*| q.|j'd@ r|s|| jsݐq.|j |  |j }|j |d  |j }$|j | |j }|j | |j }|| j}|r$|jtj@ rq.d|j | |j }n|jtj@ r-q.d}|d7 }|#sA|
d urAt(|||
 | dkrYt| d|$ d| d| |  q.t|$ d|-  d| d| |  q.q|r| dkrtd |D ]	}t|dd q}|S |jtj.@ st|j d|j d|  tjd
 t| d|dd}|/| W d    |S 1 sw   Y  |S )Nr   F-z  | r   r   r{   r  z	WARNING: ry   zWARNING: Binary file: r   r   \)abr   r,  r(  tr   Tr   z\br$   r1  z
	z---r  zFIXED:r  rw   )0r   r   r"  r   check_filenamesr:  r  rN   r  r   r_   rR   rU   rS   rT   rO   rl   r#   r/   r0   r   r   r   r   r  PermissionErrorstrerrorr   OSErrorr.   rt   r$  r   r   r<  rC  r   r!  r   interactiver4  r-  r   write_changesr@  r   r1   
writelines)%r?   r   r\   r   r   rD  r7  r5  r>  r?  r/  r   	bad_countr   changedrv   r   r   lwordrN   r  	cfilename
cwrongword
crightwordrO   creasonr   r   r*  r   fixed_words	asked_forr=  rJ   char_before_idxcontext_showncliner3   r3   r4   
parse_file1  s:  


















V
	
r]  c                   C   s   t tjdd  S )zWrap to main() for setuptools.r   N)mainr   argvr3   r3   r3   r4   _script_main  r   r`  c            #         s  t | \}}jtj@ s,t|dkrtd t|ddD ]\}}td| d|  qjr?jr?tdt	j
d |  tS jpCt}zt|}W n' tjyr } ztd	| d
| dt	j
d |  tW  Y d}~S d}~ww jrztj}W n* tjy } ztdj d
| dt	j
d |  tW  Y d}~S d}~ww d}jpg }tj}	|D ]}
tj|
std|
 t	j
d |  t  S t|
|	 qjpt}zt|}W n( tjy	 } ztd| d
| dt	j
d |  tW  Y d}~S d}~ww tj}jrjndg}g }|D ]k}|dkrittj d}|D ]6}t!D ]}|d |krO|"tj#t$d|d  d  nq4td| t	j
d |  t    S q0qtj|std| t	j
d |  t  S |"| qi }|D ]	}t%|||	 qt& }j'rt	j(dkr|)  j*rt+ }nd}d}j,durވj-dusƈj.durtdt	j
d |  tS t/dj,}||f}n,j-dusj.dur
d}d}j-durt/dj-}j.durt/dj.}||f}t }j0rt1j0| t2j3j}t4j5 z 6d W n tjy>   tdt	j
d t Y S w d}j7D ]}t8|j9rOqDtj:|rt;|D ]a\}}}  6|rm|dd= q[t8|j9rvq[| D ]4}!t8|!j9rqx 6|!rqxtj#||!}" 6|"rqx|t<|"||||||||||7 }qx fdd|D |dd< q[qD 6|s|t<|||||||||||7 }qD|rtd t| j=rt|t	j
d |rt>S t?S )zContains flow controlr   zUsed config files:r   )r!  z    r{   z;ERROR: --write-changes cannot be used together with --regexry   zERROR: invalid --regex "z" ()NzERROR: invalid --ignore-regex "z&ERROR: cannot find ignore-words file: zERROR: invalid --uri-regex "rE  r9   
dictionaryr$   z.txtz#ERROR: Unknown builtin dictionary: z$ERROR: cannot find dictionary file: win32zZERROR: --context/-C cannot be used together with --context-before/-B or --context-after/-Az/random/pathzNERROR: --skip/-S has been fed an invalid glob, try escaping special charactersc                    s&   g | ]}  |st|js|qS r3   )rJ   r  r	  )rC   dir_
glob_matchr   r3   r4   re     s    
zmain.<locals>.<listcomp>z
-------8<-------
SUMMARY:)@r   rl   r#   r2   rc   r   r$  regexrO  r   r   
print_helpEX_USAGEword_regex_defr@  compileerrorignore_regexr   r   ignore_words_listr   r   r   r   r>  uri_regex_defuri_ignore_words_listrb  sortedr   r   r;   r   r   r:   
_data_rootr  rP   r   platformrX   r\   rZ   r/  before_contextafter_contextmaxexclude_filer   rj   hard_encoding_detectionr5   skiprJ   r   r  r	  isdirwalkr]  count
EX_DATAERREX_OK)#r   r   r   ifiler   r7  r   r5  ignore_words_filesr   ignore_words_filer>  r?  dictionariesuse_dictionariesrb  useur   r   r   r\   r/  context_bothcontext_beforecontext_afterr   rD  rQ  r?   rootdirsr   file_fnamer3   re  r4   r^    sz  










&r^  )Gr   r   r   rA   r   r@  r   r   typingr   r   r   r   r   r   r   r	   r
   _versionr   r   rj  ro  r  r   USAGEsupported_languages_ensupported_languagesr   r:   dirnamerealpath__file__rr  r   r   r~  ri  r}  r#   r5   rM   rP   rZ   rj   HelpFormatterr   rK   r   	Namespacer   r   r   r   r   r   r  rL   r  r  r  r   r-  r4  r6  r:  r<  rC  r]  r`  r^  r3   r3   r3   r4   <module>   sR  ,
				>

T"
  0	






>



	










	

 G