+
    i,  c                   s    R t Rt^ RIt^ RIt^ RIt. ROt^ s^ sR tR t	 ! R R]
4      tR t ! R R	4      tR
 tR tR t]R8X  d
   ]	! 4        R# R# )a  The Tab Nanny despises ambiguous indentation.  She knows no mercy.

tabnanny -- Detection of ambiguous indentation

For the time being this module is intended to be called as a script.
However it is possible to import it into an IDE and use the function
check() described below.

Warning: The API provided by this module is likely to change in future
releases; such changes may not be backward compatible.
Z6NNannyNagc                  s    R pV  F4  p\         P                  P                  V\        V4      ,           4       RpK6  	  \         P                  P                  R4       \         P                  ! ^4       R# )  Z
N)sysZstderrZwritestrZexit)argsZsepargs   *  !/usr/lib64/python3.14/tabnanny.pyerrprintr      sO    
C

s3x(  JJTHHQK    c                  s   ^ RI p  V P                  \        P                  R,          R4      w  rX F/  w  rEVR8X  d   \
        ^,           sVR8X  g   K"  \        ^,           sK1  	  X'       g#   \	        R\        P                  ^ ,          R4       V F  p\        V4       K  	  R#   T P                   d   p\	        T4        Rp?LRp?ii ; i)    N:   NNZqvz-qz-vzUsage:z[-v] file_or_directory ...)getoptr   ZargvZerrorr   filename_onlyverbosecheck)r   Zoptsr   msgZoar   s          r   mainr   &   s    ]]388B<6
 9)A-M9kG	 
 388A;(DEc
  << s   )B$ $C
5CC
c                   s<   a  ] tR t^8t o RtR tR tR tR tRt	V t
R# )r    z_
Raised by process_tokens() if detecting an ambiguous indent.
Captured and handled in check().
c                s0    WVuV n         V n        V n        R # N)linenor   line)selfr   r   r   s   &&&&r   __init__ZNannyNag.__init__=   s    +1(TXtyr	   c                    V P                   # r   )r   r      &r   
get_linenoZNannyNag.get_lineno?   s    {{r	   c                r   r   )r   r   r   r   get_msgZNannyNag.get_msgA   s    xxr	   c                r   r   )r   r   r   r   get_lineZNannyNag.get_lineC   s    yyr	   )r   r   r   N)__name__
__module____qualname____firstlineno____doc__r   r   r   r   __static_attributes____classdictcell__Z__classdict__   @r   r    r    8   s#     = r	   c                s   \         P                  P                  V 4      '       d   \         P                  P                  V 4      '       g   \        '       d   \        V : R24       \         P                  ! V 4      pV F  p\         P                  P                  W4      p\         P                  P                  V4      '       d&   \         P                  P                  V4      '       d*   \         P                  P                  VRR 4      R8X  g   K  \        V4       K  	  R#  \        P                  ! V 4      p\        ^8  d   \        RT ,          4        \        \        P                  ! TP                   4      4        TP%                  4        \        '       d   \        T : R24       R# R#   \         d   p\        T : RT: 24        Rp?R# Rp?ii ; i  \        P"                   d.   p\        T : RT: 24        Rp?TP%                  4        R# Rp?i\&         d.   p\        T : RT: 24        Rp?TP%                  4        R# Rp?i\(         d.   p\        T : RT: 24        Rp?TP%                  4        R# Rp?i\*         d   pTP-                  4       pTP/                  4       p\        '       d=   \        R	Y3,          4       \        R
T: 24       \        TP1                  4       4       MDRT 9   d   RT ,           R,           p \2        '       d   \        T 4       M\        Y\5        T4      4        Rp?TP%                  4        R# Rp?ii ; i  TP%                  4        i ; i)af  check(file_or_dir)

If file_or_dir is a directory and not a symbolic link, then recursively
descend the directory tree named by file_or_dir, checking all .py files
along the way. If file_or_dir is an ordinary Python source file, it is
checked for whitespace related problems. The diagnostic messages are
written to standard output using the print statement.
z: listing directoryNz.pyz: I/O Error: zchecking %r ...z: Token Error: z: Indentation Error: z: Syntax Error: z)%r: *** Line %d: trouble in tab city! ***zoffending line: r   Z"z: Clean bill of health.i)osZpathZisdirZislinkr   ZprintZlistdirjoinZnormcaser   tokenizeZopenZOSErrorr   process_tokensZgenerate_tokensZreadlineZ
TokenErrorZcloseZIndentationErrorZSyntaxErrorr    r   r   r   r   Zrepr)	ZfileZnamesZnameZfullnameZfr   ZnagZbadliner   s	   &        r   r   r   F   sP    
ww}}T277>>$#7#77T34

4 Dww||D/Hh''GGNN8,,  bc+u4h  	MM$
 {$&'x//

;<8 	
	wT34 M  c23  $450 	
	-  c:;( 	
	%  456  	
	  .."||~7=OP$01#++- d{3:#3D}eDktDz2 	
	 	
	s   %F2 )G 2G=GGM2HM M'M(I:M MMJ0M MMB
M!M M MM M0c                   sT   a  ] tR t^t o Rw  ttR tR tR tR t	R t
R tR tR	tV tR
# )
Whitespacez 	c                s   Wn         \        P                  \        P                  r2. p^ ;p;rgV P                    F  pW8X  d   V^,           pV^,           pK  W8X  d`   V^,           pV^,           pV\	        V4      8  d)   V^ .V\	        V4      ,
          ^,           ,          ,           pWE,          ^,           WE&   ^ pK   M	  W`n        Wpn        \        V4      V3V n        \	        V4      ^8*  V n	        R# r
   N)
