Your IP : 216.73.216.213


Current Path : /opt/alt/python33/lib64/python3.3/Doc/tools/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/Doc/tools/__pycache__/rstlint.cpython-33.pyo

�
��f�c`@s�ddlmZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZddlm
Z
ddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8dd9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUd#dVdWdXdYdZd[d\d]d^d_d`dadbg`Zdcddje�deZejdfe�Zejdg�Zejdh�ZiZididj6d�dk6Zdldm�Zedndjdo�dpdq��Zedrdjds�dtdu��Zedndr�dvdw��Zedrdjd�dxdy��Zedzdjdsdkd��d{d|��Zd}d~�Zedkr�ej eej!��ndS(�i(uwith_statementN(ujoinusplitextuabspathuexists(udefaultdictu
admonitionu	attentionucautionuclassucompoundu	containerucontentsu	csv-tableudangerudateudefault-roleuepigraphuerrorufigureufooteruheaderu
highlightsuhintuimageu	importantuincludeu
line-blocku
list-tableumetaunoteuparsed-literalu
pull-quoteurawureplaceurestructuredtext-test-directiveuroleurubricusectnumusidebarutableutarget-notesutiputitleutopicuunicodeuwarninguacksu	attributeu
autoattributeu	autoclassuautodatau
autoexceptionuautofunctionu
automethodu
automoduleucenteredu	cfunctionuclassmethoducmacrou	cmdoptionucmemberu
code-blockuconfvalucssclassuctypeu
currentmoduleucvarudatau
deprecatedudescribeu	directiveudoctestuenvvarueventu	exceptionufunctionuglossaryu	highlightu
highlightlanguindexuliteralincludeumethodumoduleumoduleauthoruproductionlistuprogramu
sectionauthoruseealsou
sourcecodeustaticmethodutabularcolumnsutestcodeu
testoutputu	testsetuputoctreeutodoutodolistuversionaddeduversionchangedu(u|u)u\.\. %s([^a-z:]|:(?!:))u(^| )`\w([^`]*?\w)?`($| )u"[a-z]::[^=]|:[a-z]+:|`|\.\.\s*\w+:iuseverityufalsepositivescs��fdd�}|S(u.Decorator to register a function as a checker.cs_x'�D]}tj|g�j|�qWx.tD]&}t||�j|t|��q1W|S(N(ucheckersu
setdefaultuappendu
checker_propsusetattruget(ufuncusuffixuprop(ukwdsusuffixes(u6/opt/alt/python33/lib64/python3.3/Doc/tools/rstlint.pyudeco8s


$uchecker.<locals>.deco((usuffixesukwdsudeco((ukwdsusuffixesu6/opt/alt/python33/lib64/python3.3/Doc/tools/rstlint.pyuchecker6sucheckeru.pyiccs�dj|�}d|krGtjdkr2d	Vn|jdd�}nyt||d�Wn7tk
r�}z|jd|fVWYdd}~XnXdS(
u'Check Python examples for valid syntax.uu
untiu\r in code fileuexecunot compilable: %sN(iu\r in code file(ujoinuosunameureplaceucompileuSyntaxErrorulineno(ufnulinesucodeuerr((u6/opt/alt/python33/lib64/python3.3/Doc/tools/rstlint.pyucheck_syntaxAsucheck_syntaxu.rsticcs�d}x�t|�D]�\}}tj|�r@|ddfVnd|krUd}q|r}tj|�r}|ddfVq|r|j�rd}qqWdS(u%Check for suspicious reST constructs.iu+comment seems to be intended as a directiveu.. productionlist::udefault role usedNFT(uFalseu	enumerateuseems_directive_reumatchuTrueudefault_role_reusearchustrip(ufnulinesuinprodulnouline((u6/opt/alt/python33/lib64/python3.3/Doc/tools/rstlint.pyucheck_suspicious_constructsOs	ucheck_suspicious_constructsccs�x�t|�D]�\}}d|kr7|ddfVnd|krU|ddfVn|dd	�jd�|dd
�kr
|ddfVq
q
WdS(u,Check for whitespace and line length issues.u
iu
\r in lineu	uOMG TABS!!!1Nu 	utrailing whitespacei����i����(u	enumerateurstrip(ufnulinesulnouline((u6/opt/alt/python33/lib64/python3.3/Doc/tools/rstlint.pyucheck_whitespace^s)ucheck_whitespaceccs�xyt|�D]k\}}t|�dkr
|j�ddkrxd|krx|j�jd�rx|dd	fVqxq
q
Wd
S(u:Check for line length; this checker is not run by default.iQiu+|uhttp://u.. functionu	.. methodu.. cfunctioniu
line too longN(u.. functionu	.. methodu.. cfunction(u	enumerateulenulstripu
startswith(ufnulinesulnouline((u6/opt/alt/python33/lib64/python3.3/Doc/tools/rstlint.pyucheck_line_lengthjs
ucheck_line_lengthu.htmlccsFx?t|�D]1\}}tj|�r
|dd|fVq
q
WdS(udCheck HTML files for leaked reST markup; this only works if
    the HTML files have been built.
    iupossibly leaked markup: %rN(u	enumerateuleaked_markup_reusearch(ufnulinesulnouline((u6/opt/alt/python33/lib64/python3.3/Doc/tools/rstlint.pyucheck_leaked_markupxsucheck_leaked_markupc!Csd|d}y&tj|dd�d�\}}Wn#tjk
rYt|�dSYnXd}d}g}d}x{|D]s\}}	|dkr�d}qy|dkr�d}qy|dkr�t|	�}qy|d	kry|jt|	��qyqyWt|�dkrd
}
n-t|�dkr*|d}
nt|�dSt	|
�sVtd|
�dSt
t�}x	tj|
�D]�\}}
}d|
kr�|
j
d�nt|�|kr�|
dd�=qrnx�|D]�}t||�}|dd�d
kr|dd�}nt|�|krq�nt|�d}tj|d�}|sMq�n|rdtd|�ny(t|d��}t|�}WdQXWnPttfk
r�}z*td||f�|dd7<w�WYdd}~XnXx�|D]|}|jr|rq�n|j}||kr�xH|||�D]4\}}td||||f�||d7<q'Wq�q�Wq�WqrW|r~t�n|s�|dkr�td|�q�td�nJxGt|�D]9}||}td||dkr�dp�d|f�q�Wtt|��S(NuUsage: %s [-v] [-f] [-s sev] [-i path]* [path]

