Your IP : 216.73.217.32
B
A!p\E� � @ sV d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m
Z
mZ ddlm
Z
ddlmZ ddlmZmZ d Zd
ddd
ddddgZddd
ddd
dddddddg
Zejdk r�e�d� dddddd d!d"d#d$d%d&d'd(d)d*d+d,d-gZd.d/d0gZd1d2d3gZd4Zeejejejg�Z ejejfZ!dZ"d5Z#d6Z$d7Z%d8Z&d9Z'e&e%e'gZ(e&e%gZ)d:d;d<d=d>d?d@dAdBdCdDdEdFej*ifdGdHdIdJdKdLdMdNgifdOdPdQ�Z+dRdS� Z,dTdU� Z-dVdW� Z.dXdY� Z/dZd[� Z0d\d]� Z1d^d_� Z2G d`da� da�Z3dbZ4dcZ5ddZ6deZ7dfZ8dgZ9dhZ:e4die5dje6dke7dle8dmiZ;dnZ<dodp� Z=dqdr� Z>G dsdt� dt�Z?G dudv� dv�Z@G dwdx� dxe
�ZAdydz� ZBd{d|� ZCdS )}z�Python code format's checker.
By default try to follow Guido's style guide :
https://www.python.org/doc/essays/styleguide/
Some parts of the process_token method is based from The Tab Nanny std module.
� N)�reduce)�nodes)�
ITokenChecker�IAstroidChecker�IRawChecker)�BaseTokenChecker)�check_messages)�WarningScope�
OPTION_RGX�async�elif�except�for�if�while�def�class�with�assert�del�in�not�raise�return�yield)� r �printz==�<�>z!=z<>z<=z>=z+=z-=z*=z**=z/=z//=z&=z|=z^=z%=z>>=z<<=�(�[�{�)�]�}� � � zdict-separatorztrailing-commaz
empty-line)zLine too long (%s/%s)z
line-too-longz=Used when a line is longer than a given number of characters.)z Too many lines in module (%s/%s)ztoo-many-linesz@Used when a module has too many lines, reducing its readability.)zTrailing whitespaceztrailing-whitespacezHUsed when there is whitespace between the end of a line and the newline.)zFinal newline missingzmissing-final-newlinez7Used when the last line in a file is missing a newline.)zTrailing newlinesztrailing-newlinesz3Used when there are trailing blank lines in a file.)z)Bad indentation. Found %s %s, expected %szbad-indentationzUUsed when an unexpected number of indentation's tabulations or spaces has been found.)zWrong %s indentation%s%s.
%s%szbad-continuationZTODO)z)Found indentation with %ss instead of %sszmixed-indentationz;Used when there are some mixed tabs and spaces in a module.)zUnnecessary semicolonzunnecessary-semicolonzeUsed when a statement is ended by a semi-colon (";"), which isn't necessary (that's python, not C ;).z(More than one statement on a single linezmultiple-statementsz<Used when more than on statement are found on the same line.Zscope)z#Unnecessary parens after %r keywordzsuperfluous-parenszLUsed when a single item in parentheses follows an if, for, or other keyword.z%s space %s %s %s
%szbad-whitespacezWUsed when a wrong number of spaces is used around an operator, bracket or block opener.Z old_names)ZC0323zno-space-after-operator)ZC0324zno-space-after-comma)ZC0322zno-space-before-operator)zMixed line endings LF and CRLFzmixed-line-endingsz@Used when there are mixed (LF and CRLF) newline signs in a file.)zEUnexpected line ending format. There is '%s' while it should be '%s'.zunexpected-line-ending-formatz3Used when there is different newline than expected.)ZC0301ZC0302ZC0303ZC0304ZC0305ZW0311ZC0330ZW0312ZW0301ZC0321ZC0325ZC0326ZC0327ZC0328c C sT | d d | d d }| d d }| d }|d dkr@|d7 }|d| d| S ) Nr r&