rawr+   STlennntZtuplenorm	is_simple)	r   Zwsr.   r/   countZbr1   r2   Zchs	   &&       r   r   ZWhitespace.__init__   s    ||Z\\1A((BwEEE!VE
?!QC1s5z>A+=$>>E 8a<  %L!O	Uqr	   c                sV    V P                   w  r\        \        V4      ^,
          V4      # r   )r3   maxr0   )r   r5   trailing   &  r   longest_run_of_spacesZ Whitespace.longest_run_of_spaces   s"    ))3u:a<**r	   c                s    V P                   w  r#^ p\        V\        V4      4       F  pWEV,          W%,          ,          ,           pK!  	  W1W@P                  ,           ,          ,           # )r
   )r3   ranger0   r2   )r   Ztabsizer5   r8   ZilZis   &&    r   indent_levelZWhitespace.indent_level   sP     ))wE
+Aj58++B ,R''\222r	   c                s4    V P                   VP                   8H  # r   )r3   )r   others   &&r   equalZWhitespace.equal   s    yyEJJ&&r	   c                sN   \        V P                  4       VP                  4       4      ^,           p. p\        ^V^,           4       F\  pV P                  V4      VP                  V4      8w  g   K*  VP	                  VV P                  V4      VP                  V4      34       K^  	  V# r6   r7   r:   r;   r<   appendr   r=   r1   r   ts   &&   r   not_equal_witnessZWhitespace.not_equal_witness       **,++-/1231Q3-B  $(:(:2(>>2,,R0 --b13 5  
 r	   c                s   V P                   VP                   8  d   R # V P                  '       d,   VP                  '       d   V P                  VP                  8*  # \        V P	                  4       VP	                  4       4      ^,           p\        ^V^,           4       F+  pV P                  V4      VP                  V4      8  g   K*   R # 	  R# )FT)r1   r4   r2   r7   r:   r;   r<   )r   r=   r1   rB   s   &&  r   lessZWhitespace.less   s    66UWW>>>eooo77ehh&&**,++-/123 1Q3-B  $(:(:2(>>   r	   c                sN   \        V P                  4       VP                  4       4      ^,           p. p\        ^V^,           4       F\  pV P                  V4      VP                  V4      8  g   K*  VP	                  VV P                  V4      VP                  V4      34       K^  	  V# r6   r?   rA   rC   r   not_less_witnessZWhitespace.not_less_witness  rE   r	   )r4   r1   r3   r2   r-   N)r   r   r    r!   r.   r/   r   r:   r<   r>   rD   rF   rG   r#   r$   r%   r&   r   r+   r+      s6     DAq*)2+3.'	0"	 	r	   r+   c                 s    R  V  4       pRp\        V 4      ^8  d
   VR,           pVR,           RP                  V4      ,           # )c              3   sF   "   T F  p\        V^ ,          4      x  K  	  R# 5ir,   )r   )Z.0Ztup   & r   Z	<genexpr>Z#format_witnesses.<locals>.<genexpr>  s     'Qcc#a&kkQs   !zat tab sizeZsr   z, )r0   r(   )ZwZfirstsZprefixr9   r   format_witnessesrI     s=    'Q'FF
1vz#C<$))F+++r	   c                 s     \        V 4       R #   \         d1   p\        TP                  TP                  TP
                  4      hR p?ii ; ir   )_process_tokensZTabErrorr    r   r   Ztext)tokensZerH   r   r*   r*     s:    0 0qxx//0s    A
+AA
c                 s   \         P                  p\         P                  p\         P                  p\         P                  \         P
                  3p\        R 4      .p^ pV  EF  w  rxrpWs8X  d   ^pK  Wq8X  d|   ^ p\        V4      pVR,          P                  V4      '       g>   VR,          P                  V4      pR\        V4      ,           p\        V	^ ,          W4      hVP                  V4       K  Wr8X  d   ^pVR K  V'       g   K  Wt9  g   K  ^ p\        V4      pVR,          P                  V4      '       d   K  VR,          P                  V4      pR\        V4      ,           p\        V	^ ,          W4      h	  R# )r   zindent not greater e.g. zindent not equal e.g. Ni)r)   INDENTDEDENTNEWLINEZCOMMENTZNLr+   rF   rG   rI   r    r@   r>   rD   )rK   rL   rM   rN   ZJUNKZindentsZcheck_equalZtypeZtokenZstartZendr   ZthisguyZwitnessr   s   &              r   rJ   rJ     sD   __F__FGX[[(D"~GK+1'e$? K^K 'G2;##G,,!"+66w?03CG3LLuQx33NN7#^ K[T- K &G2;$$W--!"+77@.1A'1JJuQx33Y ,2r	   Z__main__)r   r    r*   )r"   Z__version__r'   r   r)   Z__all__r   r   r   r   Z	Exceptionr    r   r+   rI   r*   rJ   r   ) r	   r   <module>rO      sv   
$  	 
 
1
$y ?5BD DL,044n zF r	   