Options:  -v       verbose (print all checked file names)
          -f       enable checkers that yield many false positives
          -s sev   only show problems with severity >= sev
          -i path  ignore subdir or file path
iiuvfs:i:iu-vu-fu-su-iu.uError: path %s does not existu.svnu./uChecking %s...uru%s: cannot open: %siu[%d] %s:%d: %su&No problems with severity >= %d found.uNo problems found.u$%d problem%s with severity %d found.usuFT(ugetoptuGetoptErroruprintuFalseuTrueuintuappenduabspathulenuexistsudefaultdictuosuwalkuremoveujoinusplitextucheckersugetuNoneuopenulistuIOErroruOSErrorufalsepositivesuseverityusortedubool(uargvuusageugoptsuargsuverboseuseverityuignoreufalseposuoptuvalupathucounturootudirsufilesufnuextucheckerlistufulinesuerrucheckerucsevulnoumsgunumber((u6/opt/alt/python33/lib64/python3.3/Doc/tools/rstlint.pyumain�s�&
				




	!


'umainu__main__FT("u
__future__uwith_statementuosureusysugetoptu
subprocessuos.pathujoinusplitextuabspathuexistsucollectionsudefaultdictu
directivesuall_directivesucompileuseems_directive_reudefault_role_reuleaked_markup_reucheckersuFalseu
checker_propsucheckerucheck_syntaxucheck_suspicious_constructsucheck_whitespaceucheck_line_lengthuTrueucheck_leaked_markupumainu__name__uexituargv(((u6/opt/alt/python33/lib64/python3.3/Doc/tools/rstlint.pyu<module>sN"$
e